[XML-SIG] XML Validation
chrish at cryptocard.com
Tue May 18 15:34:30 EDT 2004
Jason Mobarak wrote:
> In short: what methods do you use to validate proper structure of an XML
I'm using pyRXPU to validate and parse the document into a DOM (using a
pyRXPU -> DOM translator I wrote), along with a DTD.
> I'm definitely not an XML expert but from what I've heard my validation
> solution is not part of the "real" XML tool chain -- the valid
> structure of my document is described by Python code. I should be able
> to have a schema or DTD that specifies structure and valid content.
> However, DTDs seem limited, I haven't seen that they can verify the kind
> of complex structure that I might want, am I wrong?
DTDs very accurately and fairly concisely describe the _structure_ of the
document, schemas describe the possible _contents_ and most of the
structure. Yes, most of it, not all of it.
So, if you want to be 100% accurate in all cases, you need a DTD and an XSD.
It's been eight months since I used schemas for anything (previous job), so
I can't remember exactly which bits of the structure the schema couldn't
describe... oh, wait, maybe I can. It was the content model for each tag.
I don't think it could be properly expressed in the XSD.
Chris Herborth chrish at cryptocard.com
Documentation Overlord, CRYPTOCard Corp. http://www.cryptocard.com/
Never send a monster to do the work of an evil scientist.
More information about the XML-SIG