You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2008/09/12 07:13:44 UTC

[jira] Closed: (XALANC-616) xsl:strip-space element doesn't work proprely

     [ https://issues.apache.org/jira/browse/XALANC-616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni closed XALANC-616.
--------------------------------


> xsl:strip-space element doesn't work proprely
> ---------------------------------------------
>
>                 Key: XALANC-616
>                 URL: https://issues.apache.org/jira/browse/XALANC-616
>             Project: XalanC
>          Issue Type: Bug
>          Components: XalanC
>    Affects Versions: CurrentCVS
>         Environment: all
>            Reporter: Dmitry Hayes
>            Assignee: David Bertoni
>             Fix For: CurrentCVS
>
>
> for the input file:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <foo>
> <boo>
> </boo>
> </foo>
> and a stylesheet:
> <?xml version="1.0" encoding="UTF-8"?>                                                                                   
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  version="1.0">
>                            
> <xsl:strip-space elements="*" />                                                                                
> <xsl:template match="*"> 
> 	<xsl:if test=" . != '' " > 
> 		<xsl:text>for a node:</xsl:text><xsl:value-of select="name(.)"/><xsl:text>
> 		The length is</xsl:text> 
> 		<xsl:value-of select="string-length(.)"/> <xsl:text>
> 		</xsl:text>
> 		                                                                                                  
> 		<xsl:apply-templates/>
> 		                                                                                                        
> 	</xsl:if>
> </xsl:template> 
>                                                                                                     
> <xsl:template match="/">
> 	<out>
> 	<xsl:apply-templates/>
> 	</out>
> </xsl:template>
> </xsl:stylesheet> 
> The expected output would be :
> <?xml version="1.0" encoding="utf-8"?><out/>
> But XalanC gives:
> <?xml version="1.0" encoding="UTF-8"?><out>for a node: foo
>                 The length is 3
>                 for a node: boo
>                 The length is 1
>                 </out>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org