Re: [xsl] How to strip off all <xsd:annotation> ...</xsd.annotation> tags

Subject: Re: [xsl] How to strip off all <xsd:annotation> ...</xsd.annotation> tags
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Wed, 12 Aug 2009 14:25:15 +0200
Ben Stover schrieb:

Error on line 10 of stripannotationtags.xsl:
  XTDE0410: An attribute node (targetNamespace) cannot be created
  after the children of the containing element at xsl:apply-templates
     processing /xsd:schema/@targetNamespace
  in built-in template rule
Transformation failed: Run-time errors were reported


<xsl:template match="xsd:annotation"/>

     <xsl:template match="@* | node()">
         <xsl:apply-templates select="@* | node()"/>



Martin's stylesheet module looks fool-proof to me. (By which I'm not
trying to imply that you're a a fool, of course.) Retry this on the
command line, it should just work:

java -jar saxon9.jar input.xsd stripannotationtags.xsl

And if it does, the error is in how you invoke your transformation.

Michael Ludwig

Current Thread