xslt & xpath: match directly preceding comments

后端 未结 2 2023
無奈伤痛
無奈伤痛 2021-01-20 22:56

I am attempting to apply an XSLT transformation to a batch of XML documents. The main point of the transform is to re-order several elements. I wish to preserve any comments tha

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-20 23:36

    I think the best way of putting it would be as follows:

    I want the preciding comments but only those with the current node as the first element to follow them.

    Then, in xpath1.0/xslt1.0:

    
    
    
    

提交回复
热议问题