[ http://issues.apache.org/jira/browse/XALANJ-1818?page=all ]
Brian Minchau updated XALANJ-1818:
----------------------------------
Fix Version: 2.7
> xmlns:* attributes copied incorrectly in literal result element
> ---------------------------------------------------------------
>
> Key: XALANJ-1818
> URL: http://issues.apache.org/jira/browse/XALANJ-1818
> Project: XalanJ2
> Type: Bug
> Components: parse-or-compile, Xalan-interpretive
> Versions: 2.5
> Environment: Operating System: Linux
> Platform: PC
> Reporter: xalan2-list
> Assignee: Xalan Developers Mailing List
> Fix For: 2.7
> Attachments: Namespaces.java
>
> When a literal result element is generated its xmlns:* attributes are not
> copied
> according to the XSLT specification 7.1.1
> (http://www.w3.org/TR/xslt#literal-result-element). The spec states that
> usually
> an attribute should be copied, and an xmlns:* attribute is not a special case.
> But with Xalan the xmlns:* attribute is copied into the result element or an
> ancestor of the result element, whichever is the earliest and as long as it is
> not repeated.
> Here's why it's a problem. I want my XSLT to generate a document like this:
> <my-element>
> <inner-element aaa:attr="value" xmlns:aaa="my namespace URI">
> This is my content
> </inner-element>
> </my-element>
> But if I put this into an XSLT template to output literally the xmlns:aaa
> attribute mysteriously moves into its parent element. The attached code (java
> version "1.4.1_05") demonstrates this.
> I want the xmlns:aaa attribute to be in the <inner-element> because I want to
> pick out that element and make it the top element of a new document. But now I
> can't because the <inner-element>, which was valid XML in isolation, has lost
> its namespace declaration and so no longer is valid in isolation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]