[
Lists Home |
Date Index |
Thread Index
]
- From: Peter Murray-Rust <peter@ursus.demon.co.uk>
- To: james anderson <James.Anderson@mecomnet.de>,Charles Frankston <cfranks@microsoft.com>
- Date: Wed, 05 Aug 1998 10:15:02
At 10:20 05/08/98 +0000, james anderson wrote:
[...]
>could someone please post a "complete document" (that is including a dtd) for
>the third example in section 5 of the draft (the one with the root element
"bk:book")?
I'll have a go (in my copy it's the second example);
<!DOCTYPE bk:book [
<!ELEMENT bk:book (bk:title, isbn:number)>
<!ATTLIST bk:book
xmlns:bk CDATA #FIXED "urn:loc.gov:books"
xmlns:isbn CDATA #FIXED "urn:ISBN:0-395-36341-6"
>
<!ELEMENT bk:title (#PCDATA)>
<!ELEMENT isbn:number (#PCDATA)>
]>
The point is - I think - that the DTD parser is completely dumb. It doesn't
care about colons (except to recognise that they are legal). I assume -
though I haven't tried it - that this DTD will validate the example with
any of the current parsers.
The main problem is that some authors are going to want to include more
information than title and number. This may also involve other namespaces.
So then the content model gets very complex and has to be revised often. So
we actually end up with:
<!DOCTYPE bk:book [
<!ELEMENT bk:book ANY>
<!ATTLIST bk:book
xmlns:bk CDATA #FIXED "urn:loc.gov:books"
xmlns:isbn CDATA #FIXED "urn:ISBN:0-395-36341-6"
xmlns:dc CDATA #FIXED "http://www.oclc.org"
xmlns:html CDATA #FIXED "http://www.w3.org/TR/REC-html40"
xmlns:xml-data CDATA #FIXED "http://www.w3.org/WD-xml-data"
<!-- ... etc. -->
>
<!ELEMENT bk:title (#PCDATA)>
<!ELEMENT isbn:number (#PCDATA)>
<!ELEMENT dc:author (#PCDATA)>
<!ELEMENT html:p ANY>
<!ELEMENT xml-data:foo (<!-- some content model -->>
<!-- ... etc. -->
]>
This implies the possibility of *locally valid information components* -
i.e. the XML-data content could be validated against that DTD but not the
larger document.
I also expect that there is a solution using Architectural Forms but I am
not an expert.
P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|