aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-10-29 17:31:13 +0100
committerAdrian Kummerlaender2014-10-29 17:31:13 +0100
commit1b1d2cec7638e7af08c5cff2c0799aa9605fb58d (patch)
tree8e5ada5924a5b52b8d020b4894369881312c8b73 /src
parenta5b9f0faee9efdb950aa0558bb68cb320a9e72a4 (diff)
downloadStaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.tar
StaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.tar.gz
StaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.tar.bz2
StaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.tar.lz
StaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.tar.xz
StaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.tar.zst
StaticXSLT-1b1d2cec7638e7af08c5cff2c0799aa9605fb58d.zip
Fixed transformation datasource query
* recent commit `71a637` in upstream _InputXSLT_ activated namespace comprehension for `InputXSLT:read-file` and `InputXSLT:external-command` ** this enabled both a simplification of the meta variable query and forced a namespace-independent version of the main and support datasource query
Diffstat (limited to 'src')
-rw-r--r--src/steps/process.xsl13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/steps/process.xsl b/src/steps/process.xsl
index 67c7f24..9b9552a 100644
--- a/src/steps/process.xsl
+++ b/src/steps/process.xsl
@@ -168,10 +168,11 @@
<xsl:template name="process">
<xsl:param name="task"/>
- <xsl:variable name="transformation" select="InputXSLT:read-file($task/source)/self::file/node()"/>
- <xsl:variable name="meta" select="$transformation/self::*[name() = 'xsl:stylesheet']/*[name() = 'xsl:variable' and @name = 'meta']"/>
- <xsl:variable name="main_source" select="$meta/datasource[@type = 'main']"/>
- <xsl:variable name="support_source" select="$meta/datasource[@type = 'support']"/>
+ <xsl:variable name="transformation" select="InputXSLT:read-file($task/source)/self::file/xsl:stylesheet"/>
+ <xsl:variable name="meta" select="$transformation/self::xsl:stylesheet/xsl:variable[@name = 'meta']"/>
+ <xsl:variable name="main_source" select="$meta/*[local-name() = 'datasource' and @type = 'main']"/>
+ <xsl:variable name="support_source" select="$meta/*[local-name() = 'datasource' and @type = 'support']"/>
+ <xsl:variable name="target" select="$meta/*[local-name() = 'target']"/>
<xsl:choose>
<xsl:when test="$main_source/@mode = 'iterate'">
@@ -188,7 +189,7 @@
<xsl:with-param name="transformation" select="$transformation"/>
<xsl:with-param name="datasource_prefix" select="$task/meta/datasource_prefix"/>
<xsl:with-param name="target_prefix" select="$task/target"/>
- <xsl:with-param name="target" select="$meta/target"/>
+ <xsl:with-param name="target" select="$target"/>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
@@ -221,7 +222,7 @@
<xsl:with-param name="transformation" select="$transformation"/>
<xsl:with-param name="datasource_prefix" select="$task/meta/datasource_prefix"/>
<xsl:with-param name="target_prefix" select="$task/target"/>
- <xsl:with-param name="target" select="$meta/target"/>
+ <xsl:with-param name="target" select="$target"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>