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

Combining DTDs

  • From: Peter Murray-Rust <peter@u...>
  • To: xml-dev@i...
  • Date: Fri, 11 Sep 1998 17:21:24

combine dtds
At 17:28 11/09/98 +0200, Ron Bourret wrote:
[...]
>
>I suggest that a short-term solution for the latter is to simply combine 
>elements from different DTDs as one sees fit.  Although the resulting
documents 
>are not valid wrt their original DTDs and cannot be used by DTD-specific 
>applications, XML does not require valid documents and the use of standard
tags 
>facilitates the search process.  I am advocating a certain degree of anarchy 
>here, but the Web is inherently anarchic and if we wait until we find a
way to 
>combine DTDs without breaking DTD-specific applications, we're missing the 
>chance to build some extremely useful applications right now.
>
>(By the way, a nice feature of XML editors that would help this along
would be 
>to read DTDs/schemas from said Yahoo-like repositories, let users insert 
>elements whereever they want from whatever DTDs/schemas they want, and
generate 
>new DTDs as requested.)
>
I agree with this. I have written two DTDs in XML (CML and VHG) both of
which have to interoperate with other *unknown* DTDs. As a simple example,
a paper in chemical physics requires (at least) xHTML, MathML, CML, RDF and
DC. It is inconceivable that a generic DTD can be created that has valid
content models for all conceivable applications in this domain. [It *is*
conceivable that the J.Chem Phys produces a DTD and it's also highly
probable that if J. Phys Chem also does it would use a different one.] I
cannot see how, except in very carefully regulated domains (such as legal,
patent, regulatory) it will be possible to combine generic DTDs to provide
a useful mixture. For example, if someone wishes to embed a <price> in a
<molecule> this is a perfectly possible and reasonable thing to do. Why
should I say they can't?

Example:
<molecule>
  <price currency="USD" unit="litre">1.0</price>
  <atomArray builtin="element">O H H</atomArray>
</molecule>

This does NOT break my software because it simply scans for things it knows
about in content (e.g. <atomArray>). Similarly it's perfectly possible to
scan the document with XLink/Xpointer (whenever they get finalised) to find
a <molecule> with a descendant of  type <price> with attributes of
currency. <price> could easily come from a well defined DTD, as will
<molecule>. This is - and has to be - the approach that CML takes. So
almost all XML-elements will have to have ANY content. This is a pity,
because I'd like to be able to insist that <molecule> contained
(atomArray)* - yes a molecule without atoms is conceivable. I think that
schemas must allow for this - and I believe that XSchema does.

The other approach is to allow links - and I really wish that we could see
some work going on here. There are two ways - one is to have a link on the
molecule, e.g.:
<molecule id="H2O" href="price.xml#water">...

and the other is to have a link database (I have missed out the other XLink
attributes for brevity and because I can't remember the current version of
the spec):

<extendedLink title="chemical catalogue">
  <locator href="molecules.xml#H2O"/>
  <locator href="prices.xml#H2O"/>
</extendedLink>

This is perhaps cleaner, but it's a lot more complicated and not many
people (with 2-3 honourable exceptions) seem to be interested in developing
XLink applications or software.

	P.


 
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg

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/
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.