Subject: Re: [xsl] Using xsl:iterate inside <xsl:for-each-group> xslt 3.0 From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 19 Aug 2020 13:51:51 -0000 |
By replacing the $p in the map:merge(($p b& with ., the two maps aremerged. Is that how this works?
Yes, you could use map:put also I think to "add" the element to the map. The previous attempts also merged but not at the right level, as we have a sequence of maps in $groups the aim was to add a property named "p" with a "p" element to each map in the sequence which I failed to code that correctly on previous attempts.
Maps are black boxes to me. Is there a way to bseeb inside? With a
variable, you can do a copy-of to see if everything is okay in there. When I try to copy a map I get an error.
Unfortunately the use of `xsl:message` has not been "upgraded" in XSLT 3.0 to cover the full XPath 3.1 data model with functions, maps, arrays, it pretty much expects a a tree of nodes or sequences of nodes.
What you can do to output a string representation of a map is to use (XPath 3.1 you can use in any "select" expression or other attributes of XSLT 3 elements)
Unfortunately for the 'adaptive' method Saxon does not support indenting so it is a bit difficult to read anything output that way.
Maps that restrict themselves to the JSON data model can also be serialized as JSON by using
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Using xsl:iterate inside , Terry Ofner tdofner@ | Thread | [xsl] Pluralsight Free Weekend: Fri, Dimitre Novatchev dn |
Re: [xsl] Using xsl:iterate inside , Terry Ofner tdofner@ | Date | Re: [xsl] Source code formatting, Michael Kay mike@xxx |
Month |