[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Odd Result-Document Behavior

Subject: Re: Odd Result-Document Behavior
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Dec 2015 17:43:09 -0000
Re:  Odd Result-Document Behavior
Eliot Kimber ekimber@xxxxxxxxxxxx wrote:
Im using Saxon 9.6.0.7 via Oxygen.

Im using xsl:result-document with @format to generate result documents.
If I use a variable reference in @format the referenced xml:output is
not used. If I replace the variable reference with a string literal I
get the expected output (in both cases the attribute is an attribute
value template).

My initial code is:

<xsl:result-documenthref="{$mapUri}"format="{$mapFormat}>


Where $mapFormat has the string value map and the map output declaration is present:


<xsl:paramname="mapFormat"as="xs:string"select="'map'/>



<xsl:output name="map" method="xml" doctype-public="-//OASIS//DTD DITA Map//EN" doctype-system="map.dtd" indent="yes" />


When I run this, the output is not used (result document has no DOCTYPE decl and is not indented).

If I replace format="{$mapFormat} with format={map} then I get the
expected result (DOCTYPE decl, indented markup).

So the only difference is the use of the variable reference. Ive
verified that $mapFormat has a value:

<xsl:message>+ [DEBUG]
mapFormat="<xsl:sequenceselect="$mapFormat"/>"</xsl:message>


Which produces:



+ [DEBUG] mapFormat=map"


It seems unlikely that this is a Saxon bug but Im at a loss as to what
I could be doing wrong to cause this behavior.

What am I missing?

Any chance some part of the stylesheet does e.g. xmlns="http://example.com/ns", i.e. sets a default namespace? If the result-document instruction is inside code doing that but the xsl:output not, then one would use a name in the namespace while the other would use a name in no namespace.


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.