I would like to create an xml element that will have dynamic number of
attributes, something like this where n will change and $value_1 to
$value_2 will be provided by outside
element book {
attribute isbn_1 {$value_1}
attribute isbn_2 {$value_2}
attribute isbn_3 {$value_3}
.
.
.
attribute
Sorry for double posting :-D
M.
On 06/05/2014 20:07, Marco Lettere wrote:
Hi Erol,.
try
element book {
for $i in 1 to 4
return attribute {xs:QName(isbn_ || $i)} { value || $i}
}
Regards,
Marco.
On 06/05/2014 19:48, Erol Akarsu wrote:
I would like to create an xml element that will have
Dirk,
Super duper!
On Tue, May 6, 2014 at 1:55 PM, Dirk Kirsten d...@basex.org wrote:
Hi Erol,
Yes, you can.
Something like the following should work:
element book {
for $i in 1 to $n
return attribute {isbn_ || $i} {get-value($i)}
}
Cheers,
Dirk
On 06/05/14 19:48, Erol
3 matches
Mail list logo