Sign In/My Account | View Cart  
advertisement

Article:
 Namespaces, Name With Spaces, and Attribute Values
Subject: How do I ignore elements or attributes in a particular namespace?
Date: 2003-10-22 13:25:09
From: Salvatore Mangano

The following is certainly a better way to filter out a namespace while copying.


-Sal Mangano


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="a" xmlns:b="b" exclude-result-prefixes="b">


<xsl:output method="xml" indent="yes"/>


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


<xsl:template match="@b:*" priority="10"/>


</xsl:stylesheet>


No Previous Message Previous Message   Next Message Next Message


Sponsored By: