RE: Linking a XML document to its schema
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 schemas) 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 .... </xml:schema> ...fragment content here ... </myFragment> 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. Cheers Didier PH Martin mailto:martind@n... http://www.netfolder.com xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1 To unsubscribe, mailto:majordomo@i... the following message; unsubscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format