[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces and Schemes
"Sean B. Palmer" wrote: > My question again: "Now, I want to 'attach' a scheme [sic] to the namespace, > that tells both humans and parsers not only what the content and structure > of the document is, but what it means as well. Question: How do I best go > about doing this?" There are several approaches, each of which have different tradeoffs: 1) If you control the domain of the namespace name, then put just plonk some semantic schema there. Pro: easy. Con: lucky dip. 2) If you control the domain of the namespace, and it already has an XML Schema there, then stick your semantic schema inside the XML Schema using appinfo. Pro: have cake and eat it. Con: still a lucky dip. 3) Use the namespace URL as the base: get a directory listing back (in what format?) and look for any file with an extension that matches the well-known extension for your file type. Pro: extensible. Con: to-and-fro. 4) Use content negotiation with the request on the namespace name, to request that the resource be sent back as the MIME type you want. Pro: extensible. Con: content negotiation is meant to retrieve different renderings of the same resource, but this uses it to get data that has different meaning. 5) Put a catalog in some format at the URL (SOCAT, DrLove, UDDI??) and then use that to locate the appropriate resource. Pro: see 3. Con: see 3. 6) Establish some resource discover service, perhaps using RDF, and then have that tell you the schema for the namespace. Pro: distributed. Con: publicity. 7) Add some strong hinting mechanism to the instance to tell it where the schema is, and then use the appropriate declarations in that schema for the namespace. (i.e. xml-schemas solution) Pro: attachment is by markup not by convention. Con: people will think that this is somehow not simple. Cheers Rick Jelliffe
|
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
|