this work,
But if i want to take all the value of ASSISTITO how to?
If there are a blank node like this <CodSanitario/>
i want to delete it but if CodSanitario have a value i want to
CodSanitario insteadof codFiscale.
I want if i have an input with valorizated tag, i want to display it,
and if the tag have no value i want to zap from ASSISTITO.
MMMM
Sorry for my english
Mukul Gandhi ha scritto:
Please try the following stylesheet:
<?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" indent="yes" />
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template>
<xsl:template match="*[local-name() =
'RICHIESTA_INFORMAZIONI_ASSISTITO']">
<RICHIESTA_INFORMAZIONI_ASSISTITO
xmlns="http://regione.campania.it/schemas/cup">
<xsl:copy-of select="@*[not(local-name() = 'idCup')]" />
<xsl:attribute name="idCUP"><xsl:value-of select="@idCup"
/></xsl:attribute>
<ASSISTITO>
<CodFiscale><xsl:value-of select="*[local-name() =
'ASSISTITO']/*[local-name() = 'CodFiscale']" /></CodFiscale>
</ASSISTITO>
</RICHIESTA_INFORMAZIONI_ASSISTITO>
</xsl:template>
</xsl:stylesheet>
I think above is probably the best way to solve this problem. But I
would be happy to see any better code.
On 10/17/06, Davide Antoni <davide(_dot_)antoni(_at_)italtbs(_dot_)com> wrote:
HI to all
i need an'help:
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>
<RICHIESTA_INFORMAZIONI_ASSISTITO DataOra="200603072355" idCup="1"
idOperatore="GABRIELE" xmlns="http://services.standardcup.esel.it">
<ASSISTITO>
<Citta/>
<CodFiscale>TRNCMN78S24F839Y</CodFiscale>
<CodPostale/>
<CodSanitario/>
<Cognome/>
<DataNascita/>
<Domicilio/>
<Email/>
<Indirizzo/>
<Nome/>
<Provincia/>
<Sesso></Sesso>
<Stato/>
<Telefono/>
<e-mail/>
<idImpegnativa/>
<Urgenza/>
</ASSISTITO>
</RICHIESTA_INFORMAZIONI_ASSISTITO>
</soapenv:Body>
</soapenv:Envelope>
and i need this output:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<RICHIESTA_INFORMAZIONI_ASSISTITO
xmlns="http://regione.campania.it/schemas/cup" DataOra="200603072355"
idCUP="1" idOperatore="GABRIELE">
<ASSISTITO>
<CodFiscale>TRNCMN78S24F839Y</CodFiscale>
</ASSISTITO>
</RICHIESTA_INFORMAZIONI_ASSISTITO>
</soapenv:Body>
</soapenv:Envelope>
It is possibile with voodoo xslt?
THANKS.
--~------------------------------------------------------------------
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>
--~--