user1560261
user1560261

Reputation: 23

Saxon CE and XQuery? Documentation indicates no XQuery, Examples otherwise?

Saxon CE, a javascript implementation of the popular XSLT, has documentation that indicates Saxon-CE has had XQuery support removed.

However, an example in the Saxon-CE documentation has was looks like to me to be XQuery in several "select"'s.

Specifically...

<!-- Set up the empty board -->
<xsl:variable name="empty-board" as="xs:integer*" select="for $i in (1 to 64) return 0"/>

and ...

<!-- integer in range 0..63 -->
<xsl:sequence select="for $i in 1 to 64 return if ($i = $square + 1) then $move else $board[$i]"/>

As a beginner with XSLT/Xpath/XQuery in general, and mostly recently Saxon-CE, I'm confused. The above looks like XQuery to me, but the documentation indicates that Saxon-CE does not support XQuery.

Is the above really XQuery? Does Saxon-CE actually support XQuery? Is the above something else entirely?

Upvotes: 2

Views: 173

Answers (1)

Mads Hansen
Mads Hansen

Reputation: 66723

XSLT 2.0 and XQuery 1.0 utilize XPath 2.0, which is what you are recognizing as XQuery in the code above.

  • The above code is XSLT 2.0, not XQuery.
  • Saxon-CE does not support XQuery, but by supporting XSLT 2.0 it inherently supports XPath 2.0.

Upvotes: 2

Related Questions