From d6158aa2ba96cce22ced02aee2e851b43ccd3d20 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kim=20Nguy=E1=BB=85n?= Date: Wed, 15 Apr 2015 11:50:14 +0100 Subject: [PATCH] . --- pres-esop15/01.xhtml | 75 +++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/pres-esop15/01.xhtml b/pres-esop15/01.xhtml index fe24755..d74a138 100644 --- a/pres-esop15/01.xhtml +++ b/pres-esop15/01.xhtml @@ -195,26 +195,26 @@

-

The XQuery 3.0 W3C Standard

+

XQuery 3.0

+

W3C standard to query XML documents

- declare function get_links($page, $print) { for $i in $page/descendant::a[not(ancestor::b)] - return print($i) + return $print($i) } declare function pretty($link) { typeswitch($link) - case $l as element(a) - return switch ($l/@class) - case "style1" + case $l as element(a) + return switch ($l/@class) + case "style1" return <a href={$l/@href}><b>{$l/text()}</b></a> - default return $l + default return $l - default return $link + default return $link } - let $bold_links := get_links(document("file.html"), $pretty) + let $bold_links := get_links(document("file.xhtml"), $pretty)