[ http://issues.apache.org/jira/browse/XALANJ-1858?page=all ]
Brian Minchau updated XALANJ-1858:
----------------------------------
Fix Version: 2.7
> No attributes added using setAttributeNS in HTML environment
> ------------------------------------------------------------
>
> Key: XALANJ-1858
> URL: http://issues.apache.org/jira/browse/XALANJ-1858
> Project: XalanJ2
> Type: Bug
> Components: Other
> Versions: 2.5
> Environment: Operating System: Windows NT/2K
> Platform: PC
> Reporter: Deryk Sinotte
> Assignee: Xalan Developers Mailing List
> Fix For: 2.7
>
> This may not actually be a bug and the situation is pretty specific but I
> thought it was worthwhile to point it out.
> We have a Java application that renders HTML and we also support rendering
> HTML
> based on an XML transformation using Xalan. We have our own parser and
> implementation of a level 2 DOM plus some simple glue code to tie in the Xalan
> library.
> The problem is that, according to the JavaDocs for
> org.w3c.dom.Element.setAttributeNS():
> <snip>
> HTML-only DOM implementations do not need to implement this method.
> </snip>
> This statement is actually present in most of the namespace related methods.
> Since our HTML renderer is an HTML-only DOM implementation, those methods are
> generally not implemented.
> However, in the org.apache.xml.utils.DOMBuilder class, I found the following
> in
> the startElement method:
> // ALWAYS use the DOM Level 2 call!
> elem.setAttributeNS(attrNS,attrQName, atts.getValue(i));
> The bottom line is that the transformation ends up losing all the attributes
> since the callback to our implementation does nothing. The namespace is null
> so
> there are things I can do on my end to fix this but I was wondering if some
> check should be made to see whether we're in HTML mode before deciding whether
> to use the setAttribute or setAttributeNS calls?
--
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]