XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
John MillerSubject: Problem with xsl:output and xsl:include
Author: John Miller
Date: 19 Aug 2004 09:05 PM
Originally Posted: 19 Aug 2004 08:54 PM
I have a stylesheet that outputs text using a xsl:output and a xsl:include. The problem is, if the output method is text the include doesn't behave as expected. Here is a snippet of the code: <xsl:output method="text" indent="no" encoding="utf-8"/> <xsl:include href="Globals.xsl"/> Here is a snippet of Globals.xsl: <xsl:variable name="gTestData" select="document( $gTestDataFile, / )"/> When the xsl:output method is text, the xml file contained in $gTestDataFile is not loaded. If the method is xml, it is loaded. Is this correct? jMM

Postnext
Minollo I.Subject: Re: Problem with xsl:output and xsl:include
Author: Minollo I.
Date: 19 Aug 2004 09:45 PM
The two things shouldn't be related.

Where and how is gTestDataFile defined? Any chance you can send us the
files you are using?

Thanks,
Minollo

Postnext
John MillerSubject: Re: Problem with xsl:output and xsl:include
Author: John Miller
Date: 19 Aug 2004 11:34 PM
I've attached a zip containing an example that demostrates the problem. See the StylusTest.xsl for instructions on how to run the demo.

jMM


UnknownStylusTest.zip
xsl:output xsl:include problem files

Postnext
Minollo I.Subject: Re: Problem with xsl:output and xsl:include
Author: Minollo I.
Date: 20 Aug 2004 03:11 PM
Thanks for the testcase.

The problem is caused by a defect in the rendering of the variable in the
variable/watch debug windows.

Stylus Studio always displays the variable along with a summary of its
value; such value is computed as an xsl:copy-of operation applied on the
variable itself. In your case such operation only returns whitespaces when
the output method is set to text (while it returns the whole XML fragment
when it's set to xml), as the are no non-whitespace characters in any text
node in the document that you are assigning to the variable.

When such summary value is empty, Stylus Studio decides that it is not
worth allowing you to attempt further investigations/expansions of the
variable; and that is clearly a wrong decision. That behavior has now been
fixed.

Please note that this defect only affects the way the variable is rendered
in the variable/watch windows, not the way in which the processor handles
it. Also, the defect is unrelated to the use of xsl:include.

While the updated build is not yet available, you can workaround the
problem by adding a text node containing non-whitespace characters in the
document that you are assigning to the variable.

Thanks for reporting this problem and helping us,
Minollo

Posttop
John MillerSubject: Re: Problem with xsl:output and xsl:include
Author: John Miller
Date: 20 Aug 2004 04:44 PM
Thanks for the reply and the workaround.

jMM

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.