Project
  History
  Mission
  Quotes
  License
  News

Related Efforts
  XQuery Style

Quick Start
  General
  BaseX
  eXist
  MarkLogic
  Saxon
  xquerydoc
  Zorba

Documentation
  Assumptions
  Limitations
  xqDoc Comments
  xqDoc Schema
  xqDoc Conversion
  xqDoc Display
  xqDoc Drivers

Downloads
  Binaries
  Source

Sample Output
  xqDoc Basic
  xqDoc Standard
  xqDoc Enhanced

Credits
  Who We Are

XQuery Style Conventions

The proposed XQuery Style Conventions are based on experience and feedback from the XQuery development community. This living document will be continually updated as the XQuery specification evolves and as feedback is received from the XQuery development community.

Style conventions are important for a number of reasons:

  • Common style conventions will decrease the long-term maintenance costs associated with XQuery modules.
  • Hardly any XQuery module will be maintained for its whole life by the original author.
  • Style conventions improve the readability of the XQuery modules, allowing everyone to understand the XQuery more quickly and thoroughly.
The style conventions proposed in this document will not ensure the XQuery authored for one XQuery engine will work on a different XQuery engine. However, the migration to a different XQuery engine can be simplified by adhering to a consistent style when authoring XQuery modules.

Since the XQuery language is fully composable, any of the expressions can be nested within another, it is an insurmountable task to completely define style guidelines that will cover all cases. Instead, we have opted to offer general guidelines that should cover the more common scenarios.