[jdom-interest] FW: xerces and jdom-beta5 question

Kesav Kumar kesavk at voquette.com
Tue Oct 24 16:29:18 PDT 2000

Use the following code

	Element doc = new Element("Document");
	Namespace ns = Namespace.getNamespace("xsi",
	Attribute att = new Attribute("noNamespaceSchemaLocation",
"slp.xsd", ns);

It works there is no problem with namespaces after the Brett fix.

Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:kesavk at voquette.com

-----Original Message-----
From: Sibon Barman [mailto:sibon at ss8networks.com]
Sent: Tuesday, October 24, 2000 3:06 PM
To: jdom-announce at jdom.org; jdom-interest at jdom.org
Subject: [jdom-interest] FW: xerces and jdom-beta5 question

-----Original Message-----
From: Sibon Barman [mailto:sibon at ss8networks.com]
Sent: Tuesday, October 24, 2000 5:52 PM
To: xerces-j-dev at xml.apache.org; jdom-interest-request at jdom.org;
jdom-announce-request at jdom.org
Subject: xerces and jdom-beta5 question

Hi all,
I am trying to generate a document with root element as follows:
<document xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
I declare my root element in the above way so that I can use Xerces for
later parsing and validating with schema --- unless the Xerces gurus know a
different way of specifying the schema location.

I use the following piece of code for generating the above (using jdom-beta5
new Element("document")
            .addAttribute(new Attribute("xsi",

            .addAttribute(new Attribute("noNamespaceSchemaLocation",
            "slp.xsd", Namespace.getNamespace("xsi", "slp.xsd")));

and what I get out of this code snippet is:

<document xmlns="http://www.w3.org/1999/XMLSchema-instance"

So you can see that's not what I need  ---- is there anyone with ideas on
how to accomplish the  generation of the root element as specified at the
begining of the email using jdom.


To control your jdom-interest membership:

More information about the jdom-interest mailing list