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

RE: Re: Whitespace between nodes

Subject: RE: Re: Whitespace between nodes
From: cknell@xxxxxxxxxx
Date: Wed, 12 May 2004 17:11:05 -0400
xsl whitespace
I've made a small model of your input xml and stylesheet documents based on what you've posted. I can confirm that Saxon 6.5.3 does as you describe and MSXSL does as you say you want. While I'm certainly no expert on the specs (as others on this list are) it seems that you've fallen into a gray area that the spec leaves up to the implementor to handle as he or she sees fit. Perhaps one of the spec experts will confirm or refute this hypothesis.
--
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Nicholas Shanks <contact@xxxxxxxxxxxxxx>
Sent:     Wed, 12 May 2004 21:48:03 +0100
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re:  Whitespace between nodes

On 12 May 2004, at 21:35, cknell@xxxxxxxxxx wrote:

I suspect that your input document has the carriage returns

Nope, it doesn't.


I think one of your processors is "helpfully" removing the carriage returns improperly. If you show us the input and name the processors it will be easy to help.

XSL:


<xsl:choose>
  <xsl:when test="@href != ''">
    <q><a href="{@href}"><xsl:value-of select="@title" /></a></q>
  </xsl:when>
  <xsl:otherwise>
    <q><xsl:value-of select="@title" /></q>
  </xsl:otherwise>
</xsl:choose>

Sablotron:
<q>
  <a href="...">Text</a>
</q>
-or-  (if !href)
<q>Text</q>

Libxslt:
<q><a href="...">Text</a></q>
-or-  (if !href)
<q>Text</q>

Saxon: (as Sablotron)
Xalan-J: (as Sablotron but without indentations)

So only Libxslt behaves as I would hope, but the others do not do anything against the rules. I just want to know how to wrap the q elements in a "dont-insert-whitespace" instruction.

- Nick.

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.