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.


Received on Tuesday, 25 July 2006 17:06:30 UTC

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