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

xsl:strip-space does not work?

Subject: xsl:strip-space does not work?
From: Nisheet Verma <NisheetV@xxxxxxxxxxx>
Date: Fri, 16 Nov 2001 14:38:13 -0800
how does space work
I am using a  xml file which looks like, the following ( I have removed
insignificant text to improve readability)

?xml version="1.0"?>
<Catalog id="C31">
<object uri="http://developler.com/classdef;132">
	<property uri="http://developer.com/propertyType;193">
		1698.0||
	</property
</object>
</Catalog>

I want to parse it using the following XSL

<?xml version="1.0" ?>
<!-- Passes a node set from one template to another -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:strip-space elements="*" />
    <xsl:output method="xml" indent="yes" />
	<xsl:template match="object" >
	        <PRODUCT_ITEM >
            	<PRICE>
	                <xsl:value-of select="property/@uri"/>
            	</PRICE>
	</xsl:template>
</xsl:stylesheet>

The out put looks like this

<PRODUCT_ITEM>
<PRICE>
		1698.0||
	</PRICE>
</PRODUCT_ITEM>

I don't know why xsl:strip does not strip out the whitespaces around PRICE
tag.  I can use normalize-space() to make it work but that would be a hack.
I guess, xsl:strip=space should work, or am I using it incorrectly?

Any help would be much appreciated,
thanx
Nisheet

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.