How to select unique nodes

前端 未结 5 949
轮回少年
轮回少年 2020-12-03 01:40

I found this page describing the Muenchian method, but I think I\'m applying it wrong.

Consider that this would return a set of ages:

/doc/class/pers         


        
5条回答
  •  难免孤独
    2020-12-03 02:38

    Aren't you missing a reference to 'descriptive' right after the preceding-value? Some thing like the following:

    /doc/class/person/descriptive[(@name='age')][not(value=preceding-sibling::descriptive[@name='age']/value)]/value
    

    (Haven't tested it)

提交回复
热议问题