RE: [xsl] Another XSL question

Subject: RE: [xsl] Another XSL question
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 24 Apr 2002 18:31:10 +0100
Do the transformation into a result tree fragment

<xsl:variable name="rtf">
  <xsl:...
</xsl:variable>

then use the xx:node-set() extension to examine the result:

<xsl:for-each select="xx:node-set($rtf)/*">
  ...

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Manoj Jha
> Sent: 24 April 2002 17:12
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Another XSL question
> 
> 
> Hello everyone,
> 
> I have a rather beginner question on XSL transformation. 
> Here's my issue:
> 
> After initial transformation of the original XML, I want to 
> access the 
> transformed XML in the stylesheet. However the result of the 
> subsequent 
> processing in stylesheet actually accesses the original XML 
> value. Here's a 
> snapshot of my original XML and stylsheet:
> 
> *****Original XML*********
> 
> <?xml version="1.0"?>
> <DocumentRequest>
>   <Director>
>     <DocumentName>UnderwritingAnalysisPage1</DocumentName>
>     <DeliveryMedium>browser</DeliveryMedium>
>     <ApplicationId>15</ApplicationId>
>     <PostPay>no</PostPay>
>   </Director>
>   <DocumentDetails>
>     <BorrowerName>SOME NAME</BorrowerName>
>     <LoanStatus>DECLINED</LoanStatus>
>     <ConditionText1>Some condition text </ConditionText1>
>     <ConditionText2>Some condition text </ConditionText2>
>     ...
>     <ConditionText45>Some condition text on line 45</ConditionText45>
>     <ConditionText46>Some condition text on line 46</ConditionText46>
>     <ConditionText47>Some condition text on line 47</ConditionText47>
>   </DocumentDetails>
> </DocumentRequest>
> 
> *****End Original XML*******
> 
> ****Begin Stylesheet*******
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> <xsl:output method="xml" indent="yes"/>
> 
> <xsl:template match="@* | node()">
>   <xsl:copy>
>      <xsl:apply-templates/>
>   </xsl:copy>
> </xsl:template>
> 
> <xsl:template match="DocumentDetails/*[. = 'CLOSING CONDITIONS:']">
> <!-- do some transformation by adding new condition text nodes such
>      that remaining condition text nodes get incremented 
> based on the   
> introduction of these new nodes -->
> </xsl:template>
> 
> <!-- The problem appears here. Instead of retrieving and 
> checking against 
> the result of above transformation above, the following checks 
> ConditionText45 against the original XML -->
> 
> <xsl:template 
> match="/DocumentRequest/DocumentDetails/ConditionText45">
> <xsl:copy-of select="/DocumentRequest/DocumentDetails/BorrowerName"/>
> <xsl:copy-of select="/DocumentRequest/DocumentDetails/LoanStatus"/>
> <ConditionText45><xsl:value-of select="."/></ConditionText45>
> </xsl:template>
> 
> ****End Stylesheet********
> 
> How should the code the problem area change to access 
> ConditionText45 from 
> the transformed XML
> and not the original XML ?
> 
> Thanks for any help....
> 
> - MJ
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

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


Current Thread