[XML-SIG] Validation question

Robb Shecter shecter@darmstadt.gmd.de
Fri, 07 May 1999 16:29:52 +0200


Lars Marius Garshol wrote:

> * Robb Shecter
> |
> | I'd like to set up an xml validation service.  I've done all my XML
> | programming in Java so far, but would like to try Python out.
>
> Cool! You are certainly most welcome here. :)
>

Great. I'm really interested in Python mostly because its dynamically
typed and has a decent amount of syntactic sugar - something Java is
sorely missing.  Comparing equivalent code for building and manipulating
a DOM is really an eye-opener.  You could probably make a catchy web page
with this idea... "Would you rather do this, or -this-?"

>
> | I'd like to have an object with a method that takes two parameters;
> | a dtd and an xml document, and returns true or false depending
> | whether the document conforms to the dtd.
>
> Using xmlproc you can easily do this. However, what do you do if the
> document contains a DOCTYPE declaration that points to something else?
> xmlproc would let you ignore that and use the same DTD anyway, but
> depending on your application this might not be a very XML-like
> approach.
>

Excellent.  That's what I'd do.  I'm making a middle-tier, and I don't
mind simply saying that the clients have got to get their XML right.

> I have nearly all the code needed to enable this with xmlproc, the
> only part missing being the handling of the internal subset.

I don't know what an internal subset is, so I guess I won't be needing
it. :) I've give xmlproc a look.

Thanks a lot,
Robb