You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Template rule matching a key within a map where special characters in the key are already escaped -->
<xsl:templatematch="fn:*[@key-escaped='true']/@key"mode="key-attribute">
<xsl:value-ofselect="concat($quot, ., $quot)"/>
</xsl:template>
<!-- Template rule matching a key within a map where special characters in the key need to be escaped -->
<xsl:templatematch="fn:*[not(@key-escaped='true')]/@key"mode="key-attribute">
<xsl:value-ofselect="concat($quot, j:escape(.), $quot)"/>
</xsl:template>
They test for the presence and value of the attribute key-escaped, not escaped-key. This is by mistake, isn't it?
Cheers,
Christoph
The text was updated successfully, but these errors were encountered:
The stylesheet is also incorrect in checking for the literal value "true". It needs to trim whitespace, and to accept "1" as equivalent to "true". This is best achieved by changing the predicate to fn:*[xs:boolean(@escaped-key)]. The same problem affects the tests on @escaped (e.g. lines 142 and 148).
Hi,
according to the rules described in Sect. 22.1 "XML Representation of JSON" and to the schema in App. B.1 "Schema for the XML Representation of JSON", any element with a
key
attribute may also have an attributeescaped-key
(default valuefalse
).The stylesheet both reproduced in App. B.2 "Stylesheet for converting XML to JSON" and provided as a separate download contains the following templates, though:
They test for the presence and value of the attribute
key-escaped
, notescaped-key
. This is by mistake, isn't it?Cheers,
Christoph
The text was updated successfully, but these errors were encountered: