xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Dewitt" <dewit...@us.ibm.com>
Subject Forcing validation to a particular DTD
Date Mon, 05 Nov 2001 17:44:54 GMT
I have asked this question before but did not get a response.  Am I sending
this to the correct address?

I have a situation that I would think is not that uncommon.  I have a UI
tooling application that works on XML documents using a particular
vocabulary.   These documents are consumed by a runtime engine that does
not do validation.  However, I would like to make sure when opening a
document that it conforms to the grammar for this vocabulary so that I can
intelligently notify the user if the document is not of the correct type.
If it does not validate, I will not work on it.  The problem is that the
tool can open existing files created outside of the tool that may not have
a DOCTYPE at all but nonetheless are still valid when used at runtime
(since no validation is performed).  So, if I open a file that has no
DOCTYPE, I'd like to force it to be validated against my DTD.  Ideally, I'd
actually like to be able to validate all files that I open against my DTD
and if they don't conform, inform the user that the file is unusable.
Validation/revalidation, however, is not something that current versions of
Xerces excel at.  There doesn't seem to be a way to do what I need to do
without somehow inserting my own DTD statement before the document is
parsed or to parse the document first, insert my DTD and then reparse with
validation on.

So my question are.

1) Is there a more elegant solution?
2) If not, will DOM3 address such issues?
3) Is there a better way to do this with Schemas, i.e. are they more

Scott DeWitt

Scott DeWitt                IBM WebSphere Transcoding Publisher
(919) 486.1919   t/l 526.1919

Space may be the final frontier,
but it's made in a Hollywood basement...
  - Chili Peps

In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message