voici mon probleme
I have to "sort" an XML using the following XSL. This XSL gets rid of the node characteristic of type SETTINGSET.
I was thinking to use xsl:sort. I found examples using values but none using nodes as criteria.
I have to move up the parm element just before the node characteristic.
current XSL
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl utput method="xml" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()[not(@type='SETTINGSET')]"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
actual XML
<characteristic type="PXLOGICAL">
<characteristic type="PORT">
<parm name="PORTNBR" value="8080"/>
</characteristic>
<characteristic type="PXPHYSICAL">
<parm name="PXADDR" value="131.111.3.4"/>
<parm name="PXADDRTYPE" value="IPV4"/>
<parm name="TO-NAPID" value="Browsing_GPRS"/>
</characteristic>
<parm name="PROXY-ID" value="PROXY1"/>
<parm name="NAME" value="Proxy 1"/>
</characteristic>
Expected XML:
<characteristic type="PXLOGICAL">
<parm name="PROXY-ID" value="PROXY1"/>
<parm name="NAME" value="Proxy 1"/>
<characteristic type="PORT">
<parm name="PORTNBR" value="8080"/>
</characteristic>
<characteristic type="PXPHYSICAL">
<parm name="PXADDR" value="131.111.3.4"/>
<parm name="PXADDRTYPE" value="IPV4"/>
<parm name="TO-NAPID" value="Browsing_GPRS"/>
</characteristic>
</characteristic>