6. cs:parser-options
Set the parser options to use in subsequent parses.
$options | map(xs:string, xs:string) | Parser options |
The following options are recognized:
ignoreTrailingWhitespace
, booleanIf true, trailing whitespace on the document input string is ignored.
suppressAmbiguousState
, booleanIf a parse is ambiguous, Invisible XML mandates that an
ixml:state
attribute be added to the root element contining the valueambiguous
. If this option is true, that state will be suppressed.suppressPrefixState
, booleanIf a parse consumes only a (proper) prefix of the input, Invisible XML mandates that an
ixml:state
attribute be added to the root element contining the valueprefix
. If this option is true, that state will be suppressed.allowUndefinedSymbols
, booleanIf true, the parser will attempt to use a grammar that contains undefined symbols.
allowUnreachableSymbols
, booleanIf true, the parser will attempt to use a grammar that contains unreachable symbols.
allowUnproductiveSymbols
, booleanIf true, the parser will attempt to use a grammar that contains unproductive symbols.
allowMultipleDefinitions
, booleanIf true, the parser will attempt to use a grammar that contains multiple definitions for a given nonterminal.
The function will log errors (unrecognized options or values). It will return false if any errors occur, otherwise it returns true.
Changing parser options causes the cache to be cleared.