- From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
- Date: Tue, 12 Mar 2002 09:46:01 -0000
- To: "Danny Ayers" <danny666@virgilio.it>, <tarod@softhome.net>
- Cc: <www-rdf-interest@w3.org>
Danny: > > The rest of the material posted makes sense to me, but I have trouble with > the example below - by any (current) reckoning, surely "q:name" is just a > literal string itself here (nothing can cross the quote > threshold), and has > no connection whatsoever to the earlier xmlns:q=... (without making a > significant revision of the XML spec)?? > [ example at end ] You'd have thought so. But ... XML Schema allows qnames in attribute values e.g. xsi:type="xsd:decimal" where the xsd is a namespace prefix and must be bound to the appropriate URI. XSLT allows XPath expressions in attribute values, these again use namespace prefixes as prefixes - i.e. they must be bound to the right URI. An example in the XSLT I wrote in the RDF Core posting is from extract.xsl: [...snip...] <xsl:template match="*[@rdf:parseType='Literal']" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <xsl:apply-templates select="node()" mode="copy"/> </xsl:template> [...snip...] To match an element with an rdf:parseType="Literal" attribute namespace use within attribute values is required. A way RDF/XML could go is to simply not support (allow) namespace prefixes within attribute values within xml literals within RDF! I think currently is a theoretical requirement without any actual users. > > 3: Difficulties with QNames as Attribute Values > =============================================== > > Moving on to example 7 a_7.xml: > [[[ > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:eg="http://example.org/" > xmlns:q="http://example.org/q" > > <rdf:Description> > <eg:a rdf:parseType="Literal"> > <foo bar="q:name"/> > </eg:a> > </rdf:Description> > </rdf:RDF> > ]]] > Jeremy
Received on Tuesday, 12 March 2002 04:47:10 UTC