Thread Closed

anyURI as an XPath expression?

 
Share Thread Thread Tools
Mar2-07, 12:52 AM   #1
 
Recognitions:
Gold Membership Gold Member

anyURI as an XPath expression?


This question is extremely annoying but not worth the time to properly investigate, so here is my best attempt to find an answer.

I'm writing something in XSLT and XPath (both 2.0). I want to declare a URI parameter.
<xsl:param name="foo" as="xsd:anyURI" select="http://foo.bar"/>
But Saxon complains about that being a parse error (XPST0003: "QName cannot end with a colon {http:}"). So I thought maybe it wants me to enter the URI as a string. But no, that is also bad, a type error, as you would initially expect (XPTE0600). So what is a girl to do?

The value of select must be an XPath expression, but I cannot for the life of me figure out what kind of expression it is. It's not a quantified, conditional, for, comparison, arithmetic, or sequence expression. And of the primary expressions, the only one I can imagine it might be is a string literal, but that doesn't really even make sense. It's not a path expression, is it? URIs are atomic values, surely, right? xsd:anyURI is an atomic type. Bah.

I have solved this for now by just entering the URI as a string and casting it as a URI,
<xsl:param name="foo" as="xsd:anyURI" select="'http://foo.bar' cast as xsd:anyURI"/>
but that is not satisfying.

How do you enter a URI in XSLT as an XPath expression?
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Bird's playlist could signal mental strengths and weaknesses
>> Minus environment, patterns still emerge: Computational study tracks E. coli cells' regulatory mechanisms
>> Bacterium uses natural 'thermometer' to trigger diarrheal disease, scientists find
Thread Closed
Thread Tools


Similar Threads for: anyURI as an XPath expression?
Thread Forum Replies
tensor expression Differential Geometry 4
condensing an expression Precalculus Mathematics Homework 11
Expression Help Calculus & Beyond Homework 6
Is this right? I put this expression in a k-map and got the following Engineering, Comp Sci, & Technology Homework 1
Kb Expression and Value Chemistry 12