|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Selecting an element by a dynamic attribute value
Dear all, I have an XML file which looks something like this: -------------------------------------------------------------- <results> <graphs> <graph label="foo" file="graph0.gif"/> <graph label="bar" file="graph1.gif"/> <graph .... etc /> </graphs> <data> <run label="foo"> <some data elements> </some data elements> </run> <run label="bar"> <some data elements> </some data elements> </run> </data> </results> --------------------------------------------------------------- For irritating reasons, the graphs part and the data part are produced by two different pieces of code, so can't be combined (the file attribute of <graph> elements can't be inserted into the <run> elements in the xml file). I would like to render this using xsl. I have up to now just been rendering the <data> element in the xml file, using an <xsl:for-each> to loop around the <run> elements. I would like to insert into each of the <run> element renderings an html <img> element. This <img> element would have an href attribute being the value of the file attribute of the <graph> element with matching label (i.e. the same label attribute value as the <run> element I am currently rendering). Is there any way to do this? Many thanks in advance for your help, Rupert Parson
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








