W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

Re: DTD to Schema converter

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 3 Dec 2001 18:45:37 +0000
Message-ID: <94554807.20011203184537@jenitennison.com>
To: Stanley Guan <Stanley.Guan@oracle.com>
CC: xml-editor@w3.org, xmlschema-dev@w3.org
Hi Stanley,

> I am working on a converter to convert DTD declarations to Schema
> declarations. After reading the XML spec., I am still not clear
> what's the expected result for the following DTD declarations:
>    <!ELEMENT abc ANY>
> For this declaration, it does NOT have associated attribute type
> declarations with element type "abc".
> For a validating processor, does this mean:
>     1) element "abc" can have any attributes (i.e. wildcard attributes
> in Schema), or
>     2) element "abc" cannot have any attributes?

It means that element 'abc' cannot have any attributes. Element
declarations in DTDs only talk about the *content* of elements, unlike
complex type definitions that also talk about attributes. ANY content
is equivalent to a mixed complex type with a sequence of xs:any
wildcards that can occur any number of times.

> Note that the only thing I read in XML spec. is:
> All attributes for which no declaration has been read should be
> treated by a non-validating processor as if declared CDATA.

That's about the stuff that gets reported by non-validating processors
- ones that don't look at the DTD. DTDs don't support an 'any
attribute' wildcard.



Jeni Tennison
Received on Monday, 3 December 2001 13:45:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC