Subject: Re: [xsl] XSLT 2.0 contains question From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Mon, 09 Apr 2007 21:40:38 +0200 |
Under XSLT 1.0, I can do the following to filter out any xsd:element that has a xsd:documentation element that has the word "Deprecated" in it.
<xsl:template match="xsd:schema">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:for-each select="xsd:element | xsd:complexType">
<xsl:if test="count(xsd:annotation[contains(xsd:documentation, 'Deprecated')]) = 0">
<xsl:apply-templates select="."/>
</xsl:if>
</xsl:for-each>
</xsl:copy>
</xsl:template>
However, under XSLT 2.0, I get an error because contains can't take a more than xsd:documentation element. What is correct way to handle this under XSLT 2.0.
(: first xsd:documentation :) xsd:documentation[1]
(: all xsd:documentation concatenated :) string-join(xsd:documentation, '')
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT 2.0 contains questio, G. Ken Holman | Thread | [xsl] Altsoft Xml2PDF 2007 is avail, Stanislav Sobolevsky |
Re: [xsl] Removing namespaces witho, Abel Braaksma | Date | [xsl] XSLT 2.0 contains question, David Carver |
Month |