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

RE: RE: Re: RE: how to reserve single space after tr

Subject: RE: RE: Re: RE: how to reserve single space after transformation
From: cknell@xxxxxxxxxx
Date: Mon, 05 Mar 2007 16:35:58 -0500
RE: RE: Re: RE:  how to reserve single space after   tr
AAGGGH!

I used my standard stylesheet template that contains the strip-space instruction! So naturally, the space was stripped. And, as Andrew stated, the xsl:preserve-space counter-acted the xsl:strip-space.

Sorry for the confusion.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     cknell@xxxxxxxxxx
Sent:     Mon, 05 Mar 2007 16:32:40 -0500
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  RE: Re: RE:  how to reserve single space after transformation

My mistake. Here is the stylesheet I inferred from the original post.

<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:strip-space elements="*" />
  <xsl:output method="xml" indent="yes" encoding="UTF-8" />
<!--  <xsl:preserve-space elements="string" /> -->

    <xsl:template match="/">
        <xsl:apply-templates />
    </xsl:template>
    
    <xsl:template match="category_label">
         <xsl:copy-of select="." />
     </xsl:template>
</xsl:stylesheet>


As is, it strips the space. If I un-comment the xsl:preseve-space instruction, the space is preserved.

i.e., 

<?xml version="1.0" encoding="UTF-8"?>
<category_label>
   <string/>
</category_label>

versus

<?xml version="1.0" encoding="UTF-8"?>
<category_label>
   <string> </string>
</category_label>
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Andrew Welch <andrew.j.welch@xxxxxxxxx>
Sent:     Mon, 5 Mar 2007 21:18:25 +0000
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re: RE:  how to reserve single space after transformation

On 3/5/07, cknell@xxxxxxxxxx <cknell@xxxxxxxxxx> wrote:
> I just ran her stylesheet against her XML document with SaxonB 8.7.3, and got exactly the results she showed.

Strange... I didn't see any stylesheet in the original post...

Also I don't think xsl:preserve-space would help unless it was used to
counter xsl:strip-space.

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.