XSL and Forward reference

webmasterbeta

New Member
Suppose I have an XML file that looks something like this:<catalog><product prod_no="123"><name>T-shirt</name></product><product prod_no="124"><name>Magazine</name></product><product prod_no="125"><name>Soda</name></product><price product="123">$5.00</price><price product="124">$2.95</price><price product="125">$0.50</price></catalog>And I want the resulting XML file to look like this:<store><item><item_no>123</item_no><retail>$5.00</retail></item><item><item_no>124</item_no><retail>$2.95</retail></item><item><item_no>125</item_no><retail>$0.50</retail></item></store>Can this be done using XSL? Specifically, I want to be able to pull theproduct information from one place in the source and the price from anotherplace in the source where there is a common key between them and have theresult piece those two bits of information together.Even more specifically...I would prefer to use James Clark's XT transformationengine, but that doesn't matter as long as the engine is Java based.
 
Back
Top