You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Elena Litani <el...@ca.ibm.com> on 2002/08/06 21:18:54 UTC

Re: get error for setting xsl attribute with xerces, but not crimson

Hi Malia,

Sorry for a late reply. The bug was in XMLSerializer namespace fixup
code.
If you try the latest Xerces jars [1] the problem is fixed.

[1] http://gump.covalent.net/jars/latest/xml-xerces2/

Thank you,
-- 
Elena Litani / IBM Toronto




Malia Zaheer wrote:
> 
> I get duplicate attribute error when using xerces for this code:
> 
>             doc= new DocumentImpl();
>             root =
> doc.createElementNS("http://www.w3.org/1999/XSL/Transform",
> "xsl:stylesheet");
>             root.setAttribute("version", "1.0");
>             root.setAttribute("xmlns:java",
> "http://xml.apache.org/xslt/java");
>             root.setAttribute("xmlns:xsl",
> "http://www.w3.org/1999/XSL/Transform");
>             root.setAttribute("exclude-result-prefixes", "java");
> 
>             doc.appendChild( root );                     // Add Root to
> Document
> 
> The error occurs because it creates attribute xmlns:xsl twice.  But, using
> the same code with crimson, it doesn't create xmlns:xsl attribute twice and
> therefore, no error.  I also tried commenting out this line
> 
>            root.setAttribute("xmlns:xsl",
> "http://www.w3.org/1999/XSL/Transform");
> 
> Then when running under crimson, it cause me error that says xmlns:xsl
> attribute is not defined.  I get a null xsl when I tried commenting that
> line out with xerces.  Is this a bug, or am I doing something wrong.  Please
> help!
> 
> Thanks a lot.
> Malia
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org