Name

xpath_explain, xquery_explain, xpath_text, xpath_lex_analyze, xquery_lex_analyze — compile-time diagnostics for XPath and XQuery expressions

Synopsis

varchar xpath_explain( in xpath varchar);
 
varchar xquery_explain( in xquery varchar);
 
varchar xpath_text( in xpath varchar);
 
any xpath_lex_analyze( in xpath varchar);
 
any xquery_lex_analyze( in xquery varchar);
 

Description

These BIFs operate on XPath and XQuery source text without actually evaluating it, returning compile-time information useful for tooling.

xpath_explain and xquery_explain return a textual representation of the optimised execution plan the engine would use, analogous to SQL explain. The output is the same form printed by the development-mode debug option XML_DEBUG_PLAN.

xpath_text normalises the input XPath by parsing it and re-emitting it as canonical text. Useful for diffing two expressions modulo formatting.

xpath_lex_analyze and xquery_lex_analyze run the lexer over the source and return the token stream as a vector of (token_kind, token_text, offset) triples. Useful for syntax-highlighting tools and for diagnosing parse errors at a specific token boundary.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®