Re: RE: Namespaces A Mess? (was: Candle 0.8 - a new scripting
> > (b) are namespace declarations information-bearing? For example, are the two > documents below equivalent: > > (1) <a xmlns:x="x"><b/></a> > (2) <a xmlns:x="x"><b xmlns:x="x"/></a> > > (c) are in-scope namespaces that are not referenced information-bearing? For > example, are either of the above documents equivalent to: > > (3) <a><b/></a> > > (the main problem here, of course, is "QNames in content": the use of > namespace-sensitive element and attribute values. But there are also > applications that use the mere presence of a namespace declaration as a flag > or marker.) Well I've done this before, but my reason was not because I assumed that the mere presence of a namespace was information bearing but that the presence of a namespace and something in that namespace was information bearing and that one could reasonably assume that if a document were not psychopathic (I can't remember if Joe English had a particular term for this type of document, I will call it psychopathic) then it would have something in the namespace if the namespace were declared. This is of course not always the case, especially if a document has been through a transform. But the reason why we might decide to behave as though it were the case is that it would be wasteful to check through the document for something in the namespace after the namespace was found. Note: my application was web based, you reload the document as a new application dependent on what secondary namespaces are found. Thus if you have an RDF document you first load it as RDF, producing a graph with some links to search engine queries against particularly interesting parts of the graph, and if it has a FOAF namespace then you get a link allowing you to reload the document as FOAF, getting a particular nice display of your FOAF relationships. > (d) are prefixes information-bearing? That is, is document (1) equivalent > to: > > (4) <a xmlns:y="x"><b/></a> > > (again, the problem is "QNames in content") no prefixes are not information bearing in the explicit sense, they are information bearing in the datamining sense, for example if the instance of a commonly known format with a commonly used prefix has a different prefix we than the commonly used one we can increase the possibility that the instance was authored by somebody of higher technical competence. Other things we could use to presume technical competence, if the commonly known prefix is longer than the chosen prefix, if the document is structured in such a way that a default prefix is used so that the elements in the most used namespace do not require a prefix. This could also indicate that the document was 'hand-written' with a more flexible editor (I am assuming some sort of Bayesian reasoning application about XML documents) Other than that though I don't see how anyone could ever argue that prefixes are information bearing. Has anyone made this argument? > > (f) DTDs are an intrinsic part of XML, but DTDs are not namespace-aware. Are DTDs really an intrinsic part of XML? This seems so 1999. Let's assume that DTDs and namespaces are at odds, it seems that namespaces are the clear winners in their battle. I hardly ever see DTDs to do validation anymore, only to shove some entities in.
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