[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSLT transforming from soap xml to E2B-R2 xml form

Subject: Re: XSLT transforming from soap xml to E2B-R2 xml format
From: "LEGAULT, PHILLIP plegault@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 7 Jun 2023 16:20:34 -0000
Re:  XSLT transforming from soap xml to E2B-R2 xml form
XSLT 2

From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, June 7, 2023 11:36 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re:  XSLT transforming from soap xml to E2B-R2 xml
format



On 6/7/2023 5:28 PM, LEGAULT, PHILLIP
plegault@xxxxxxxxxx<mailto:plegault@xxxxxxxxxx> wrote:
Ibm splitting a large soap xml file into multiple files then running a
transformation on each file.
Ibm left with:

<?xml version="1.0" encoding="UTF-8"?>
<ichicsr xmlns="urn:enterprise.soap.sforce.com"
         xmlns:sf="urn:sobject.enterprise.soap.sforce.com"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<http://www.w3.
org/2001/XMLSchema-instance>
         lang="en">
b&b&..
b&b&b&
</ichicsr>

What I want to end up with is like:
<xmlFile>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ichicsr SYSTEM
"http://eudravigilance.ema.europa.eu/dtd/icsr21xml.dtd"<http://eudravigilance
.ema.europa.eu/dtd/icsr21xml.dtd>>

b&b&b&b&b&..
b&b&b&b&..

    </ichicsr>
</xmlFile>





You haven't shown your existing code but assuming XSLT 3 there is the XPath
3.1 serialize function you can use e.g.



  <xsl:template match="ichics"
xpath-default-namespace="urn:enterprise.soap.sforce.com">

    <xsl:result-document href="result-{generate-id()}.xml">

     <xmlFile>

      <xsl:value-of select="serialize(., map { 'method': 'xml',
'doctype-system': 'http://eudravigilance.ema.europa.eu/dtd/icsr21xml.dtd'
})"/>

    </xmlFile>

  </xsl:result-document>

</xsl:template>
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3514465> (by
email<>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.