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

RE: Another XSL question

Subject: RE: Another XSL question
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 24 Apr 2002 18:31:10 +0100
RE:  Another XSL question
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:  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

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.