[
Lists Home |
Date Index |
Thread Index
]
- To: Michael Kay <mike@saxonica.com>
- Subject: Re: [xml-dev] RE: Namespaces A Mess? (was: Candle 0.8 - a new scripting language for XML)
- From: bryan rasmussen <rasmussen.bryan@gmail.com>
- Date: Sun, 16 Oct 2005 09:09:00 +0200
- Cc: xml-dev@lists.xml.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nDQ2dQGNp2IcBK/AZWAF1w4vBhp+h1Bzwq+ZWitalt6ogxBY303j325JlkCc3+cOTyyJ9a/xbvXActmKSt760Nck4reFbYxv4cA38j0qTZsNVNRvs6moc4//32KF7FwXB8e/x8/yEglt0RAf9BgZ4kARHO1qMwAZsp5ld31nV7I=
- In-reply-to: <435190cf.0563b8a2.6920.5363SMTPIN_ADDED@mx.gmail.com>
- References: <20051015204527.5FC5314968E@pillage.dreamhost.com> <435190cf.0563b8a2.6920.5363SMTPIN_ADDED@mx.gmail.com>
>
> (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.
|