summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.7.0/lib/rouge/demos/xquery
blob: 4f7b3255071fada1e328c68ffd1f7f0c183979a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
declare namespace html = "http://www.w3.org/1999/xhtml";

declare function local:test-function($catalog as document-node()) {
  <html>
    <head>
      <title>XQuery example for the Rouge highlighter</title>
      <link href="style.css"/>
    </head>
    <body>
      <h1>List</h1>
      <ul>
        {for $product in $catalog/items/product[@sell-by > current-date()] return
        <li>
          <ul>
            <li>{data($product/name)}</li>
            <li>{$product/price * (1 + $product/tax)}$</li>
          </ul>
        </li>}
      </ul>
    </body>
  </html>
};