Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Using Preceding-Sibling to acquire value in for-each loop

From: "Dion Houston" <dionh@------------->
To:
Date: 6/3/2002 12:54:00 PM
You're using XSL not XSLT in your stylesheet, and the preceding-sibling
access is not supported.  If you're not using any WD functionality you
may be able to get away with just changing the namespace.  Try changing:

xmlns:xsl="http://www.w3.org/TR/WD-xsl"

to

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

HTH!

Dion


-----Original Message-----
From: Mark Turanin [mailto:mark.turanin@xxxxxxxxxxx] 
Sent: Monday, June 03, 2002 1:29 PM
To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] 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


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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent