Subject: Re: [xsl] XSLT transforming from soap xml to E2B-R2 xml format From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 7 Jun 2023 15:35:07 -0000 |
On 6/7/2023 5:28 PM, LEGAULT, PHILLIP 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" > > B B B B B B B B 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"> > > b&b&b&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. B <xsl:template match="ichics" xpath-default-namespace="urn:enterprise.soap.sforce.com"> B B B <xsl:result-document href="result-{generate-id()}.xml"> B B B B <xmlFile> B B B B B <xsl:value-of select="serialize(., map { 'method': 'xml', 'doctype-system': 'http://eudravigilance.ema.europa.eu/dtd/icsr21xml.dtd' })"/> B B B </xmlFile> B </xsl:result-document> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT transforming from soap x, LEGAULT, PHILLIP ple | Thread | Re: [xsl] XSLT transforming from so, LEGAULT, PHILLIP ple |
[xsl] XSLT transforming from soap x, LEGAULT, PHILLIP ple | Date | Re: [xsl] XSLT transforming from so, Michael Kay mike@xxx |
Month |