xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] stripping leading and trailing newlines from xml


Subject: Re: [xsl] stripping leading and trailing newlines from xml
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 8 Aug 2002 14:31:46 -0600 (MDT)

Aparna Konduri wrote:
> Is there a way to just strip leading and trailing newlines from 
> xml using xsl or javascript?

XSLT has somewhat unintuitive rules for how it handles whitespace
and newlines. You did not provide an example of what you want to
accomplish, so I guess you meant extraneous whitespace.

An identity transform as discussed in the XSLT spec under "Copying"
(xsl:copy), with the addition of

  <xsl:strip-space elements="*"/>
  <xsl:output method="xml" indent="no"/>

is probably what you want.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

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



Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor