xsl-list
[Top] [All Lists]

[xsl] zap some node

2006-09-27 07:01:44
Hi to all.
i have this input :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <soapenv:Body>
<cup:RISPOSTA_INFORMAZIONI_ASSISTITO DataOra="200609251535" idCUP="2" xmlns="http://regione.campania.it/schemas/cup"; xmlns:cup="http://regione.campania.it/schemas/cup";>
        <cup:ASSISTITO>
           <cup:CodFiscale>TRNCMN78S24F839Y</cup:CodFiscale>
           <cup:Nome>CARMINE</cup:Nome>
           <cup:Cognome>TARANTO</cup:Cognome>
           <cup:Sesso>M</cup:Sesso>
           <cup:DataNascita>19781124</cup:DataNascita>
           <cup:TipoEsenzione>3</cup:TipoEsenzione>
           <cup:Indirizzo>VIA</cup:Indirizzo>
           <cup:Domicilio>NAPOLI</cup:Domicilio>
           <cup:Citta>NAPOLI</cup:Citta>
           <cup:Provincia>NA</cup:Provincia>
        </cup:ASSISTITO>
     </cup:RISPOSTA_INFORMAZIONI_ASSISTITO>
  </soapenv:Body>
</soapenv:Envelope>


And i apply this xslt for change a name of an'attribute, but i need with the same xslt to zap some node such as this : TipoEsenzione how to to this :
xslt:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:cup="http://regione.campania.it/schemas/cup";>
   <xsl:strip-space elements="*"/>
   <xsl:output indent="yes"/>
<xsl:template match="*">
       <xsl:copy>
           <xsl:copy-of select="@*[name()!='idCUP']"/>
           <xsl:if test="@idCUP">
                   <xsl:attribute name="idCup">
                       <xsl:value-of select="@idCUP">
                       </xsl:value-of>
                   </xsl:attribute>
           </xsl:if>
           <xsl:apply-templates/>
       </xsl:copy>
   </xsl:template>



</xsl:stylesheet>



--~------------------------------------------------------------------
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>
--~--