Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 4th, 2006, 04:14 AM
Authorized User
 
Join Date: Dec 2005
Posts: 71
Thanks: 10
Thanked 0 Times in 0 Posts
Default Usage of "xsl:strip-space"

Hi All,

I have an XML
-
<artbody>
  <section id="s1">
   <heading1 level="1">section-1</heading1>
-
Used XSL
-
<xsl:strip-space elements="*"/>
-
Results
-
<artbody>
  <section>
   <heading1>section-1</heading1>
-

As you see the xsl strips all the attribute values, I would like to have the same attribute values after using the "xsl:strip-space". Kindly suggest us to go further.

I would greatly appreciate any help provided.

Thanks & Regards,
- ROCXY




__________________
Thanks,
Rocxy.
 
Old January 4th, 2006, 05:31 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

xsl:strip-space does not remove attributes. Something else in your stylesheet (which you haven't shown us) has done that. Or more strictly, attributes will only be copied from the source document to the result document if there is something in your stylesheet that asks for them to be copied. The same is true of elements.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Xsl: strip-space elements; and 'group-adjacent' ROCXY XSLT 6 July 15th, 2010 08:59 AM
Usage of '*' in test condition of <xsl:when> vikkiefd XSLT 5 March 12th, 2008 10:31 PM
XSL Transformation for empty space ashokhr XSLT 3 October 10th, 2006 04:09 AM
xsl:output and removing space in XML ROCXY XSLT 1 March 21st, 2006 09:38 AM
how do I strip a URL down to the filename? mikehsu317 VBScript 1 July 3rd, 2005 02:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.