You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/06/18 18:08:03 UTC
DO NOT REPLY [Bug 9963] New: -
DOM2Writer doesn't treat the "xml" namspace specially
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9963>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9963
DOM2Writer doesn't treat the "xml" namspace specially
Summary: DOM2Writer doesn't treat the "xml" namspace specially
Product: Axis
Version: current (nightly)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@xml.apache.org
ReportedBy: pratik.datta@peregrine.com
The namespace "xml" is a special namespace. Lot of tools (especially
Microsoft's .NET wsdl.exe) cannot parse an xml document having an explict
declaration for the xml namespace.
For example if I have an XML document like this
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://tempuri.org" xmlns="http://tempuri.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Purchase order schema for Example.com.
Copyright 2000 Example.com. All rights reserved.
</xsd:documentation>
</xsd:annotation>
</xsd:schema>
Notice how the xml:lang="en" attribute uses the xml namespace without declaring
what xml namespace really is. This is perfectly valid. Some tools will give an
error if the namespace declaration exists.
When I parse this xml and serialize it back using the DOM2Writer, it makes it
like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://tempuri.org" xmlns="http://tempuri.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation xml:lang="en"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
Purchase order schema for Example.com.
Copyright 2000 Example.com. All rights reserved.
</xsd:documentation>
</xsd:annotation>
</xsd:schema>
The explicit declaration of xmlns:xml="http://www.w3.org/XML/1998/namespace"
causes problems with wsdl.exe.
Can you fix this problem?
Thanks
Pratik