Re: Generating RDF-style URIs from a namespace
Per Bothner <[email protected]> Tue, 07 Sep 2004 18:03:11 -0700
| Newsgroups | gmane.comp.web.query-languages |
|---|---|
| Message-ID | <[email protected]> |
Paul Cotton wrote:
> This means that the NamespaceDecl cannot contain function calls or
> string concatentation.
But the question wasn't generating namespaces, but generating URIs.
It seems to me you should be able to use a cast to a QName:
declare namespace foo="http://foo/";
for $name in ("bar", "baz")
let $qname := QName(concat("foo:",$name) return
xs:anyURI( concat(namespace-uri-from-QName($name),
local-name-from-QName($name)))
or
declare namespace foo="http://foo/";
let $foo := namespace-uri-from-QName(QName("foo:unused"))
for $name in ("bar", "baz")
xs:anyURI( concat($foo, $name))
--
--Per Bothner
[email protected] http://per.bothner.com/