XPATH to select tag immediately following another tag with no text

So here's my next query. Imagine the following XML:

<par>This is a <xref>Link</xref> to something else.</par>
<par><xref>Link</xref> to something else.</par>

I am looking to differentiate between the 2 xref tags. The only difference is whether they are treated as a word end. In the first, it SHOULD be; in the second, it SHOULDN'T be. I therefore need a parser rule that can determine that there is no text between the parent and sibling.

Unfortunately, I am having no luck and hoping someone can help with this special case.

  • I am not proficient in Xpat at all, but I see "word end" here. Why should a tag, which is obviously an inline tag, be no word end? When you are a translator and your vendor has defined a tag not to be a word end, you have much fun when selecting word. Each time you select a text before such tag not being a word end, the text and the tag are selected together and you have to go back. So from a translators point of view, all inline tags MUST be word end, just because then they will be treated separate from text. This is then much easier in editing. So may I ask, why you will define one of this ref tags as no word end?

  • Why should a tag, which is obviously an inline tag, be no word end?

    E.g. when individual letters (or parts of word, or similar) are colored/formatted differently?

Reply Children
No Data