Merge tecnique with XSL

J

JohnPlayerSpecial

Hi all,
i need to merge this xml document:

Doc1:
-----
<base>
<content>Hello World!</content>
</base>

with one of these:

Doc2:
-----
<root>
<container type="container">
</container>
</root>

or

Doc3:
-----
<root>
<bigcontainer type="bigcontainer">
</bigcontainer>
</root>

getting this result type:

Doc4:
-----
<root>
<container type="container">
<content>Hello World!</content>
</container>
</root>

or

Doc5:
-----
<root>
<bigcontainer type="bigcontainer">
<content>Hello World!</content>
</bigcontainer>
</root>

I have structured my code to work in this mode:

<vbscript>
Dim s_ParsedDocument
Dim o_DOMDoc1: Set o_DOMDoc1 =
Server.CreateObject("MSXML2.FreeThreadedDOMDocument.4.0")
Dim o_DOMStyle: Set o_DOMStyle =
Server.CreateObject("MSXML2.FreeThreadedDOMDocument.4.0")

Call o_DOMDoc1.Load("doc1.xml")
Call o_DOMStyle.Load("docStyle.xsl")

Dim o_DOMTemplate: Set o_DOMTemplate =
Server.CreateObject("MSXML2.XSLTemplate.4.0")
Dim o_DOMProcessor

With o_DOMTemplate
Set .stylesheet = o_DOMStyle
Set o_DOMProcessor = .createProcessor()
End With

With o_DOMProcessor
.input = <MSXML "Doc1" object>
Call .addParameter("containerfile", ???? ) '<--- I could specify
doc2.xml or doc3.xml
Call .Transform()
s_ParsedDocument = .output
End With
</vbscript>

Now i have to do the stylesheet document and i need your help.

Sorry for my english,
JP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top