xsl-list
[Top] [All Lists]

Re: [xsl] JSON strings in XML attributes

2012-08-30 02:26:56

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?

There's no standard way of doing it, and no extension in Saxon, but the Saxon serializer is fairly easy to customize: subclass SerializerFactory with an override of newXMLEmitter() to create a subclass of XMLEmitter; in your subclass of XMLEmitter, override writeAttribute() and writeEscape().

Michael Kay
Saxonica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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