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

Re: multiple input xml docs

Subject: Re: multiple input xml docs
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Thu, 29 May 2003 21:10:03 +0200
xsl multiple input xml
Dave Dearman wrote:

I have two xml documents, each of the two documents have the same structure but with different data and namespaces (ex:)
...
What I want to accomplish is, read both of the xml files into a single
xsl and have it transform each of the files differently according to
their namespaces. Is this possible??

Yes.


I have been trying for a while with
no success.  I have been using document() to take in the second xml
file.

You probably forgot to use the namespaces in the match and select expressions: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f1="http://people.file1" xmlns:f2="http://people.file2"> <xsl:variable name="file2" select="document('file2.xml')"/>

 <xsl:template match="f1:name">
   <!-- look it up in file2 -->
   <xsl:if test=".=$file2/f2:people/f2:name>
  ....

Check the XSL FAQ for further details and explanations.

J.Pietschmann



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.