W3C home > Mailing lists > Public > www-ql@w3.org > July to September 2004

Generating RDF-style URIs from a namespace

From: Howard Katz <howardk@fatdog.com>
Date: Tue, 7 Sep 2004 14:25:21 -0700
To: <www-ql@w3.org>

Is there a simple way of taking a namespace declaration such as

       declare namespace foo="http://foo/";

and a list of local names, such as

     ( bar, baz, ... )

and generating a list of the corresponding URIs, a la RDF, such as



I can see a way of doing this without explicit namespaces, using simple
string concatenation and an xs:anyURI constructor:

    let $namespace := concat( "http://foo/", ":" )
         xs:anyURI( concat( $namespace, "bar" ))

but I'm wondering if it can be done using a namespace declaration, since
that somehow seems more in keeping with the intent. (I can see a rather
convoluted way of doing it using a computed element constructor and
fn:namespace-uri(). I'm wondering tho if there's a more direct way of doing
it without constructing an element first.)

Received on Tuesday, 7 September 2004 21:24:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC