I built a schematron pattern and found an unexpected error.
I tried to compair a string (e.g. "Robinson 1983") to the output of an xsl function. My function works like this
<xsl:value-of select="surname"/><xsl:text> </xsl:text><xsl:value-of select="year"/>
So, in schematron
test="'Robinson 1983' = ...function-call..."
gave back "false" because the output of the function is a sequence consisting of three text elements.
I was able to fix that using xslt
<xsl:variable name="output"><xsl:value-of select="...function-call..."/></xsl:variable>
and
test="'Robinson 1983' = $output"
gave back "true" as expected.
But I'm wondering: How is this the be solved in "pure" Schematron/XPath? Is there any equivalent to xsl:value-of? I.e. turning a sequence into a string, getting rid of other content. I think this is one of the most import things you want to do in XPath, but I didn't find a solution.
fn:string-join()
. Alternatively just useconcat(surname, ' ', year)
right-away. – Tomalak