xsl - tag position with text mixed in parent
问题 In XSL 1.0, I am trying to distinguish between the following 2 scenarios which both occur within the input XML I need to process and each to be handled differently. Scenario 1 <tag1><tag2/> some text</tag1> Scenario 2 <tag1>some text <tag2/></tag1> I have a template which matches at the <tag2/> level, within this I want scenario 1 to ignore <tag2/> , in scenario 2 I want to insert a <br/> in place of <tag2/> . I have searched on here and on google but can't seem to figure out how to