|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespace Comments (and dtd encoding)
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@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








