This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Strip CRLF/newline only


Hunsberger, Peter wrote:
>         <person>
>             <name>
>                 <last/>, <first/>
>             </name>
>             <dateofbirth/>
>             <address>
>                 <addr1/>, <city/>, <state/>
>             </address>
>         </person>
> 
> In the text nodes there are significant spaces (the ones following the
> commas) that I want to preserve.  I don't want the extension to see the
> newline/CRLF's.  I assume this is a filter, but what's it look like?

The spaces following the commas will be preserved in the text nodes by
default. You don't need to do anything special. For example, between the
'addr1' and 'city' element nodes there is a text node containing ', '.

Just prior to the 'addr1' element node there is a text node containing a
linefeed followed by a number of spaces. This one, since it is only 
whitespace, can be affected by xsl:strip-space or xsl:preserve-space, but 
by default, if it's in a source document, it won't be stripped either.

I suspect that if you are having difficulty with the spaces after the 
commas, there must be something else going on that you didn't mention.
What are you trying to do, and where & how are you obtaining unexpected 
results?

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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]