You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Hagan, Jeffrey G" <je...@baesystems.com> on 2002/10/22 22:17:01 UTC

Xalan Node Serialization

Hello,

I am using Xalan 1.4 on Solaris and had the following question:

Is there a way to serialize the document element node with Xalan such that
the xmlns:xml attribute is not assigned?  For example, if I run the
SerializeNodeSet sample code to serialize the document element node, the
value: "http://www.w3.org/XML/1998/namespace" is assigned to this attribute
on the document element node.  Here is an example of the output:

17% SerializeNodeSet ../samples/SerializeNodeSet/foo.xml / doc
<doc xmlns:xml="http://www.w3.org/XML/1998/namespace">
  <name last="Marston" first="David">Mr. Marston</name>
  <name last="Bertoni" first="David">Mr. Bertoni</name>
  <name last="Leslie" first="Donald">Mr. Leslie</name>
  <name last="Farmer" first="Emily">Ms. Farmer</name>
  <name last="Midy" first="Myriam">Ms. Midy</name>
  <name last="Dick" first="Paul">Mr. Dick</name>
  <name last="Boag" first="Scott">Mr. Boag</name>
  <name last="Curcuru" first="Shane">Mr. Curcuru</name>
  <name last="Kesselman" first="Joseph">Mr. Kesselman</name>
  <name last="Auriemma" first="Stephen">Mr. Auriemma</name>
</doc>18%

I am having the same issue in my code.  Note that this only occurs when
serializing the document element node.

As always, any assistance would be greatly appreciated.

Thank you very much,

Jeff Hagan



Re: Xalan Node Serialization

Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.




Hi Jeff,

That's a bug in the code, since we add that attribute for the sake of
supporting the XPath data model.  We should exclude it from serialization.

You should enter a bug report into Bugzilla so it can be tracked.

Dave



                                                                                                                                          
                      "Hagan, Jeffrey G"                                                                                                  
                      <jeffrey.hagan@baes         To:      "'xalan-c-users@xml.apache.org'" <xa...@xml.apache.org>                
                      ystems.com>                 cc:      (bcc: David N Bertoni/Cambridge/IBM)                                           
                                                  Subject: Xalan Node Serialization                                                       
                      10/22/2002 01:17 PM                                                                                                 
                                                                                                                                          



Hello,

I am using Xalan 1.4 on Solaris and had the following question:

Is there a way to serialize the document element node with Xalan such that
the xmlns:xml attribute is not assigned?  For example, if I run the
SerializeNodeSet sample code to serialize the document element node, the
value: "http://www.w3.org/XML/1998/namespace" is assigned to this attribute
on the document element node.  Here is an example of the output:

17% SerializeNodeSet ../samples/SerializeNodeSet/foo.xml / doc
<doc xmlns:xml="http://www.w3.org/XML/1998/namespace">
  <name last="Marston" first="David">Mr. Marston</name>
  <name last="Bertoni" first="David">Mr. Bertoni</name>
  <name last="Leslie" first="Donald">Mr. Leslie</name>
  <name last="Farmer" first="Emily">Ms. Farmer</name>
  <name last="Midy" first="Myriam">Ms. Midy</name>
  <name last="Dick" first="Paul">Mr. Dick</name>
  <name last="Boag" first="Scott">Mr. Boag</name>
  <name last="Curcuru" first="Shane">Mr. Curcuru</name>
  <name last="Kesselman" first="Joseph">Mr. Kesselman</name>
  <name last="Auriemma" first="Stephen">Mr. Auriemma</name>
</doc>18%

I am having the same issue in my code.  Note that this only occurs when
serializing the document element node.

As always, any assistance would be greatly appreciated.

Thank you very much,

Jeff Hagan