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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] life support for DTDs? was RE: [xml-dev] misprocessing nam

[ Lists Home | Date Index | Thread Index ]

On Fri, Feb 01, 2002 at 04:37:35AM +1100, Rick Jelliffe wrote:
> Actually, it does not even need any change in DTD syntax AFAIK. 
> It just needs a change in the way that validation is performed using DTDs.
> 
> The validator needs to understand that given
>     <!ATTLIST x   xmlns CDATA "123">
> or
>     <!ATTLIST x   xmlns CDATA #FIXED "123">
> etc. that an instance with
>     <y:x   xmlns:y="123">  
> is correct. 

At the risk of looking like a fool (having started reading the thread
half way through), I don't quite understand the above. I would have
thought you would have done something like (syntax is indicative only)

<!XMLNS y "http://foo.bar/baz/";>
<!XMLNS q "http://rumplestiltskin.com/";>
<!ELEMENT y:x (y:a, q:a)>
<!ELEMENT y:a (#PCDATA)>
<!ELEMENT q:a (#PCDATA)>
<!ATTLIST q:a age CDATA #IMPLIED
              q:type CDATA #FIXED "123">

The name spaces would be in scope for the DTD only (not instances).
It would allow you to mix different namespaces in one DTD. There would
be some scoping ssues to be resolved because you would want to import
other DTDs and not accidentally collide on namespace prefixes
(eg: DTD namespace declarations are local to the current external entity
or something like that).

The DTD parser would have to be changed to expand the NS's. I think
not extending the sytnax of a DTD (by reusing ATTLIST) is not worth it.
I think its better to highlight its something different since the
processing of the DTD has to change anyway. (Two namespace prefixes
bound to the same URI should map to the same thing so the DTD parser
has to do namespace resolution, so the DTD processor *must* change).

I think DTDs have not died because they are readable by humans and
not too complex. XML Schemas might be powerful, but they can be very
hard to interpret.

Sorry if I am off the track.

Alan




 

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

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