XML element referencing to other xmls
Hello community,
I hope the experts can help me to have some solutions for my problem:
I am working with saxon8 and windowsxp.
It is given a xml in which the element "widget" reference to the next xml document, with its attributes, so I must load this xml and look if the "widget" element is present and do the same again.
The element looks like that:
<Widget Name="PremiumCombiView_Audio_CD" FileNamePrefix="PremiumCombiView_Audio_CD" UniqueID="126551782039362000" Path="Container">
For this example the xml lies under
"Container/PremiumCombiView_Audio_CD.xml"
The attribute "UniqueID" is unique for the xml document.
So far thats no problem, i can solve this with a recursive template, but there can be more than one "widget" element in a xml, so i find only the first element, enter the next xml document and so on. You can imagine that it can be a large branch of "links".
Hera is a rough scratch:
XML1 | XML2 | XML3 | XML (x) Level
Widget--->Widget--->Widget (1)
| |->Widget-->Widget (2)
|
|->Widget------------>Widget (3)
How can i solve it to enter each xml and collect all "widget"s ?
Should I collect all "widget" of level 1 and than level 2, but I lost the context, what is already collected ? Should I use a variable in which I save the not collected "widget" elements?
I hope you understand my problem.
Thank you for your postings.
Kind regards
Alex
|