create an element using a variable for the name
I have this xml.
the name attribute values are not known and could contain any value
<tag name="indexes">
<tag name="scro_number">S29811/94Q</tag>
<tag name="subject_surname">DICKIE</tag>
<tag name="keywords">DICKIE</tag>
<tag name="case_number">BA05001553</tag>
<tag name="office_code">BA</tag>
<tag name="date_of_receipt">2005-10-07</tag>
<tag name="witness_seq_no">1</tag>
</tag>
and want to generate this
<indexes>
<scro_number>S29811/94Q</scro_number>
<subject_surname>DICKIE</subject_surname>
<keywords>DICKIE</keywords>
<case_number>BA05001553</case_number>
<office_code>BA</office_code>
<date_of_receipt>2005-10-07</date_of_receipt>
<witness_seq_no>1</witness_seq_no>
</indexes>
I hwve tried to create a new element using the name attribute to give it a name
<xsl:element>
<xsl:attribute name="name"><xsl:value-of select="@name"></xsl:attribute>
</xsl:element>
but it appears that the element must have a fixed name
Any ideas??
|