- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Sun, 18 Jun 2006 13:34:04 +0100
- To: "Elias Torres" <elias@torrez.us>
- Cc: public-rdf-in-xhtml-tf@w3.org
Hi Elias, > 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. I'd be surprised in that particular use case if it wasn't doable with XSLT 1.0. Are you saying that you lose prefixes, or that they are arbitrarily changed by the XSLT processor? > >From Ian's initial email I understood immediately what he's been trying > to convey patiently over several emails, mostly because of past > experiences. Hopefully, we've all been patient ;) But I have to say though, that the first issue Ian raised was that copying fragments removed prefixes, and I described how I was unable to reproduce that, and furthermore that I wouldn't expect it anyway, from the way that XSLT works. This is significant because much earlier in the dicussion Henry asked why using a different scoping mechanism to namespaces would necessarily solve the problem: "Why does this make them less vulnerable to being lost during transformations?" Ian replied: "The risk remains but is of a much lesser degree and of a different nature. The identity XSLT transformation will leave content alone, but could quite easily change namespace prefixes." I've explained and shown how XSLT does not arbitrarily change namespace prefixes, and verified this as far as possible with all the processors I have available to me. > 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. Do you mean that when you send the XHTML+RDFa back out again, the prefixes will have changed? If so, why does that matter, as long as they match the namespaces? And I'm assuming that it's possible to generate XHTML+RDFa with aligned prefixes from RDFLib, since you can generate RDF/XML. > Ian, am I correct on the following: > > An XSLT processor is not required to maintain the same namespace > prefixes as in the original document... No, that is not correct. Nothing in the spec says that the prefixes will change when copying. In fact the spec makes it clear that a processor will make available all namespace nodes, which includes the prefix. > ... and worse yet, it's not required to > keep track of QNames in attribute values. That *is* true. But with XSLT 1.0 there are ways round nearly every problem, and with XSLT 2.0 the problem goes away because of its ability to type attribute content. > Hence, we could have RDFa > terms resolved to an incorrect namespace against the processed document. Not if you are careful. Regards, Mark -- Mark Birbeck CEO x-port.net Ltd. e: Mark.Birbeck@x-port.net t: +44 (0) 20 7689 9232 w: http://www.formsPlayer.com/ b: http://internet-apps.blogspot.com/ Download our XForms processor from http://www.formsPlayer.com/
Received on Sunday, 18 June 2006 12:34:10 UTC