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

RE: How to use two xmls for comparing and extracting v

Subject: RE: How to use two xmls for comparing and extracting values
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 11 Sep 2003 16:54:49 +0300
compare xmls

> I am extremely sorry for writing incorrect desired output.
> Actually i would like to have output like
> `val1'val2
> I am having input file having node like this
> <Root att1="val1" and att2="val2".
> I am having the intermediate file which i constructed from 
> input file havin 
> structure.
> <Table Name="Root">
> <Column name="att1"/>
> <Column name="att2"/>
> Now i would like to have output like
> `val1`val2
> <xsl:variable name="Schema" select="document('colHeader.xml')"/>
> In the Schema variable I am having the document root of the 
> intermediate file.
> I am trying to compare name of the attribute of the Root node 
>  against the 
> value of the Column's naame attribute and if they are equal 
> then outputting 
> the value of the attribute of the Root node.


  <xsl:variable name="root" select="Root"/>
  <xsl:for-each select="$Schema/Table/Column">
    <xsl:variable name="name" select="@name"/>
    <xsl:if test="$root/@*[name() = $name]">
      <xsl:value-of select="$root/@*[name() = $name]"/>

but somehow I have this feeling it's not what you're asking for. Anyhow, do you have to have the intermediate document, do you need other than in this later transformation?


Jarno - Assemblage 23: Awake (Imperative Reaction Mix - 138 BPM)

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

Current Thread


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.
First Name
Last Name
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.