I am using SAS PROC XSL to create a new XML by consolidating info from more than one XML. For this purpose am using Document() function with path to the XML file in the (). This code is working fine when I submit the code on Windows, but not on LINUX server. To my surprise there is no error or warning message in the log. I am using XSL processer 1.0.
content of xsl file used
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<root>
<xsl:comment>One Argument </xsl:comment>
<xsl:for-each select="document('/project/dev/xml_test/b.xml')//a">
<xsl:copy-of select="."/>
</xsl:for-each>
<xsl:comment>Two Argument </xsl:comment>
<xsl:for-each select="document('/project/dev/xml_test/a.xml', .)//a">
<xsl:copy-of select="."/>
</xsl:for-each>
</root>
</xsl:template>
</xsl:stylesheet>
SAS code:
filename infile "/project/dev/xml_test/b.xml" ;
filename style "/project/dev/xml_test/xslfile.xsl"; --the content is as given above
filename outfile "/project/dev/xml_test/c.xml";
proc xsl in=infile xsl=style out=outfile;
run;