[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Namespace Comments (and dtd encoding)

  • From: Peter Murray-Rust <peter@u...>
  • To: james anderson <James.Anderson@m...>,Charles Frankston <cfranks@m...>
  • Date: Wed, 05 Aug 1998 10:15:02

dtd xmlns
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.