What the key generate-id( preceding-sibling:: ... meaning XSL 1.0
I have the following xsl :
<xsl:key name="kEventslegal" 
         match="HI开发者_StackOverflow社区STORY_EVENT"
         use="concat(generate-id(
                        preceding-sibling::HISTORY_EVENT[
                           @Name='Item Acceptance Review event NO by Legal'
                        ][last()]
                     ),
                     '+',
                     generate-id(
                        following-sibling::HISTORY_EVENT[
                           @Name='Legal Report done'
                        ][1])
                     )"/>
the xml:
<ROOT>
     <HISTORY_EVENT Name="Item Acceptance Review event NO by Legal" 
                    EVENTSUBJECT="Item Acceptance Review event NO by Legal">
          <EVENT_TIMESTAMP>31/01/2011 11:08:27</EVENT_TIMESTAMP>
          <EVENT_STATE>opend</EVENT_STATE>
          <EVENT_ROLE>Legal Unit Specialist</EVENT_ROLE>
          <EVENT_USER>legal.test</EVENT_USER>
          <EVENT_TYPE>normal</EVENT_TYPE>
          <EVENT_PROCESS>Item Acceptance Review event NO by Legal Unit Specialist</EVENT_PROCESS>
          <EVENT_MESSAGE>Item Acceptance Review event NO by Legal Unit Specialist legal.test</EVENT_MESSAGE>
        </HISTORY_EVENT>
........
</ROOT>
Any ideas?
This <xsl:key> identifies all HISTORY_EVENT elements that are surrounded by two specific HISTORY_EVENT elements:
- The first -- having a - Nameattribute with value:- 'Item Acceptance Review event NO by Legal'
- The last -- having a - Nameattribute with value:- 'Legal Report done'
To summarize: looks like all entries for all legal report with review result NO.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论