Lists Home |
Date Index |
- From: Norman Walsh <firstname.lastname@example.org>
- To: email@example.com
- Date: Wed, 09 Aug 2000 14:49:04 -0400
/ Wayne Steele <firstname.lastname@example.org> was heard to say:
| I think you are mistaken.
| The kind of mixing of DTDs that you're discussing is perfectly legal and
| acceptable with XML 1.0.
| If I declare
| <!ELEMENT foo (#PCDATA)* >
| <!ELEMENT FooList ( foo )+ >
| There is _NO_ constraint that foo elements only appear inside FooList
True, but it is a constraint that only foo elements occur inside a FooList.
| I could quite legally have <!DOCTYPE foo ... > in my document.
| I could also have an internal subset, that declares
| <!ELEMENT FooBarList ( foo | bar )* >
| and then mix foo elements side-by-side with bar elements.
Nope, you couldn't. That would violate the "Unique Element Type
Declaration" validity constraint. You could get the desired effect
with appropriate parameter entities, though, so nevermind :-)
| As long as names don't clash, there should be no problem.
| If something in dtd1 had a content model on "ANY", I can now take any element
| I choose from dtd1 or dtd2, and stick it in there.
Right, but explicitly because you used the content model ANY in dtd1.
If dtd1 declares
<!ELEMENT FooList ( foo )+ >
and dtd2 declares my:foo, you *cannot* say:
| DTD Validation is intended to allow documents to specify the model and
| constraints they adhere to, not to force documents to conform to some outside
Those are two sides of the same coin, aren't they? A document conforms
to the constraints that it claims to adhere to if and only if it
conforms to the DTD (outside spec) that defines the constraints.
| 2. XML Documents can always override or add their DTDs with an internal
In practice, this requires that the external subset DTD be defined with
appropriate parameter entities.
| 3. A DTD cannot specify what the "root" or Document Element, or "DOCTYPE"
| should be. An XML document can declare itself to be any element that is
| defined in the DTD.
Yeah, but I don't see how that's relevant.
Be seeing you,
Norman.Walsh@East.Sun.COM | Great men too make mistakes, and many among
XML Technology Center | them do it so often that one is almost
Sun Microsystems, Inc. | tempted to call them little