Posted By

mikander on 08/04/09


Tagged

xslt


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


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


 / Published in: XSLT
 

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4.  
  5. <xsl:template match="linCorpus/text/body/div[ p/s/w[@pos='EN' or @pos='ING']]">
  6. <xsl:copy-of select="." />
  7. </xsl:template>
  8.  
  9. <xsl:template match="text()" />
  10. </xsl:stylesheet>

Report this snippet  

You need to login to post a comment.