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

Re: Need solutions

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 22 Sep 2003 15:03:11 +0100
Message-ID: <96241134453.20030922150311@jenitennison.com>
To: Raj sekar <sekar_does@yahoo.co.in>
Cc: xmlschema-dev@w3.org

Hi Rajasekar,

> I have one problem in validating a xml with schema.Actaully i have
> one well formed xml document.Now ihave to write a schema.

To start with, the XML document that you posted was not well-formed.
The 'xmlns' attribute on the <book> element didn't have any quotes
around it, and the start tag of the last element within the <book>
element was <new:> whereas its end tag was </new:illustrator>.

In addition, it didn't comply with the XML Namespaces Recommendation
because it didn't have a namespace declaration for the 'new'
namespace. You need to add an xmlns:new attribute to your <book>
element, something like:

<book xmlns="http://www.w3schools.com"
      xmlns:new="http://www.example.com/new">
...
</book>

I suspect that the lacking namespace declaration was the cause of the
error that you're getting:
> I'm working in XML SPY and websphere, I'm not able write the
> schema,whenever i generate schema from both the IDs , i got errors
> the <xmlns:new> is not valid..

If you continue to have problems, I suggest that you post the schema
that you're trying to use, and the corrected XML document that you're
trying to use it with.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Monday, 22 September 2003 10:03:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT