summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/patternist/computedTreeFragment.xq
blob: c5b93ada62531eb1a9fa3af163387c7a278ebb6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
declare default element namespace "http://example.com/Namespace";
declare variable $documentElementName := "doc";

element {$documentElementName}
{
    attribute xml:base {"http://example.com/"},
    element anotherElement
    {
        comment {" a comment "},
        processing-instruction target {"data"},
        element anotherElement {()},
        text {"some text"}
    }
}