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


Help: OASIS Mailing Lists Help | MarkMail Help



   Combining DTDs

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: xml-dev@ic.ac.uk
  • Date: Fri, 11 Sep 1998 17:21:24

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
>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
>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
>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?

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

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

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.


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

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