Re: RDFa reliance on namespace declaration

Ian Davis wrote:
> 
> Mark,
> 
> Thanks for the detailed reply. If I'm understanding correctly, I take
> your position to be something like: "using xslt with qnames in content
> is safe unless you are deliberately removing namespace nodes". Am I
> correct?
> 
> The evidence you cite is that "XSLT is used in hundreds of thousands of
> applications every day, to process documents that contain QNames in
> their attributes."
> 
> I don't dispute the fact that we all use a lot of XSLT. But I don't
> believe that qname in content safety is anywhere specified in the XSLT
> recommendation and, as I pointed out, it is explicitly stated that
> prefixes may be changed by processors. The reason few errors are
> encountered are primarily through the use of conventions for namespace
> prefixes such as foaf, cc, xsl, xs, etc.
> 
> An application is, of course, free to choose any namespace prefix it
> desires. Try, for example applying this stylesheet to the xml that follows:
> 
[snip]
> 
> 
> I find in MSXSL and in XSLTPROC that the qname in the property attribute
>  has changed it's binding. I'd be interested to see your results.
> 
> 
> On 17/06/2006 17:31, Mark Birbeck wrote:
>> However, since the theme of this discussion is that we need to avoid
>> using QNames in attributes--and invent alternatives--then it's
>> obviously important to continue with the XSLT-specific discussion
>> here.
> 
> Or we can switch to SAX pipelines, or XML databases, or any system that
> may parse, manipulate and then serialize an XML document.
> 
> 
> 
> Ian


I echo Ian's concerns when processing/generating XML from databases. For
example, I'm currently generating Atom entries from an RDF database, but
the content of the Atom entry is XHTML containing RDFa. A lot of the XML
is not always under my control and so are the prefixes.

>From Ian's initial email I understood immediately what he's been trying
to convey patiently over several emails, mostly because of past
experiences. For example, in my python RDFa parser, I'm not keeping
track of the prefixes (and I certainly don't have to any reason besides
aesthetics), therefore when RDFLib serializes the RDF model you get ugly
prefixes such as _1,_2,_3, etc, but the model is still isomorphic to the
 original RDFa document model.

Ian, am I correct on the following:

An XSLT processor is not required to maintain the same namespace
prefixes as in the original document and worse yet, it's not required to
  keep track of QNames in attribute values. Hence, we could have RDFa
terms resolved to an incorrect namespace against the processed document.

Please let me know, I'm missing the point the discussion, I'm known for
doing so.

-Elias

Received on Saturday, 17 June 2006 21:54:31 UTC