xslt/xpath: count preceding elements which starts-with 'S'
Hi everybody,
I got the following XML:
<?xml version="1.0" encoding="UTF-8"?> <ROOT> <A1> <FOO>1</FOO> </A1> <A1> <FOO>2</FOO> </A1> <B1> <FOO>3</FOO> </B1> <A1> <FOO>4</FOO> </A1> </ROOT>
I want wo count all preceding Elements of each 3
How has the experssion has to look?
count(/ROOT/A1/FOO/preceding::[starts-with(.,'A')])
DOES not work
Any suggestions?
Regards Mario
Edited by: Mario Müller on Sep 12, 2008 2:23 AM