Re: Can an XPath expression be considered as a

Dear Laurent,

(cc-ing to two of my colleagues, Michael Sperberg-McQueen and Henry
Thompson, who were kind enough to help me out with the details...)

There is a W3C Recommendation called xpointer framework[1] which
specifies a general mechanism to add all kinds of things to a URI after
the '#', so to say. That framework relies on a so called scheme registry
that is set up at W3C[2]. The scheme registry refers to xpath1 as one of
the registered schemes, namely for XPATH1.0 expressions (and xpath2 for
XPATH2.0). Using this registry, the following _is_ a valid URI:

http://a.b.c/d#xpath1(//*[@id='person1' or @id='person2'])

Caveats:

- http://a.b.c/d should have a text/xml or application/xml or
application/...+xml media type for that to make sense
- As Jacco also said in his reply, there is no guarantee that this URI
will be properly handled by a third party (eg, a browser) unless, say,
the browser implements this scheme
- an XPATH expression may return a node _set_ and not only a node. I am
not really sure what this means in terms of your application, and the
usage of those URI-s in a Semantic Web settings, if that happens...
- formally, we are still waiting RFC3023bis, which will officially bless
the use of fragment identifiers for the XML media types in general, and
registry entries of [2] in particular...

Ie: there is something, but it is not without problems either! I hope
this helps nevertheless...

Ivan


[1] http://www.w3.org/TR/xptr-framework/
[2] http://www.w3.org/2005/04/xpointer-schemes/


Laurent LE MEUR wrote:
> During the development of the new generation of IPTC (International
> Press Telecommunications Council), IPTC members decided to use XPath
> expressions to point at internal node sets in an XML instance, in a way
> similar to the XSLT template/@match feature.
> 
>  
> 
> We especially use this for indicating a reference to the part(s) of the
> content a metadata property is about, e.g. (I admit that this is a
> complex case):
> 
>  
> 
> <newsItem>
> 
> <subject about=”//*[@id='person1' or @id='person2']” confidence=”80”>
> 
>             <name>Georges W. Bush</name>
> 
> </subject>
> 
> <subject about=”//*[@id='person1' or @id='person2']” confidence=”20”>
> 
>             <name>Georges Herbert Walker Bush</name>
> 
> </subject>
> 
> …
> 
> <html><body><p>xxx xxx <span id=”person1”>President Bush</span> xx. Yyy
> yy yy<span id=”person2”>the US President</span> yyy.</p></body></html>
> 
> </newsItem>
> 
>  
> 
> The use of XPath allows us to make assertions about several pieces of
> text at once (an alternative would be to use id/idrefs relations, but
> the problem explained below would be the same).
> 
>  
> 
> Now our problem: we want to be able to transform such assertions to RDF
> triples. The subject of the triple is a piece of text: can an XPath
> expression be an acceptable identifier for an RDF subject (my take is
> that it must be a URI, and an XPath expression is not a URI)?
> 
> If not, what are the good triples we can get from such a structure? I
> looked at Annotea to find guidelines, and found that the piece of text
> (represented by an XPointer in Annotea) is the value of the context
> property of a resource which is the annotation itself (see
> http://www.w3.org/2001/Annotea/Plan/context/newcontext.html). Is it the
> SemWeb definitive view on it?
> 
>  
> 
> Laurent Le Meur
> 
> AFP
> 
> IPTC News Architecture WP chair
> 
>  
> 
> 
> 
> 
> 
> 
> This e-mail, and any file transmitted with it, is confidential and
> intended solely for the use of the individual or entity to whom it is
> addressed. If you have received this email in error, please contact the
> sender and delete the email from your system. If you are not the named
> addressee you should not disseminate, distribute or copy this email.
> 
> For more information on Agence France-Presse, please visit our web site
> at http://www.afp.com
> 
> 
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
URL: http://www.w3.org/People/Ivan/
PGP Key: http://www.cwi.nl/%7Eivan/AboutMe/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Monday, 18 June 2007 16:13:46 UTC