[Home] [By Thread] [By Date] [Recent Entries]
The hipsters at Amazon had the brilliant idea to cram JSON into HTML
attributes in their KF8 format, such as in
<a class="app-amzn-magnify" data-app-amzn-magnify='{targetId:"fs1-txt2-magTarget", sourceId:"fs1-2-txt", ordinal:1}'> (Using a distinct custom attribute for each property in the flat JSON structure apparently wasnt an option for them.) Since we are using XSLT to generate the HTML, strings in JSON have to be double-quote-delimited, the KF8 renderer apparently doesnt parse " to ", our XSLT processor uses double quotes as attribute delimiters by default: Is there a way to tell an XSLT 2 processor to serialize attribute delimiters as single quotes and keep double quotes unescaped in attribute values? Otherwise, wed have to resort to some string postprocessing of the serialized XML. Gerrit
|

Cart



