You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/17 14:01:02 UTC
DO NOT REPLY [Bug 4228] New: -
and lose some attributes.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4228>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4228
<xsl:include> and <xsl:import> lose some attributes.
Summary: <xsl:include> and <xsl:import> lose some attributes.
Product: XalanJ2
Version: 2.2.x
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: org.apache.xalan.processor
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: sckimos@e-net.co.kr
I've tested with xalan-j_2_2_D11 like followings..
test1.xsl
--------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="test2.xsl"/>
</xsl:stylesheet>
--------------------------------------------------
test2.xsl
--------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="image">
<img border="0" src="{@name}"/>
</xsl:template>
</xsl:stylesheet>
--------------------------------------------------
source.xml
--------------------------------------------------
<?xml version="1.0"?>
<image name="myimage.jpg"/>
--------------------------------------------------
and run xalan.
java org.apache.xalan.xslt.Process -IN source.xml -XSL test1.xsl -OUT
output.xml
output is...
output.xml
--------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<img src="myimage.jpg"/>
--------------------------------------------------
Where is "border" attribute ??? It's missing...
After another test, I've experienced these :
If <img> has zero or one attribute, it works well,
but more than that, first attribute is missing,
when using <xsl:import> or <xsl:include>.
Isn't this xalan bug?
(currently, I've added junk attribute, like [ ignore="" ], in
first attribute of <img>...)