Kevin Dean
Usenet Archive
- Joined
- Sep 9, 2003
- Messages
- 3
- Reaction score
- 0
I'm trying to create an XSL transformation that will strip out development-specific attributes from deployment descriptors and other XML files. I have already successfully done so with web.xml but I'm at a complete loss as to what is wrong with the one below. This is a very abbreviated server-config.wsdd:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration> <parameter name="adminPassword" value="admin"/> <parameter name="sendXsiTypes" value="true"/> <parameter name="sendMultiRefs" value="true"/> <parameter name="sendXMLDeclaration" value="true"/> <parameter name="axis.sendMinimizedElements" value="true"/> <requestFlow> <handler type="java
rg.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="session"/> </handler> <handler type="java
rg.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="request"/> <parameter name="extension" value=".jwr"/> </handler> <handler type="java
rg.apache.axis.handlers.SOAPMonitorHandler"/> </requestFlow> <responseFlow> <handler type="java
rg.apache.axis.handlers.SOAPMonitorHandler"/> </responseFlow> </globalConfiguration> </deployment>
What I'd like to do is copy the entire file but filter out the global request and response flow elements. To that end, I have created the following XSL:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl
utput method="xml" version="1.0" />
<xsl:template match="@*|node">
<xsl:copy>
<xsl:apply-templates select="@*|node" />
</xsl:copy>
</xsl:template>
<xsl:template match="/deployment/globalConfiguration/requestFlow" />
<xsl:template match="/deployment/globalConfiguration/responseFlow" /> </xsl:stylesheet>
Basically, I want the XSL transformation to remove the
/deployment/globalConfiguration/requestFlow and
/deployment/globalConfiguration/responseFlow paths. As I said earlier, I have done this quite successfully in web.xml (stripping out Axis administration servlet) but I'm stumped as to why this wouldn't be working in this instance.
Any help would be most appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration> <parameter name="adminPassword" value="admin"/> <parameter name="sendXsiTypes" value="true"/> <parameter name="sendMultiRefs" value="true"/> <parameter name="sendXMLDeclaration" value="true"/> <parameter name="axis.sendMinimizedElements" value="true"/> <requestFlow> <handler type="java
What I'd like to do is copy the entire file but filter out the global request and response flow elements. To that end, I have created the following XSL:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl
<xsl:template match="@*|node">
<xsl:copy>
<xsl:apply-templates select="@*|node" />
</xsl:copy>
</xsl:template>
<xsl:template match="/deployment/globalConfiguration/requestFlow" />
<xsl:template match="/deployment/globalConfiguration/responseFlow" /> </xsl:stylesheet>
Basically, I want the XSL transformation to remove the
/deployment/globalConfiguration/requestFlow and
/deployment/globalConfiguration/responseFlow paths. As I said earlier, I have done this quite successfully in web.xml (stripping out Axis administration servlet) but I'm stumped as to why this wouldn't be working in this instance.
Any help would be most appreciated.