Difference between revisions of "XQuery Recipes"
Jump to navigation
Jump to search
m (changed brush to xquery) |
|||
Line 6: | Line 6: | ||
let $contents :=<foo><br />Bar!</foo> | let $contents :=<foo><br />Bar!</foo> | ||
return element {$name}{ | return element {$name}{ | ||
− | + | attribute { "about" } {$class}, $contents | |
} | } | ||
</pre> | </pre> | ||
[[Category:XQuery]] | [[Category:XQuery]] | ||
[[Category:Finish]] | [[Category:Finish]] |
Revision as of 03:37, 17 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 }