Hi Rafael,
the following stylesheet does the selection and the indexing.
Regards,
Juliane.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet xmlns:xsl=“XSLT Namespace”
version=“1.0”>
<xsl:output method=“xml”/>
<xsl:template match=“/”>
<MESSAGE_BODY>
<xsl:apply-templates select=“departments/dept[.//resource[printer and type = ‘InkJet’]]”/>
</MESSAGE_BODY>
</xsl:template>
<xsl:template match=“dept”>
<xsl:attribute name=“index”>
<xsl:number value=“position() - 1”/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
#API-Management#webMethods#Tamino