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

Namespaces and DTDs was RE: Namespaces and interoperability (was Re: SAX

  • From: "Borden, Jonathan" <jborden@m...>
  • To: "James Robertson" <jamesr@s...>, <xml-dev@i...>
  • Date: Sat, 6 Feb 1999 19:09:04 -0500

aaa sax
James Robertson wrote:

>
> Well, let me put it like this then:
>
> You are working out a structured interchange format. If you
> want structure, you'll need a DTD, otherwise there is absolutely
> no way of validating that you have got correct data.
>
> If you have a DTD, then namespaces are irrelevant: they simply
> don't work together in any meaningful way.
>
> Or to put it another way: allowing arbitrary nesting of someone
> else's tags doesn't achieve anything. You still have to know
> what to do with them when you receive them.
>
> In summary: get stuck into writing a DTD, and ignore this
> whole "namespaces" mess ...
>

	It has been previously discussed that we need to use the namespace prefix
as declared in the DTD in order to validate XML documents with namespaces.

	Would explicit declaration of namespace URIs as an attribute allow
*namespace aware validators* to correctly validate documents in namespace
URI dependent way as opposed to a prefix dependent way.

	Use attribute declarations to declare namespaces:

<!ELEMENT example (a|b|aaa:p|xxx:y)>
<!ATTLIST example
		xmlns:aaa CDATA #DEFAULT "urn:aaa"
		xmlns:xxx CDATA #DEFAULT "urn:xxx">
<!ELEMENT xxx:y (#PCDATA)>
<!ELEMENT html:p (#PCDATA)>

so

<example>
<aaa:p> whatever </aaa:p>
<xxx:y> something else </xxx:y>
</example>

is valid as well as

<example xmlns:bbb="urn:aaa"
	   xmlns:yyy="urn:xxx">
<bbb:p> another </bbb:p>
<yyy:y> example </yyy:y>
</example>

	Is this what has been suggested before (and I am just getting it :-)?


Jonathan Borden
http://jabr.ne.mediaone.net


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/ and on CD-ROM/ISBN 981-02-3594-1
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.