xsl-list
[Top] [All Lists]

[xsl] Re: XPath expression that yields the same result as xsl:for-each-group?

2019-05-30 13:35:38
Hi Folks,

Thank you for the awesome responses!

I particularly like Martin's XPath expression:

let $keys := 
    distinct-values(/Test/row/concat(ARPT__IDENT, '|', TRM__IDENT))
return
    for $i in $keys
    return 
        array { /Test/row[$i = concat(ARPT__IDENT, '|', TRM__IDENT)] }

However ..... when I open the XML document in Oxygen and type the XPath 
expression in the XPath/XQuery Builder, I get this message: 

        "The XPath query returned no results"

Why is that?

Is Martin's XPath expression a pure XPath expression? Or, is it relying on XSLT 
stuff such as: 

        as="array(element(row))*"

My goal is to create a series of standalone XPath expressions that I can 
sequentially input and evaluate on the XML instance document. To change my 
program, I simply change the XPath expressions!

/Roger
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>