topical media & game development

talk show tell print

professional-xml-15-Listing-15-22.txt / txt



  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
     <xsl:template match="*">
        <!-- Remove any prefixes -->
        <xsl:element name="{local-name()}">
            <!-- Work through attributes -->
            <xsl:for-each select="@*">
               <!-- Remove any attribute prefixes -->
               <xsl:attribute name="{local-name()}">
                  <xsl:value-of select="."/>
               </xsl:attribute>
            </xsl:for-each>
        <xsl:apply-templates/>
        </xsl:element>
     </xsl:template>
  </xsl:stylesheet>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.