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

Re: How to use DTD and Schema in the single XML file?

From: Mukul Gandhi <gandhi.mukul@gmail.com>
Date: Tue, 25 Jul 2006 22:36:22 +0530
Message-ID: <7870f82e0607251006g3e4d616cv7cbe903f05752aed@mail.gmail.com>
To: Balakrishnan <balakrishnan@alden.co.in>
Cc: xmlschema-dev@w3c.org

On 7/25/06, Balakrishnan <balakrishnan@alden.co.in> wrote:

> I using DTD for parsing the XML file,

DTDs are not used to parse XML. The XML parser parses XML data. DTDs
are used to specify the structure of XML, against which you validate
the XML instances.

>Suppose the xml have 100 elements and
> I want to validate just 10 element then How can I write the schema? and
> validate?

I don't think you can perform validation like this. You have to write
a DTD or a XSD schema for the whole XML. You validate the XML instance
against the whole DTD/XSD.

Regards,
Mukul

http://gandhimukul.tripod.com
Received on Tuesday, 25 July 2006 17:06:30 GMT

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