Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Merge tecnique with XSL

Reply
Thread Tools

Merge tecnique with XSL

 
 
JohnPlayerSpecial
Guest
Posts: n/a
 
      04-27-2004
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.FreeThreadedDOMDocumen t.4.0")
Dim o_DOMStyle: Set o_DOMStyle =
Server.CreateObject("MSXML2.FreeThreadedDOMDocumen t.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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tecnique and/or Modules for Perl and HTML pgodfrin Perl Misc 6 03-02-2008 03:16 AM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM
C++ inlining as a multithreading optimization tecnique? gianguz C++ 10 12-14-2004 09:27 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 1 09-13-2004 02:28 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 0 09-08-2004 02:11 PM



Advertisments