|
|
@@ -0,0 +1,28 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<xsl:stylesheet
|
|
|
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
|
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
+ xmlns:http="http://expath.org/ns/http-client"
|
|
|
+ version="2.0">
|
|
|
+<!-- usage: java -jar /opt/local/share/java/saxon9he.jar -xsl:test-xml-variable.xsl -it:main -->
|
|
|
+ <xsl:output method="xml" indent="yes" />
|
|
|
+
|
|
|
+ <xsl:template name="main">
|
|
|
+ <xsl:variable name="externalXmlFile1_local" select="document('example-1.xml')/root"/>
|
|
|
+ <xsl:variable name="externalHttpXmlFile1_http" select="document('https://biuro.biall-net.pl/dev-pl/se-master/schema/test-xslt-2-http/example-1.xml')/root"/>
|
|
|
+ <xsl:variable name="externalHttpXml_404" select="document('https://biuro.biall-net.pl/dev-pl/se-master/schema/test-xslt-2-http/404.xml')/root"/>
|
|
|
+
|
|
|
+ <xsl>
|
|
|
+ <version><xsl:value-of select="system-property('xsl:version')" /></version>
|
|
|
+ <vendor><xsl:value-of select="system-property('xsl:vendor')" /></vendor>
|
|
|
+ <url><xsl:value-of select="system-property('xsl:vendor-url')" /></url>
|
|
|
+ </xsl>
|
|
|
+
|
|
|
+ <external_xml_file_variables>
|
|
|
+ <example_1_local xpath="$externalXmlFile1_local/child2/child2_1"><xsl:value-of select="$externalXmlFile1_local/child2/child2_1"/></example_1_local>
|
|
|
+ <example_1_http xpath="$externalHttpXmlFile1_http/child2/child2_1"><xsl:value-of select="$externalHttpXmlFile1_http/child2/child2_1"/></example_1_http>
|
|
|
+ <example_1_http_404 xpath="$externalHttpXml_404/child2/child2_1"><xsl:value-of select="$externalHttpXml_404/child2/child2_1"/></example_1_http_404>
|
|
|
+ </external_xml_file_variables>
|
|
|
+
|
|
|
+ </xsl:template>
|
|
|
+</xsl:stylesheet>
|