|
Subject: Re: [xsl] Embedding XML in another XML From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 26 Jun 2018 11:46:43 -0000 |
This is easily achieved in XSLT 3.0 using the fn:serialize() function:
<element>{
serialize($innerXML)
}</element>
With a 1.0 processor you may be able to implement serialize() as an extension
function.
Michael Kay
Saxonica
> On 26 Jun 2018, at 12:39, Willem Van Lishout willemvanlishout@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> Ibm required to produce an XML file like this using XSLT 1.0:
>
> <?xml version=b1.0b?>
> <root>
> <element>
> <?xml version="1.0" encoding="utf-16"?>
> <AXFRoot>
> <MAObject type="default" mdclass="EPISODE">
> <GUID dmname="">595233000</GUID>
> .....
> </element>
> </root>
>
> So basically I have to put a string-encoded XML structure inside another
XML. While I'm sure this is theoretically possible by just using <xsl:text>,
this does not seem like a sustainable way of working with long and deep
structures.
>
> Is this possible without resorting to 'heavier' programming solutions?
>
> If XSLT 2.0 or 3.0 can offer a solution I'd also like to hear.
>
> Unfortunately I am not able to adapt the software on the other side.
>
> Thanks,
> Willem
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/293509> (by email <>)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Embedding XML in another XML, Willem Van Lishout w | Thread | Re: [xsl] Embedding XML in another , Martin Honnen martin |
| [xsl] Embedding XML in another XML, Willem Van Lishout w | Date | Re: [xsl] Embedding XML in another , Martin Honnen martin |
| Month |