Register  Login       Search  
Forum  
 
  
 
Forum  Forum     
 
SearchForum Home
  XML Lab Products  nxslt  xsl:text...
 xsl:text
 
sergey_shandar
8 posts
Joined
9/11/2005

xsl:text
Posted: 20 Oct 05 12:48 AM (Australia) Modified By sergey_shandar  on 10/20/2005 12:53:50 AM)
Hi, Oleg

I've checked the last version of NXSLT (1.6.3). It cuts <xsl:text> with spaces inside (space, tab, nl). Currently, I work around using <xsl:value-of select="'...'"/> but there is still a question. Is it correct behaviour to delete <xsl:text> with spaces inside?
olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: xsl:text
Posted: 20 Oct 05 2:27 AM (Israel)

No, that's not correct behaviour. Sounds like I screwed up again :( Will look at it today. Chances are this newly introduced extension-element-prefixes filtering removes whitespace too.


Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: xsl:text
Posted: 20 Oct 05 3:06 AM (Israel)

Hmmm, actually I can't reproduce the problem. I just tried

foo.xml

<foo> </foo>

foo.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="/">
    <out>
      <xsl:text>   </xsl:text>
      <src><xsl:copy-of select="foo"/></src>       
    </out>
  </xsl:template>
</xsl:stylesheet>

And get as expected

<out>   <src><foo> </foo></src></out>

Show me your code.

 


Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
sergey_shandar
8 posts
Joined
9/11/2005

Re: xsl:text
Posted: 21 Oct 05 9:54 AM (Australia)
Right, more details. The problem occurs when you use <xsl:import>. For instance,

a.xml
<?xml version="1.0"?>
<a/>
a.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="b.xsl"/>
</xsl:stylesheet>
b.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="*">(<xsl:text> </xsl:text>)</xsl:template>
</xsl:stylesheet>

nxslt a.xml a.xsl
()
instead of
( )
olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: xsl:text
Posted: 22 Oct 05 1:44 PM (Israel)
Yeah, my fault. Fixed, try nxslt 1.6.4. please.
Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
  XML Lab Products  nxslt  xsl:text...
Forum Home  Search