OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]
  • From: "Borden, Jonathan" <jborden@mediaone.net>
  • To: "James Robertson" <jamesr@steptwo.com.au>, <xml-dev@ic.ac.uk>
  • Date: Sat, 6 Feb 1999 19:09:04 -0500

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@ic.ac.uk
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@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)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS