Difference between revisions of "XQuery Recipes"

From BaseX Documentation
Jump to navigation Jump to search
(Created page with "<pre class="brush:xml">let $name:= "Element1" let $class := "hi" let $contents :=<foo><br />Bar!</foo> return element {$name}{ attribute {"about"}{$class},$contents } </pre>")
 
m
Line 1: Line 1:
 +
This page contains code snippets that mainly originate from our [https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk Mailing List].
 +
== Computed Elements ==
 +
Returns dynamically named elements:
 
<pre class="brush:xml">let $name:= "Element1"
 
<pre class="brush:xml">let $name:= "Element1"
 
let $class := "hi"
 
let $class := "hi"

Revision as of 22:25, 12 December 2010

This page contains code snippets that mainly originate from our Mailing List.

Computed Elements

Returns dynamically named elements:

let $name:= "Element1"
let $class := "hi"
let $contents :=<foo><br />Bar!</foo>
return element {$name}{
		attribute {"about"}{$class},$contents
}