|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: simple question on namespaces.
On 28th December 2000, Tim Bray wrote:- > "What can you do with little chunks of XML when they *don't* > have names unique across the Net?" The answer is "Not much." Note this interesting little quote from TimBL: "A namespace URI must be used to identify the language. XML should be consisdered to include XML 1.0 and Namespaces." - [1] This re-asserts the point that you make that if an XML fragment doesn't have a unique name, you can't really do much with it: because you simply can't tell what it *is*. > It is however fine and I think useful to argue about what kinds of > semantics are usefully associated with chunks of markup, Tough call. It is useful to have a namespace to make clear the intent of the XML itself. For example, the "beginners" example is always something like: <p> could mean anything (person, penguins, painting), but <p xmlns="http://www.w3.org/1999/xhtml"> means a paragraph. In other words, we have a general semantic level here telling us what the element <p> stands for: <paragraph>. Of course (at the moment) there is no definition made in the XHTML namespace of what a pargraph is, or what its structuring and content model is - for that you have to look in the specification. As for the more complex semantics, such as content modelling, RDF modelling, and even ontologies, we have to look at the "namespace to semantics mapping techniques"... > whether namespace provide a useful grouping mechanism I don't think many people would disagree with the fact that namespaces provide a useful grouping mechanism for identifying XML. > and what some good ways are to map from the namespace to the > semantics. I don't believe that dereferencing the URI can be a > complete solution, but I don't think ignoring the fact that the URI > can be dereferenced is very smart either. Well, the fact that namespaces are names as in "URI names" is of course interesting because of the fact that URLs are a subset of URIs. I agree that dereferencing a namespace isn't a complete solution, but the fact that http:// and ftp:// URIs *can* be dereferenced does have its uses. If a system can expect to find something of use by dereferencing a namespace, then it might as well do so. If it can't, then it might be able to recognize the namespace anyway (like an XHTML processor should). If it can't do either, then it can at least know that one bit of XML has its own unique name, and therfore can't be confused with a fragment of XML with a different name. Take a look at my signature for a novel play on that (at the end of this email). Further example: RDF uses namespaces to point to RDF Schemas (in most cases - for example, the RDF namespace [2]), and it may be that SW systems *have* to dereference them to gather further information. They can be sure that the thing that they are dereferencing is going to be an RDF related language, and if they can't recognize it directly, they might be able to further dereference it until they reach a language that they *do* recognize. I suppose when you reach an XML document who's namespace points to itself, it should be self describing [for example, the XML Schema for XML Schema (does anyone have a URI for that?)]. I believe that although namespaces can be used on many semantic levels, at least there is some benefit to using them at any of these levels. [1] http://www.w3.org/DesignIssues/Architecture.htm [2] http://www.w3.org/1999/02/22-rdf-syntax-ns# Kindest Regards, Sean B. Palmer <sbp xmlns="http://infomesh.net/sbp/"/>
|
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
|
|||||||||

Cart








