[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: MERGING 2 XML DOCS WITH dom4j parser

Subject: RE: MERGING 2 XML DOCS WITH dom4j parser
From: Lea Allison <Lea.Allison@xxxxxxxxxxxxxx>
Date: Thu, 21 Mar 2002 11:21:39 +0100
merging two dom4j documents
The importedDoc content is processed by a call-template named stylesheet,
which appears not to apply to my $importedDoc file for some reason?



-----Original Message-----
From: Oleg Tkachenko [mailto:olegt@xxxxxxxxxxxxx]
Sent: Thursday 21 March 2002 11:02
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  MERGING 2 XML DOCS WITH dom4j parser


Lea Allison wrote:
> The problem I find with this method, is that by using a parameter /
variable
> to import the second document I have to use a for-each loop with the
> $importedDoc to be able to apply the templates to this data.

Why not just <xsl:apply-templates select="$importedDoc/*"/> ?

> 
> Secondly, if I view the outputed XML from the stylesheet, it only shows
the
> first document. The 2nd doc in the param does not show.
What do you mean by "I view outputed XML from the stylesheet" ?

> Actually it would be ideal to get two combined documents returned to the
> users browser as XML. ie.
> 
> <DOCUMENT>
> 	<DOC1>
> 		<CONFIGINFO />
> 	</DOC1>
> 
> 	<H>Main document</H>
> 	<P>Hello world</P>
> </DOCUMENT>
> 
> Where DOC1 would be the 2nd documented added to the first.
> 
> There is also another problem. The imported document is not always the
same.
> I vary the document based on language, so I need to dynamically name the
> imported document.
Pass its name as parameter too.

<DOCUMENT>
	<xsl:element name="{$imported-doc-name}">
		<!-- Process imported doc -->
		<xsl:apply-templates select="$imported-doc"
mode="imported"/>
	<xsl:element>
	<!-- Process main doc -->
	<xsl:apply-templates/>
</DOCUMENT>

-- 
Oleg Tkachenko
Multiconn International, Israel


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.