expkg-zone58:text.parse library module
- Summary
- This module is designed to specify a small library of functions for parsing expressions in a number of languages into XML trees, and in the reverse direction serialising these trees into equivalent string expressions. Parsers are available for versions for XPath and XQuery.
- Tags
- See also: https://lists.w3.org/Archives/Public/public-expath/2015Feb/att-0003/xparse.html
Variables
$xp:default-opts
- Summary
- default options for parse function.
- Type
- map(*)
$xp:parsers
- Summary
- XML descriptions of the available parsers.
- Type
- element(xp:parser)*
Functions
xp:flatten
xp:flatten( input
as
element() ) as
element()
- input as element()
- element()
xp:get-parser
xp:get-parser( opts
as
map(*) ) as
function(*)
- opts as map(*)
- function(*): parser function as function($xq as xs:string)
xp:parse
xp:parse( exp
as
xs:string ) as
element()
xp:parse( exp
as
xs:string, options
as
map(*) ) as
element()
- exp as xs:string
- element(): parse tree
xp:to-expression
xp:to-expression( in
as
element() ) as
xs:string
xp:to-expression( in
as
element(), options
as
map(*) ) as
xs:string
- in as element()
- xs:string
xp:version
xp:version( opts
as
map(*) ) as
map(*)
- opts as map(*)
- map(*): parser function
Namespaces
The following namespaces are defined:
| Prefix | Uri |
|---|---|
| ann | http://www.w3.org/2012/xquery |
| xp | expkg-zone58:text.parse |
Original Source Code
Not available