RE: [xsl] Newline problems

Subject: RE: [xsl] Newline problems
From: me@xxxxxxxxxxxx
Date: Mon, 05 May 2003 17:12:56 -0700 (PDT)
Ok, this thread is getting boring. :)

Here is what I see as the main problem with the logic
of the sheet as it stands (if I am reading it


<xsl:template mode="stripNewline"  match="text()">
  <xsl:value-of select="normalize-space(.)"/>

Will normalize-space on the text node =>IF<= 

<xsl:template mode = "Attribs" match = "info">
  <xsl:apply-templates mode="stripNewline"
   <xsl:element name = "PO_NUMBER">

"[LF]ponumber" = "ponumber". Which it never will. So
the text nodes will never be "cleaned".

So you are in a catch 22 if you refuse to use 

People use trim() all the time on Char values from a
database or input from the console. As I see it (and I
am by no means a Guru) You have several things you can
do - all of which have been given to you already.

1. Have the original xml manipulated first. As Michael
2. Use normalize-space() on the item you are testing
3. Perhaps ../name = '[lf]ponumber' would work?
4. Don't use xslt, find another solution

Cheers, and good luck

    _/  _/_/    _/_/_/
   _/_/   _/ _/     _/
  _/               _/
 _/             _/
_/          _/_/_/_/

 XSL-List info and archive:

Current Thread