Linking a XML document to its schema

Didier PH Martin martind at
Wed Nov 24 22:10:43 GMT 1999

Hi Jeff,

Jeff said:
As I understand it, there is nothing PREVENTING you from doing this. In
fact, RDF does in fact (I think) use namespaces this way. I think the
problem came from the fact that the namespace facility does not INHERENTLY
make any connection between content and schema. A namespace attribute could
point off into the Delta quadrant, as long as it points to a unique planet
within the delta quadrant.

Didier reply:
This is precisely my concern. Actually the name space URI is used for nearly
nothing because it may point, as you said, to the delta quadrant and this
would not be of no importance. If the URI would instead point to a schema
reference and that the schema reference would have as scope the same scope
as the name space has, then, a validating parser could validate the document
composed of diverse fragments.

So, in this case, among the XML problems we would have:

1 - XML document to style sheet linkage (resolved)
2 - XML fragment to style sheet linkage (unresolved and undefined as
specified the scope is the whole document)
3 - XML document linkage with schemas (resolved if name space URI points to
4 - XML fragment linkage to schemas (resolved if name space URI points to
schemas and that the schema scope is the same as the name space scope)
5 - XML document linkage to its metadata (unresolved - if the RDF format
could be used to associate metadata to XML documents)
6 - XML fragment linkage to its metadata (unresolved - if the RDF format
could be used to associate metadata to XML documents)

I could say however that if 3 and 4 are resolved then 5 and 6 also.

However, there should be also provision to be able to include a schema in
the document instead of having it defined externally. So, something like

<MyFragment xmlns="#mySchema">
<xml:schema id="MySchema">
....Schema content here ....
...fragment content here ...

I used xml:schema so that this element is also part of a namespace and to be
cautious about the fact that a particular vocabulary main contain also this
same name. Also, because a Schema defines an XML document and therefore it
make sense that schemas are part of this name space.

The good point about linking a schema to a name space is that I can include
other fragments owned by other name spaces and the document could still be
valid and be parsed by a validating parser.

Didier PH Martin
mailto:martind at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as: and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list