RE: [xsl] Matching values in the XML before output!

Subject: RE: [xsl] Matching values in the XML before output!
From: "Simpson, George" <GeorgeS@xxxxxxxxxxxxxxxxx>
Date: Thu, 18 Apr 2002 11:59:11 +0100
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