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

Re: life support for DTDs? was RE: misprocessing nam


re life
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

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.