[jdom-interest] Namespace not supported by SAXParser

Brett McLaughlin brett at newInstance.com
Tue Jul 17 16:55:35 PDT 2001

   Namespace xsi = Namespace.getNamespace("xsi",
   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(new Element("vendorpwd")
     .addContent(new Element("provision")
       .addContent(new Element("newuser")
         .addContent(new Element("firstname")
         .addContent(new Element("lastname")
         .addContent(new Element("prdcd")
         .addContent(new Element("remoteaddr")
         .addContent(new Element("supplieddid")
         .addContent(new Element("featurelist")
           .addContent(new Element("feature")
           .addContent(new Element("feature")
   originalDoc = new Document(b2belt);

Try and remove the line "b2belt.addNamespaceDeclaration(xsi);". You don't
need to explicitly add any namespaces if elements or attributes in the
document use them, as JDOM handles it all internally. I really don't think
that will make a difference, but it's worth trying.

Additionally, can you try your transform without the stylesheet reference?
It shouldn't be required for the transformation, and it would at least
isolate the trouble spot, right? Once you've done that, let us know the
results, and we'll troubleshoot some more.

Brett McLaughlin
Enhydra Strategist:   http://www.enhydra.org
Lutris Technologies: http://www.lutris.com
O'Reilly Author:       http://www.newInstance.com

More information about the jdom-interest mailing list