Boundary-space declaration
A boundary-space declaration in the
query prolog sets the boundary-space policy for the query. The boundary-space
policy controls how boundary whitespace is processed by element
constructors.
Boundary whitespace includes
all whitespace characters that occur by themselves in the boundaries
between tags or enclosed expressions in element constructors.
The boundary-space policy can specify that boundary whitespace is either preserved or stripped (removed) when elements are constructed. If no boundary-space declaration is specified, the default behavior is to strip boundary whitespace when elements are constructed.
The prolog can contain only one boundary-space declaration for a query.
Syntax
- strip
- Specifies that boundary whitespace is removed when elements are constructed.
- preserve
- Specifies that boundary whitespace is preserved when elements are constructed.
Example
The following boundary-space declaration specifies that boundary whitespace is preserved when elements are constructed:
declare boundary-space preserve;