W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

Re: FW: JDOM XML Schema issue

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 17 Jul 2003 17:40:52 +0100
Message-ID: <195886702570.20030717174052@jenitennison.com>
To: "Garg, Badal" <BGarg@cvs.com>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

Hi Badal,

[Removed cross-post to www-xml-schema-comments@w3.org since that
mailing list is for comments on the XML Schema standard, and this
isn't a comment on the XML Schema standard. Actually, this message
hasn't really got anything to do with XML Schema at all...]

> The line in red is not the one I want in the xml. How can I get it
> to say xsi:noNamespaceSchemaLocation="ProductImage.xsd" reather then
> xmlns:noNamespaceSchemaLocation="C:/badal/amazon/ProductImage.xsd.

The code you're using to create this is:


Since you're saying "add a namespace declaration", the code is
adding a namespace declaration (an xmlns:prefix="URI" attribute).

If you want to add an attribute called xsi:noNamespaceSchemaLocation,
where 'xsi' is associated with the namespace
'http://www.w3.org/2001/XMLSchema-instance' then you need to use the
.setAttribute() method:


The first argument is the name of the attribute; the second argument
is its value; the third argument is the namespace that it belongs to.


Jeni Tennison
Received on Thursday, 17 July 2003 12:40:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:02 UTC