Thanks Charles and Michael. I fixed the problem as you suggested.
--- Jessica
-----Original Message-----
From: cknell(_at_)onebox(_dot_)com [mailto:cknell(_at_)onebox(_dot_)com]
Sent: Monday, March 05, 2007 1:36 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: RE: Re: RE: [xsl] how to reserve single space after
transformation
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(_at_)onebox(_dot_)com - email
-----Original Message-----
From: cknell(_at_)onebox(_dot_)com
Sent: Mon, 05 Mar 2007 16:32:40 -0500
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: Re: RE: [xsl] 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(_at_)onebox(_dot_)com - email
-----Original Message-----
From: Andrew Welch <andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com>
Sent: Mon, 5 Mar 2007 21:18:25 +0000
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: RE: [xsl] how to reserve single space after transformation
On 3/5/07, cknell(_at_)onebox(_dot_)com <cknell(_at_)onebox(_dot_)com> 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.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--