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

Re: DTD to Schema converter

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 7 Dec 2001 15:03:15 -0500
To: Jeni Tennison <jeni@jenitennison.com>
Cc: Stanley.Guan@oracle.com, xmlschema-dev@w3.org
Message-ID: <OF0B0F673B.4EBD9DE3-ON85256B1B.006E5E2C@lotus.com>
Jeni Tennison writes:

>> Sorry, Noah, you misinterpreted what we 
>> were talking about. If you look back at 
>> the thread, you'll see we were talking 
>> about ANY as the content models of element 
>> declarations *in DTDs* and what content
>> model it would equate to in XML Schema.

Mea culpa.  Actually, someone else had asked the equivalent question about 
schema, and I guess it was on my mind.

>> Stanley stated that an element declaration *in a 
>> DTD* with an ANY content model did not allow 
>> text and hence was not equivalent to a
>> mixed complex type.

>> If you can referee on that point, I'd be very 
>> grateful :)

I am not an expert on DTDs.  The XML spec says [1]:

Validity constraint: Element Valid
An element is valid if there is a declaration matching elementdecl where the Name matches the element type, and one of the following holds:
1.      The declaration matches EMPTY and the element has no content.
2.      The declaration matches children and the sequence of child elements belongs to the language generated by the regular expression in the 
content model, with optional white space (characters matching the 
nonterminal S) between the start-tag and the first child element, between child 
elements, or between the last child element and the end-tag. Note that a 
CDATA section containing only white space does not match the nonterminal S, and hence cannot appear in these positions.
3.      The declaration matches Mixed and the content consists of character data and child elements whose types match names in the content model.
4.      The declaration matches ANY, and the types of any child elements have been declared.

Comparing the clauses above, I infer that ANY matches only element 
content, since "mixed" goes to some trouble to talk about characters. 
Again, I have no specific background here, just reading the spec.  Hope 
I've got it right...I find the wording a bit ambiguous.

[1] http://www.w3.org/TR/REC-xml#elementvalid

Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
Received on Friday, 7 December 2001 15:15:06 UTC

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