[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT 3: Possible to Get Unescaped Markup in Messag
According to the spec, a message produced by xsl:message is an XML document. Saxon passes this document to the callback MessageListener2.message(XdmNode content, QName errorCode, boolean terminate, SourceLocator locator) where content is the XML document, errorCode is the requested error code on xsl:message, terminate indicates whether terminate=yes was requested, and locator idenfies the originating xsl:message instruction. What happens to the message after that is entirely under application control. When you say you are generating formatted markup, I assume this means you are generating text nodes containing angle brackets in their content (rather than generating a tree of nodes). You could of course write a MessageListener that simply outputs the string value of the supplied message document, in which case there would be no escaping applied. But it looks as if that's not what oXygen is doing. Michael Kay Saxonica > On 17 Oct 2019, at 17:21, Eliot Kimber ekimber@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > This may be a Saxon-specific question but I thought I would start here. > > Using Saxon 9.9 and XSLT 3, I want to emit nicely-formatted XML markup in my messages where the base markup has lots of noise I don't want to see (in this case Office Open XML which is oversupplied with namespace declarations and lots of little elements with lots of attributes. > > I wrote some templates to generate the formatted markup I want but the <xsl:message> o;?result has all the angle brackets escaped (I'm running from within Oxygen but I assume the result would be the same from the command line). > > Is there a standard way around this? If not, is there a Saxon-specific way around it? > > I tried capturing the markup to a variable and then using xsl:text with disable-output-escaping="yes" but that didn't seem to work. > > Thanks, > > Eliot > -- > Eliot Kimber > http://contrext.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|