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

RE: text(), whitespace, and nxslt

Subject: RE: text(), whitespace, and nxslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 19 Oct 2005 20:41:54 +0100
RE:  text()
For me, both Saxon 8.5.1 and Saxon 6.5.4 give true, true, true.

How are you running the processor?

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: Roger Chi [mailto:roger.xslt@xxxxxxxxxxxx] 
> Sent: 19 October 2005 19:39
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  text(), whitespace, and nxslt
> 
> XSLT 1.0
> 
> Given this stylesheet:
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <xsl:output method="xml" version="1.0" encoding="UTF-8"
> indent="yes"/>
> 
>   <xsl:template match="node()">
>     <output>
>       <test1>
>         <xsl:value-of select="boolean(.)"/>
>       </test1>
>       <test2>
>         <xsl:value-of select="boolean(text())"/>
>       </test2>
>       <test3>
>         <xsl:value-of select="boolean(child::text())"/>
>       </test3>
>     </output>
>   </xsl:template>
> 
> </xsl:stylesheet>
> 
> And this source file:
> 
> <ROOT>
>     <!-- some whitespace -->
> </ROOT>
> 
> I get values of true, true, true in nxslt
> However, in the built in XMLSpy parser, msxsl, and saxon I get true,
> false, false. If I use the parameter -xw (Strip non-significant
> whitespace from source and stylesheet), the result from nxslt becomes
> the same as the other parsers (true, false, false).
> 
> My question: Does nxslt consider whitespace as something that should
> give a true when using boolean(text()), and is this 
> conforming to spec;
> or do the other processors strip out whitespace before processing?

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.