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

Re: Come On, DTD, Come On! Thoughts on DSDL Part 9

mac.com homepage

Alternative to extending DTD notation with redundant namespace declarations, one can simply recognize those attribute
declarations which will already need to exist and propagate the imputed constraints among type declarations.

see below and "http://homepage.mac.com/james_anderson/XML/code/xquerydatamodel/qnames.html"

John Cowan wrote:
> ISO/IEC 19757-9 is currently an empty hole titled "Datatype- and
> namespace-aware DTDs".  This is a ragbag of ideas to fill that hole.
> I am assuming that the context for extending DTDs is not redefining
> XML, but rather creating an enhanced XML DTD format which can be used by an
> external validator.  Examples of existing external validators are Jing
> for RELAX NG, XSV for W3C XML Schema, and Sun MSV for many different
> schema formats (including DTDs).  Enhanced DTDs would not be acceptable
> to XML validating parsers.
> I think the following enhancements to standard XML DTDs are worth
> considering.  They are directed to making DTD authoring easier and
> more flexible.  Nothing is introduced that is beyond the current schema
> language state of the art.
> 1) The NS declaration.  Declarations of the form <!NS name SYSTEM "uri">
> are allowed to define the namespaces associated with CNames in ELEMENT
> and ATTLIST declarations.  As is the case for other schema languages, in
> the presence of a known prefix, name matching is done on the universal
> name (URI + local-part) rather than the CName.  The default namespace
> is declared using #DEFAULT in place of the name.
> Example:
> <!NS foo SYSTEM "http://www.example.com/foo">
> <!NS bar SYSTEM "http://www.example.com/bar">
> <!ELEMENT foo:a (foo:b)>
> <!ELEMENT bar:a EMPTY>


? (write-node
  "<!DOCTYPE a [
    <!ELEMENT foo:a (foo:b, bar:a)>
    <!ELEMENT foo:b (bar:a)>
    <!ELEMENT bar:a EMPTY>
    <!ATTLIST foo:a xmlns:foo CDATA 'http://www.example.com/foo' >
    <!ATTLIST bar:a xmlns:bar CDATA 'http://www.example.com/bar' >
    ] >
  <foo:a > <foo:b><bar:a/></foo:b></foo:a>")
 *trace-output* :pretty t :encoding :usascii)
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
 <!ELEMENT foo:a (foo:b, bar:a) >
 <!ATTLIST foo:a 
   xmlns:foo CDATA  'http://www.example.com/foo' >
 <!ATTLIST foo:a 
    xmlns:bar CDATA 'http://www.example.com/bar' >
 <!ELEMENT foo:b (bar:a) >
 <!ELEMENT bar:a EMPTY >
 <!ATTLIST bar:a 
   xmlns:bar CDATA  'http://www.example.com/bar' >

<foo:a xmlns:foo='http://www.example.com/foo'>
  <bar:a xmlns:bar='http://www.example.com/bar' />
#<DOC-NODE <no uri> #x98957DE>



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.
First Name
Last Name
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.