[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

Subject: Re: XSLT 3: Possible to Get Unescaped Markup in Message Results?
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Oct 2019 16:32:12 -0000
Re:  XSLT 3: Possible to Get Unescaped Markup in Messag
>   wrote some templates to generate the formatted markup I want but the
<xsl:message> o;?result has all the angle brackets escaped

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

Even with XSLT 2.0, given this XML document:

<t/>

And this transformation:

<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>

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

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

Saxon 9.1.0.1J 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
net.sf.saxon.tinytree.TinyBuilder
Tree built in 1 milliseconds
Tree size: 3 nodes, 0 characters, 0 attributes
Loading net.sf.saxon.event.MessageEmitter
<t/>
Execution time: 16 milliseconds
Memory used: 16171704
NamePool contents: 12 entries in 12 chains. 6 prefixes, 6 URIs

Cheers,
Dimitre

On Thu, Oct 17, 2019 at 9:21 AM 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.