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/04/25 23:07:12 UTC
[Bug 1518] New - xsltc has problem with namespace attributes with AVTS
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1518
*** shadow/1518 Wed Apr 25 14:07:12 2001
--- shadow/1518.tmp.6133 Wed Apr 25 14:07:12 2001
***************
*** 0 ****
--- 1,69 ----
+ +============================================================================+
+ | xsltc has problem with namespace attributes with AVTS |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1518 Product: XalanJ2 |
+ | Status: NEW Version: 2.0.0 |
+ | Resolution: Platform: Sun |
+ | Severity: Normal OS/Version: Solaris |
+ | Priority: Low Component: org.apache.xalan.xsltc |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xalan-dev@xml.apache.org |
+ | Reported By: tamiro@east.sun.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ [from SunMicroSystem's bug 4418412]
+ When an xsl:attribute element contains a namespace attribute that gets it value
+ from an attribute value template, xsltc's ouput disagrees with other XSLT
+ processor. The following example is taken from the LotusOasis test atrs16.
+
+
+ XML File
+ --------
+ <?xml version="1.0"?>
+ <docs>
+ <a href="http://www.ns0.com">Attr0</a>
+ <b href="">Attr1</b>
+ </docs>
+
+ XSL File
+ --------
+ <?xml version="1.0"?>
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:ped="http://ped.test.com">
+
+ <!-- FileName: atrs16 -->
+ <!-- Document: http://www.w3.org/TR/xslt -->
+ <!-- DocVersion: 19991116 -->
+ <!-- Section: 7.1.3 Creating Attributes -->
+ <!-- Purpose: The namespace attribute is interpreted as an attribute value
+ template. -->
+
+ <xsl:template match="/">
+ <root>
+ <Out>
+ <xsl:attribute name="{docs/a}"
+ namespace="{docs/a/@href}">Hello</xsl:attribute>
+ <xsl:attribute name="{docs/b}"
+ namespace="{docs/b/@href}">Whatsup</xsl:attribute>
+ <xsl:attribute name="Attr2"
+ namespace="http://ped.test.com">Goodbye</xsl:attribute>
+ </Out>
+ </root>
+ </xsl:template>
+
+ </xsl:stylesheet>
+
+ Expected Output
+ ---------------
+ <?xml version="1.0" encoding="utf-8"?><root xmlns:ped="http://ped.test.com"><Out
+ xmlns:ns0="http://www.ns0.com" xmlns:ns0.0="" ns0:Attr0="Hello"
+ ns0.0:Attr1="Whatsup" ped:Attr2="Goodbye"/></root>
+
+ Actual Output
+ -------------
+ <?xml version="1.0" encoding="utf-8" ?>
+ <root xmlns:ped="http://ped.test.com"><Out xmlns:ped="http://www.ns0.com"
+ xmlns:ns0="Hello" ns0:Attr0="" xmlns:ns1="Whatsup" ns1:Attr1="Goodbye"/></root>