deleting the parent node if child node is not present in xml using xslt

前端 未结 3 1423
醉话见心
醉话见心 2020-12-19 19:00

I am trying to transform a given XML using xslt. The caveat is that I would have to delete a parent node if a given child node is not present. I did do some template matchin

3条回答
  •  自闭症患者
    2020-12-19 19:33

    Super close. Just change your last template to:

    
    

    Also, it's not incorrect but you can combine your 2 xsl:output elements:

    
    

提交回复
热议问题