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

RE: Matching values in the XML before output!

Subject: RE: Matching values in the XML before output!
From: "Simpson, George" <GeorgeS@xxxxxxxxxxxxxxxxx>
Date: Thu, 18 Apr 2002 11:59:11 +0100
simpson georges
Hi all,

In some cases my XML is laid out like this :-

<report-root>
    <icc>
        <icc-phases>
            <icc-points>
                <point-number>1</point-number>
                <icc-point-oid>196</icc-point-oid>
            </icc-points>
            <icc-points>
                <point-number>2</point-number>
                <icc-point-oid>197</icc-point-oid>
            </icc-points>
        </icc-phases>
    </icc>
    <iso-point-details>
        <isolation-history>
	<short-form-id>L/O</short-form-id>
	<isolation-id>1</isolation-id>
	    <iso-history>
		<icc-point-history-oid>15</icc-point-history-oid>
		<icc-point-oid>197</icc-point-oid>
	    </iso-history>
        </isolation-history>
        <isolation-history>
            <short-form-id>M/O</short-form-id>
	<isolation-id>2</isolation-id>
        </Isolation-history>
    </iso-point-details>
</report-root>

Required output
POINT NUMBER = 1 SHORT FORM ID = NIL
POINT NUMBER = 2 SHORT FORM ID = L/O

Here the common key is used in a child of <isolation-history> named <iso-history> where the isolation history has an 
iso history associated with it!

I tried to set up the example below to check the <isolation-id> in this case! But get no results back! Could someone 
please explain to me what the example below is doing?

Sorry if this sounds a silly question :-(

Once more many thanks!

Regards,

George



Heppa,

> Required output
> POINT NUMBER = 1 ISOLATION HISTORY OID = 29
> POINT NUMBER = 2 ISOLATION HISTORY OID = 15

  <xsl:for-each select="icc/icc-phases/icc-points">
    <fo:table-cell>
      <fo:block>
        <xsl:value-of select="point-number" />
      </fo:block> 
    </fo:table-cell>
    <fo:table-cell>
      <fo:block>
        <xsl:value-of select="../../../iso-point-details/isolation-history[icc-point-oid = current()/icc-point-oid]/icc-point-history-oid" />
      </fo:block> 
    </fo:table-cell>
  </xsl:for-each>  
 </fo:table>

Cheers,

Santtu

 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-2011 All Rights Reserved.