select first element, that has (at least) 1 sub element, whose attribute 'pos' has value "EN" or "ING"

/ Published in: XSLT
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="">
  5. <xsl:template match="linCorpus/text/body/div[ p/s/w[@pos='EN' or @pos='ING']]">
  6. <xsl:copy-of select="." />
  7. </xsl:template>
  9. <xsl:template match="text()" />
  10. </xsl:stylesheet>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.