[jdom-interest] Namespace not supported by SAXParser
John Muhlestein
jmuhlestein at i-link.net
Tue Jul 17 14:19:47 PDT 2001
I seem to be running into a problem transforming a document. If I pass in a
document
<?xml version="1.0" standalone="yes" ?>
<b2b xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation='http://devboard/xml/whlsl3.xsd'>
<vendor>
<vendorid>NETLINX</vendorid>
<vendorpwd>netlinx</vendorpwd>
</vendor>
<provision>
<newuser>
<firstname>John</firstname>
<lastname>Quick</lastname>
<prdcd>VL1</prdcd>
<remoteaddr>255.255.255.0</remoteaddr>
<supplieddid>8019692154</supplieddid>
<featurelist>
<feature>10</feature>
<feature>70</feature>
</featurelist>
<externaluserid>weirdnumber</externaluserid>
<adminfl>T</adminfl>
<email>johntest at testing.com</email>
</newuser>
</provision>
</b2b>
The transformation works fine. If I build the exact same document
programatically and attempt to transform I get an exception.
Namespace not supported by SAXParser
I am using the latest build (7/17/2001) and had the same problems with a
build from approx 1 month ago.
I am including a snippet of the code which creates the xml, my schema
definition and my stylesheet
thanks in advance,
John
<<whlsl3.xsl>> <<whlsl3.xsd>> <<javasnippet.txt>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: whlsl3.xsl
Type: application/octet-stream
Size: 9602 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010717/6a56f72d/whlsl3.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: whlsl3.xsd
Type: application/octet-stream
Size: 4735 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010717/6a56f72d/whlsl3-0001.obj
-------------- next part --------------
Namespace xsi = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
Attribute xsl = new Attribute("noNamespaceSchemaLocation", "http://devboard/xml/whlsl3.xsd", xsi);
Element b2belt = new Element("b2b")
.addContent(new Element("vendor")
.addContent(new Element("vendorid")
.addContent("NETLINX"))
.addContent(new Element("vendorpwd")
.addContent("netlinx")))
.addContent(new Element("provision")
.addContent(new Element("newuser")
.addContent(new Element("firstname")
.addContent("John"))
.addContent(new Element("lastname")
.addContent("Quick"))
.addContent(new Element("prdcd")
.addContent("VL1"))
.addContent(new Element("remoteaddr")
.addContent("255.255.255.1"))
.addContent(new Element("supplieddid")
.addContent("8019694159"))
.addContent(new Element("featurelist")
.addContent(new Element("feature")
.addContent("10"))
.addContent(new Element("feature")
.addContent("70")
)
)
)
);
b2belt.addNamespaceDeclaration(xsi);
b2belt.setAttribute(xsl);
originalDoc = new Document(b2belt);
More information about the jdom-interest
mailing list