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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   To validate or not to validate, that is the question

[ Lists Home | Date Index | Thread Index ]
  • From: "Martin Bryan" <mtbryan@sgml.u-net.com>
  • To: <xml-dev@ic.ac.uk>
  • Date: Mon, 17 Aug 1998 08:15:46 +0100

Let me see if I can suffer the slings and arrows of outrageous fortune and
pose you all a question: "Why do compound documents need to be validated as
a whole?"

The point of namespace proposal is to allow users to say "This part of my
document conforms to the rules specified in this DTD: that part of my
document conforms to the rules in that DTD. Here are some URIs that you can
use to find the rules used for checking each part of the document
structure."

If I create my document fragments using the relevant DTDs, I validate them
against those DTDs, not against a compound DTD. Once they have been
validated against the DTD I can import them into a compound document as
already validated fragments.

In the compound DTD all I need to do is to recognize when the same element
name has been used within the DTDs of two fragments. I then have two
choices:

1) To decide to change the name of one of the elements to a qualified form
to disambiguate it from the other (changing both the DTD and the previously
validated instance, so that I need to revalidate the document for safety
afterwards)
2) Change the model to the element concerned to ANY in the DTD and rely on
the fact that I have already validated the fragments against their own DTDs
to avoid any errors. (I may also have to change any attributes used by both
DTDs to CDATA to make sure there are no clashes in permitted values, but
this is equally trivial.)

As 2) is much simpler to manage I would do that in any case where I could be
sure that my imported fragments had been prevalidated.

Why does this group seem to feel there is an overpowering need to develop a
DTD that can be used to validate the compound structure, rather than its
individual fragments?

Martin Bryan


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