diff options
Diffstat (limited to 'generate.xsl')
-rw-r--r-- | generate.xsl | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/generate.xsl b/generate.xsl index f307085..65a49f3 100644 --- a/generate.xsl +++ b/generate.xsl @@ -15,6 +15,7 @@ /> <xsl:include href="utility/transformer.xsl"/> +<xsl:include href="utility/generator.xsl"/> <xsl:variable name="context" select="/"/> @@ -33,20 +34,37 @@ </xsl:call-template> </xsl:template> -<xsl:template match="meta"> - <xsl:call-template name="transform_in_context"> - <xsl:with-param name="transformation">[result.xsl]</xsl:with-param> +<xsl:template name="generate_in_context"> + <xsl:param name="input"/> + <xsl:param name="transformation"/> + <xsl:param name="target"/> + + <xsl:call-template name="generator"> <xsl:with-param name="input"> - <xsl:call-template name="transform_in_context"> - <xsl:with-param name="transformation">[datasource.xsl]</xsl:with-param> - <xsl:with-param name="input"> - <xsl:call-template name="transform_in_context"> - <xsl:with-param name="transformation">[source.xsl]</xsl:with-param> - </xsl:call-template> - </xsl:with-param> - </xsl:call-template> + <data> + <xsl:copy-of select="$context"/> + <xsl:copy-of select="$input"/> + </data> </xsl:with-param> + <xsl:with-param name="transformation" select="$transformation"/> + <xsl:with-param name="target" select="$target"/> </xsl:call-template> </xsl:template> +<xsl:template match="meta"> + <xsl:variable name="source"> + <xsl:call-template name="transform_in_context"> + <xsl:with-param name="transformation">[source.xsl]</xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:for-each select="InputXSLT:read-directory(./source/datasource)/entry[./extension = '.xsl']"> + <xsl:call-template name="generate_in_context"> + <xsl:with-param name="input" select="$source"/> + <xsl:with-param name="transformation" select="./full"/> + <xsl:with-param name="target" select="concat($context/meta/target/datasource, '/', ./name, '.xml')"/> + </xsl:call-template> + </xsl:for-each> +</xsl:template> + </xsl:stylesheet> |