To anyone that knows about XSL. Help. :(

MrGrim

Golden Member
Oct 20, 1999
1,653
0
0
I've spent days reading tutorials, downloading examples etc. and I still haven't found anything that actually works! Anyway, here is what I need to do.

I have to seperate XML files and one holds information that the other one needs. I want to compine the two, but NOT merge them because their structure is different. I just want to be able to apply a template on two documents at the same time.

Apparently the way to do this is by using the document() function, but I just can't get it to work! It doesn't do anything, I get a blank page for a result.

Any help would be appreciated.
Thank you in advance.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
I try to stay away from coding everything "purely" in XSLT.

If I were you, I'd just use MSXML 3.x or 4.x in COM or System.Xml in .NET.

I suggest you to do this:
1) Create a new XML document.
2) Create a "master node" - i.e. <hold-all>
3) Use selectNodes to load the root node of the first XML document into <hold-all><root1>(contents here)</root1></hold-all>
4) Do the same thing for root2 - <hold-all><root1>(root 1 contents)</root1><root2>(root 2 contents)</root2></hold-all>
5) Create a XSLT that iterates through the nodes of each "root" node and create a new XML from it that merges the two contents.

Hope that made sense. :)