[Home] [By Thread] [By Date] [Recent Entries]
Abel Braaksma wrote:
Here's one solution. I believe it will work on both 1.0 and 2.0, but I tested only 2.0. <xsl:template match="* | text()">
<xsl:apply-templates />
</xsl:template> <xsl:template match="
person[document[
not(@relid =
../../../documents/document/@id)]]"> <person name="{name}" />
</xsl:template>It will output all persons that have at least one not-matching @relid, like this, for your input: <person name="Chris" /> Your own code much resembles the way you may do it in imperative languages like Java, PHP, VB or C. However, using templates, you can let the processor do the math for you and you only have to draw the rules. Cheers, -- Abel Braaksma http://www.nuntia.nl
|

Cart



