xsl-list
[Top] [All Lists]

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

2009-08-05 09:23:24
Ben Stover wrote:
I would like to  strip off from a XSD schema file all annotation tags. In other 
words all elements

<xsd:annotation>
.....
</xsd:annotation>

should be eliminated from the XSD schema including when is inside such a tag.

How could I do this with a XSLT script?

  <xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
     xmlns:xsd="http://www.w3.org/2001/XMLSchema";
     version="1.0">

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

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

  </xsl:stylesheet>


--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--