[Top] [All Lists]

Re: [xsl] XSLT 3: Possible to Get Unescaped Markup in Message Results?

2019-10-17 11:32:16
  wrote some templates to generate the formatted markup I want but the
<xsl:message> result has all the angle brackets escaped

I don't see what is the problem...

Even with XSLT 2.0, given this XML document:


And this transformation:

<xsl:stylesheet version="1.0" xmlns:xsl="
 <xsl:output omit-xml-declaration="yes" indent="yes"/>

  <xsl:template match="/*">
    <xsl:message select="."/>

I get the output of <xsl:message> exactly as wanted:

Saxon from Saxonica
Java version 1.8.0_191
Warning: at xsl:stylesheet on line 1 column 80 of marrowtr.xsl:
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
Stylesheet compilation time: 137 milliseconds
Processing file:/C:/Program%20Files/Java/jre1.8.0_191/bin/marrowtr.xml
Building tree for
file:/C:/Program%20Files/Java/jre1.8.0_191/bin/marrowtr.xml using class
Tree built in 1 milliseconds
Tree size: 3 nodes, 0 characters, 0 attributes
Loading net.sf.saxon.event.MessageEmitter
Execution time: 16 milliseconds
Memory used: 16171704
NamePool contents: 12 entries in 12 chains. 6 prefixes, 6 URIs


On Thu, Oct 17, 2019 at 9:21 AM Eliot Kimber ekimber(_at_)contrext(_dot_)com <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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> 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

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.


Eliot Kimber

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
<Prev in Thread] Current Thread [Next in Thread>