This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
newbie problem - following-sibling
- From: "Hesselberth, Jan" <Jan dot Hesselberth at northernrock dot co dot uk>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Fri, 19 Apr 2002 10:39:28 +0100
- Subject: [xsl] newbie problem - following-sibling
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I tried reading the book and searching the archive but couldn't find the
answer.
I have the following xlm. I want to process it as:
for each <SPV> process each <ACCDATA> below the <SPV> until I get to the
next <SVP>
<REPORT>
<SPV><SPVNAME>N</SPVNAME></SPV>
<ACCDATA><MFACCNO>13990A-00189</MFACCNO><INTYRDATE>0</INTYRDATE></ACCDATA>
<ACCDATA><MFACCNO>51590X-00066</MFACCNO><INTYRDATE>0</INTYRDATE></ACCDATA>
<TOTALS><TOTCURBAL>3035525.63</TOTCURBAL><TOTNOACCS>6</TOTNOACCS></TOTALS>
<SPV><SPVNAME>QC006</SPVNAME></SPV>
<ACCDATA><MFACCNO>43990Q-00189</MFACCNO><INTYRDATE>0</INTYRDATE></ACCDATA>
<ACCDATA><MFACCNO>49590P-00021</MFACCNO><INTYRDATE>0</INTYRDATE></ACCDATA>
<TOTALS><TOTCURBAL>3035525.63</TOTCURBAL><TOTNOACCS>6</TOTNOACCS></TOTALS>
</REPORT>
So in the xsl I did
<xsl:for-each select="/REPORT/SPV">
and tried various themes around
<xsl:for-each select="following-sibling::ACCDATA">
<xsl:if test="not(following-sibling::*[2][self::SPV])">
(I know this isn't correct as it misses one ACCDATA)
However, I allways get all ACCDATA for the first SPV. How do I break the
processing when it gets to the next SPV?
Any help would be greatly appreciated.
Cheers
Jan
--------------------------------------------------------------------------
CONFIDENTIALITY
The information contained in this e-mail and any files transmitted with it
is private and confidential. It is intended for the named addressee only.
If you are not the intended addressee you are prohibited from
storing, copying or using the information in any way.
If you received this e-mail due to a transmission error please notify the
sender immediately. No liability is accepted by Northern Rock
for any losses caused by viruses contracted during transit
over the Internet or present in any receiving system.
This e-mail is not intended to create legally binding commitments on
behalf of Northern Rock plc, nor do its contents reflect the corporate
views or policies of Northern Rock plc.
--------------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list