6. cs:parser-options

Set the parser options to use in subsequent parses.

cs:parser-options($options)xs:boolean
$optionsmap(xs:string, xs:string)Parser options

The following options are recognized:

ignoreTrailingWhitespace, boolean

If true, trailing whitespace on the document input string is ignored.

suppressAmbiguousState, boolean

If a parse is ambiguous, Invisible XML mandates that an ixml:state attribute be added to the root element contining the value ambiguous. If this option is true, that state will be suppressed.

suppressPrefixState, boolean

If 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 value prefix. If this option is true, that state will be suppressed.

allowUndefinedSymbols, boolean

If true, the parser will attempt to use a grammar that contains undefined symbols.

allowUnreachableSymbols, boolean

If true, the parser will attempt to use a grammar that contains unreachable symbols.

allowUnproductiveSymbols, boolean

If true, the parser will attempt to use a grammar that contains unproductive symbols.

allowMultipleDefinitions, boolean

If 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.