SV: [jdom-interest] Specify a XML schema in a Jdom document

Per Norrman pernorrman at telia.com
Mon Nov 24 02:33:56 PST 2003


With all respect, I think this is a better alternative:

		Element root = new Element("root",
Namespace.NO_NAMESPACE);
		Namespace xsi =
			Namespace.getNamespace(
				"xsi",
	
"http://www.w3.org/2001/XMLSchema-instance");
		root.setAttribute("noNamespaceSchemaLocation",
"schema.xsd", xsi);

/pmn


-----Ursprungligt meddelande-----
Från: jdom-interest-admin at jdom.org [mailto:jdom-interest-admin at jdom.org]
För Benjamin Kopic
Skickat: den 24 november 2003 10:59
Till: Cédric Pélissier
Kopia: jdom-interest at jdom.org
Ämne: Re: [jdom-interest] Specify a XML schema in a Jdom document


Try:

Element rootElt = new Element("root");
rootElt.setNamespace(Namespace.getNamespace("noNamespaceSchemaLocation",
"schema.xsd"));
rootElt.addNamespaceDeclaration("xsi",
"http://www.w3.org/2001/XMLSchema-instance");

I hope this helps.

Best regards,

Ben

On Thu, 2003-11-20 at 17:22, Cédric Pélissier wrote: 
Hi,
Is it possible to specify a xml schema when building a Jdom document ...
as
following
      Code:
      <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema.xsd">
      .....

There is a way to specify dtd but schema ??

thanks for any help ...

Cedric

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you
rhost.com
-- 
benjamin kopic
m: +44 (0)780 154 7643
t: +44 (0)20 7794 3090
e: benjamin.kopic at panContext.com
w: http://www.panContext.com/




More information about the jdom-interest mailing list