
Stefan Seefeld wrote:
But the DTD may not be available itself. In which case, no information is available. And in fact, for XSchema, RelaxNG, etc., there isn't even a reference to those in the document, so not even the name is available.
Actually, XSchema references the schemas through the schemaLocation and noNamespaceSchemaLocation attributes (in the schema instance namespace) of the root element. I don't know anything about RelaxNG.
(But this discussion suggests that in fact I may remove the DTD-related accessors from the document interface and make it freestanding. It may then evolve independently.)
Yes, that sounds good.
True. Perhaps an API for generalized schema access can be devised.
Yes, but that would be a separate API, independent from my current proposal. (Which is a good thing, as it favors modularity. Users who don't need validation don't have to pay for it.)
Of course not. Furthermore, documents which are not valid should still be parseable, as long as they're well-formed. Sebastian Redl