[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|