This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Using Preceding-Sibling to acquire value in for-each loop


In a for-loop I am trying to acquire the value of the previous z:row
@LedgerID value captured in the for-loop....

<z:data>
	<z:row LedgerID=1/>
	<z:row LedgerID=2/>
</z:data>
However, with the following xsl I keep getting the error :  Description:
Expected token 'eof' found ':' .preceding-sibling-->:<--:row[1]

Please advise

<HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
<META name="VI60_DefaultClientScript" Content="VBScript"></META>
<BODY> 
<xsl:element  name = "FORM">
<xsl:element name="table">
			<xsl:attribute name="name">tGLALL</xsl:attribute>
			<xsl:attribute name="align">center</xsl:attribute>
			<xsl:attribute name="border">0</xsl:attribute>
			<xsl:attribute name="cols">11</xsl:attribute>
			<xsl:attribute name="height">1</xsl:attribute>
				<xsl:element name="TR">
					<xsl:element name="TD">
						<B><U>Previous
LedgerID</U></B>
					</xsl:element>

				</xsl:element>
					<xsl:for-each
select="xml/rs:data/z:row">
						<xsl:element name="TR">
							<xsl:element
name="TD">
	
<xsl:value-of select="preceding-sibling::row[1]"/>
							</xsl:element>
						</xsl:element>
					</xsl:for-each>		
	</xsl:element>
</xsl:element>
</BODY>
</HTML>





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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]