mte01
asked on
STX element with dynamic name
Hey experts,
When you create an stx element, the general trend is to give it a hard-coded name such as:
<stx:element name="code" >
I as trying to create an element whose name is taken dynamically from the value of a variable, i.e. like this:
<stx:element name="$code" >
But this doesn't seem to be possible, any idea if this is true?? Creating the name of the element tag dynamically would help me later when a program wants to retrieve values from the outputted file, as this would occur faster than if I have a static name and a different attribute for this name, because in the latter case I would have to do a loop over all the elements in the file....any help on dynamic tag name creation??
When you create an stx element, the general trend is to give it a hard-coded name such as:
<stx:element name="code" >
I as trying to create an element whose name is taken dynamically from the value of a variable, i.e. like this:
<stx:element name="$code" >
But this doesn't seem to be possible, any idea if this is true?? Creating the name of the element tag dynamically would help me later when a program wants to retrieve values from the outputted file, as this would occur faster than if I have a static name and a different attribute for this name, because in the latter case I would have to do a loop over all the elements in the file....any help on dynamic tag name creation??
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
welcome
there is not too much background information available on STX,
but it helps to read a good XSLT book
(and realise you cannot use some of the non forward functionality)
cheers
there is not too much background information available on STX,
but it helps to read a good XSLT book
(and realise you cannot use some of the non forward functionality)
cheers
ASKER
>>but it helps to read a good XSLT book
Can you provide the name or link to a useful book?
Can you provide the name or link to a useful book?
Mastering XSLT Transformations,
Doug Tidwell
O'Reilly
is a good introductory book, that is consise and easy reading
of course you know that STX is only a subset of XSLT
so not everything will apply
cheers
Doug Tidwell
O'Reilly
is a good introductory book, that is consise and easy reading
of course you know that STX is only a subset of XSLT
so not everything will apply
cheers
ASKER
Ahaa I see...thx for the tip!
ASKER