I am trying to return a computed element with a computed attribute. I have Google’d and RTFM’d this.
Assume the element name and attribute name are in variables:
let $elname := "book"
let $attrname := "title"
I know I can create an element with:
element {$elname} {'content'}
and an attribute:
attribute {$attrname} {'value'}
But how do I create:
<book title="something"/>
I’ve tried every permutation I can imagine. Thanks very much.
Try:
Here’s an example of
<book>also containing content:This would produce: