Skip to content

Instantly share code, notes, and snippets.

@grtjn
Created October 20, 2011 13:06
Show Gist options
  • Save grtjn/1301096 to your computer and use it in GitHub Desktop.
Save grtjn/1301096 to your computer and use it in GitHub Desktop.
A brief comparison between XQuery and XSLT code
(: A brief comparison between XQuery and XSLT code :)
(: For-each in XQuery.. :)
for $b in $books
order by $b/title
return
$b/title
(: For-each in XSLT.. :)
<xsl:for-each select="$books">
<xsl:sort select="title"/>
<xsl:copy-of select="title"/>
</xsl:for-each>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment