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]

count with variables?


hi everyone,

iīve a xml-file similar to this:

<root>
	<status>
		<fragment1>.....</fragment1>
		<fragment2>.....</fragment2>
		<fragment3>.....</fragment3>	
	</status>
	
	<sub-root>
		<sub-sub-root>
			<fragment1>
				bla bla
			</fragment1>
			<fragment2>
				bla bla
			</fragment2>
			<fragment3>
				bla bla
			</fragment3>
		</sub-sub-root>
	</sub-root>
</root>

the nodes <fragmentX> donīt have allways the same name, but in node <status>
and <sub-root> they have, so i read the name and  put it into a variable
called $actuall_name. thatīs ok, and now i want to count these nodes under
<sub-root> and give the result to an other varible called $actuall_result.
iīve tried something like 
<xsl:value-of select="count(../..[$actuall_name])"/>  or
<xsl:value-of select="count(root/sub-root[$actuall_name])"/> 
but nothing is correct. 
any ideas?

martin

 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]