[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 09:06:03 +0300
brainkillers
Hi,

> If I have a node like this in my original xml.
> 
> <Root att1="val1" att2="val2">
> 
> and the intermediate xml has node like this
> <Table name="Root">
> <Column name="att1"/>
> <Column name="att2"/>
> </Table>
> 
> I want to output values like
> att1`att2.

If you wanted to use the original source directly, it's

  <xsl:for-each select="Root/@*">
    <xsl:sort select="translate(name(), translate(name(), '0123456789', ''), '')" data-type="number"/>
    <xsl:if test="not(position() = 1)">`</xsl:if>
    <xsl:value-of select="name()"/>
  </xsl:for-each>
  <xsl:text>.</xsl:text>

and for the intermediate

  <xsl:for-each select="Table/Column">
    <xsl:if test="not(position() = 1)">`</xsl:if>
    <xsl:value-of select="@name"/>
  </xsl:for-each>
  <xsl:text>.</xsl:text>

Cheers,

Jarno - Hypnoskull: Biotech Brainkillers (Deconstructed)

 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.