Re: [xml-dev] A prose description of traversing all the schemas? An algorithm for how to traverse all the schemas?
From: Michael Kay <mike@saxonica.com>
To: "Costello, Roger L." <costello@mitre.org>
Date: Sat, 16 May 2015 18:23:51 +0100
On 15 May 2015, at 20:02, Costello, Roger L. <costello@mitre.org> wrote:
Hi Folks,
Recall that an XML Schema can reference other schemas, using the include and import elements.
Start by getting the terminology right. Schema documents reference other schema documents. A “schema” is a collection of schema components, and contains no trace of which schema document defined each component.
And those schemas can then reference other schemas. And so forth.
I am writing a description of this. Specifically, I am writing two things:
1. A prose description of traversing all the schemas.
2. An algorithm for how to traverse all the schemas.
The prose description must be technically correct, but also understandable by a non-technical person.
I guess by “technically correct” you mean it should match what the spec says? But the spec leaves a lot of room for implementation variations (sadly).
If a schema is encountered a second time, it is not examined again.
If you change that to “schema document”, it leaves you with the problem of deciding whether you have encountered the “same” schema document that you encountered earlier. You need to explain how to decide whether two schema documents are the same schema document. The spec does not do this well.
It gets particularly troublesome with xs:redefine, of course.