Altova Mailing List Archives

Re: Using preceding-sibling on xsl:variable

From: "Alex Shirshov" <nomail@----.-->
Date: 4/9/2004 10:57:00 AM
Hello, Scott!
You wrote  on Thu, 08 Apr 2004 23:53:54 GMT:

 S> It does seem to center on the:

 S> <xsl:for-each select="//DataRow[@CLIENT_ID =
 S> current()/@CLIENT_ID][not(@SSN = preceding-sibling::DataRow[@CLIENT_ID =
 S>  current()/@CLIENT_ID]/@SSN)]">

 S> statement,  but I have no idea what this is doing.
 S> What does [][] do?? Is this an "AND"??

Here is the steps.
1. //DataRow[@CLIENT_ID = current()/@CLIENT_ID] - selects all datarows with
the client_id attribute equals to client_id attribute of the current

2. The second predicate - [not(@SSN = preceding-sibling::DataRow[@CLIENT_ID
 S>  current()/@CLIENT_ID]/@SSN)] - applay group filtering by @SSN. It can
be rewritten as

[not(@SSN = all-preceding-sibling-DataRows-with-the-same-client-id/@SSN)]

[Sorry, skipped]

With best regards, Alex Shirshov.


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 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.