[thelist] setting attribute name with xsl?
Gavin Montague
gmontague at gmontague.co.uk
Sun Jan 23 14:54:07 CST 2005
Hi all,
I've googled and hit the library but to no avail and I'd be grateful if
any one can shed any light on this.
I have an xml fragment that looks something like....
<metadata>
<item type="placename" format="name">Glasgow</item>
<item type="country" format="name">GB</item>
<item type="telephone" format="international_form">+44 141</item>
</metadata>
to be transformed into
<meta name="placename" content="Glasgow, Scotland"/>
<meta name="country" content="GB"/>
<meta international_form="telephone" content="+44 141"/>
Not difficult, but what I'd ideally like to do is have a general case
that says, "for each item make the format attribute value into the new
attribute name."
In other words, is it possible to transform a value from the source into
an attribute name in the final document?
Thanks in advance,
Gav
More information about the thelist
mailing list