|
Subject: [xsl] Passing an XML fragment as a parameter From: "Charles O'Connor coconnor@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 28 Mar 2019 17:38:40 -0000 |
Hi,
I need to create a transform for our engineers to pass an XML fragment stored
in a SQL database into a document as a parameter. Testing this in Oxygen using
XSLT 3.0 and Saxon 9.7.0.15 is super easy. I can just declare the parameter
and then use the function fn:parse-xml-fragment:
<xsl:template match="article-meta/abstract">
<xsl:copy-of select="fn:parse-xml-fragment($NewAbstract)"/>
</xsl:template>
Unfortunately, the transform has to work in an environment limited to XSLT 2.0
(XMLPrime). Without the function, the angle brackets are interpreted as
greater and less than entities. (Various semi-embarrassing experiments I've
done to try to force the issue get the processor to complain that value of the
parameter is xs:untypedAtomic.)
I'm guessing this could be solved by saving the XML fragment as a document,
but is there a way to do it from memory?
Thanks,
Charles
Charles O'Connor l Business Analyst
Aries Systems Corporation l www.ariessys.com
50 High Street, Suite 21 l North Andover, MA l 01845 l USA
Direct: 802-585-5655
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] JSON to XML using XSLT 3., Mukul Gandhi gandhi. | Thread | Re: [xsl] Passing an XML fragment a, Christophe Marchand |
| Re: [xsl] JSON to XML using XSLT 3., Mukul Gandhi gandhi. | Date | Re: [xsl] Passing an XML fragment a, Christophe Marchand |
| Month |