xsl-list
[Top] [All Lists]

Re: [xsl] Converting from xml to xml using xslt

2008-02-28 08:20:20
Bhashetty, Mahesh (GTI) wrote:

                I would like to replace the xml header with the soap
envelope header and everything else should remain the same.
                How should I test this xsl? Which is simple and good
xslt processor?



                For example:

                I/P: <?xml version="1.0" encoding="UTF-8"?>

                        <Reports><Report DocumentID="3310218" ....>
...... <Reports>


O/P:
                                <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
                                <soap:Body><setResearchOpinion
xmlns="http://www.dsd.ml.com/x4ml/TGRPC0HQ/Custom";>

                        <Reports><Report DocumentID="3310218"  ....>
...../Reports>
                        <soap:Body>
                        </soap:Envelope>

  <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0"

    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:template match="/">

<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
                                <soap:Body><setResearchOpinion
xmlns="http://www.dsd.ml.com/x4ml/TGRPC0HQ/Custom";>

                        
  <xsl:copy-of select="*"/>

                        <soap:Body>
                        </soap:Envelope>
   </xsl:template>
 </xsl:stylesheet>



--

        Martin Honnen
        http://JavaScript.FAQTs.com/

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

<Prev in Thread] Current Thread [Next in Thread>