XSLT Ignore duplicate elements across multiple files

前端 未结 2 1731
感情败类
感情败类 2020-12-07 04:13

I recently asked a question regarding how to ignore multiple elements, and got some good responses regarding using \'preceding\' and the Muenchian Method. However I was wond

2条回答
  •  抹茶落季
    2020-12-07 05:15

    Basically keys are built per document so a direct key based Muenchian grouping will not allow you to identify and remove duplicates in more than one document.

    You could however first merge the two documents into one and then apply the Muenchian grouping to the merged document.

    If you want to merge and group in one stylesheet you need to use exsl:node-set or similar:

      
    
      
      
    
      
        
          
    Type Count

    You would now pass your index.xml as the main input document to the stylesheet.

    If you want to do this transformation in the IE browser then you need to replace the exsl:node-set with Microsoft's ms:node-set (with the proper namespace) or you need to use the approach in http://dpcarlisle.blogspot.de/2007/05/exslt-node-set-function.html to make sure the exsl:node-set function is implemented.

提交回复
热议问题