Re: [xsl] xslt create a variable from external xml file

Subject: Re: [xsl] xslt create a variable from external xml file
From: "LEGAULT, PHILLIP plegault@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Aug 2023 11:35:37 -0000
Thanks everyone for your help.
-Chris
Obviously I did not try this,
thank you!


From: Chris Papademetrious chrispitude@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Sunday, August 27, 2023 8:28 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: [xsl] xslt create a variable from external xml file

Hi Phillip,

Try a simple testcase consisting of the following three files in the same
local directory:

<!-- input.xml -->
<result/>


<!-- data.xml -->
<data>hello</data>


<!-- stylesheet.xsl -->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="3.0">
  <xsl:template match="/*">
    <xsl:copy>
      <xsl:value-of select="document('data.xml')/*"/>
    </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

When I run this on my system, I get:

$ java -jar $SAXON_JAR -xsl:stylesheet.xsl -s:input.xml
<?xml version="1.0" encoding="UTF-8"?><result>hello</result>

What do you get?

 - Chris





On Sun, Aug 27, 2023 at 6:49b/AM LEGAULT, PHILLIP
plegault@xxxxxxxxxx<mailto:plegault@xxxxxxxxxx>
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx
rytech.com>> wrote:
I have tried everything and Ibm unable to get the values from the external
xml file.

XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3514465> (by
email)
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3519310> (by
email)
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