You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
153 lines
4.2 KiB
153 lines
4.2 KiB
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:sql="org.apache.xalan.lib.sql.XConnection" extension-element-prefixes="sql"> |
|
<xsl:import href="xsl_functions.xsl" /> |
|
<xsl:output method="xml" indent="yes"/> |
|
|
|
<xsl:template match="/"> |
|
<superx-unload version="0.6"> |
|
<categories> |
|
<category id="cat_4d">4d</category> |
|
</categories> |
|
<parameters> |
|
</parameters> |
|
<table name=""> |
|
<output file="" path="" /> |
|
</table> |
|
<xsl:for-each select="database/table"> |
|
<unload-job> |
|
<xsl:attribute name="id"><xsl:value-of select="@name" /></xsl:attribute> |
|
<xsl:attribute name="extraction-table"><xsl:value-of select="@name" /></xsl:attribute> |
|
<xsl:attribute name="transfer-unload-file"><xsl:text>unl/</xsl:text> |
|
<xsl:call-template name="lcaseOhneUmlaut" > |
|
<xsl:with-param name="s1" select="@name"/> |
|
</xsl:call-template><xsl:text>.unl</xsl:text> |
|
</xsl:attribute> |
|
</unload-job> |
|
</xsl:for-each> |
|
</superx-unload> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template match="row"> |
|
<TR> |
|
<xsl:apply-templates select="fld"/> |
|
</TR> |
|
</xsl:template> |
|
|
|
<xsl:template match="fld"> |
|
<TD> |
|
<xsl:call-template name="key_string"> |
|
<xsl:with-param name="fldname" select="@name"/> |
|
<xsl:with-param name="fldval" select="text()"/> |
|
</xsl:call-template> |
|
|
|
</TD> |
|
</xsl:template> |
|
<xsl:template name="key_string"> |
|
<xsl:param name="fldname"/> |
|
<xsl:param name="fldval"/> |
|
<xsl:choose> |
|
<xsl:when test="$fldname='abschluss'"> |
|
<xsl:call-template name="get_abschluss"> |
|
<xsl:with-param name="abschluss_key" select="text()"/> |
|
</xsl:call-template> |
|
</xsl:when> |
|
<xsl:when test="$fldname='fach'"> |
|
<xsl:call-template name="get_stg"> |
|
<xsl:with-param name="stg_key" select="text()"/> |
|
</xsl:call-template> |
|
</xsl:when> |
|
<xsl:when test="$fldname='vertfg'"> |
|
<xsl:call-template name="get_vertfg"> |
|
<xsl:with-param name="vertfg_key" select="text()"/> |
|
</xsl:call-template> |
|
</xsl:when> |
|
<xsl:when test="$fldname='schwp'"> |
|
<xsl:call-template name="get_schwp"> |
|
<xsl:with-param name="schwp_key" select="text()"/> |
|
</xsl:call-template> |
|
</xsl:when> |
|
<xsl:otherwise> |
|
<xsl:value-of select="$fldval"/> |
|
</xsl:otherwise> |
|
</xsl:choose> |
|
</xsl:template> |
|
<xsl:template name="abschluss"> |
|
<xsl:for-each select = "document('unl/k_abint.xml')"> |
|
</xsl:for-each> |
|
|
|
</xsl:template> |
|
<xsl:template name="get_abschluss"> |
|
<xsl:param name="abschluss_key"/> |
|
<xsl:for-each select = "document('unl/k_abint.xml')"> |
|
<xsl:for-each select="rs/row"> |
|
<xsl:for-each select="fld[@name='abint']"> |
|
<xsl:if test="$abschluss_key=."> |
|
<xsl:call-template name="get_text"> |
|
</xsl:call-template> |
|
<xsl:text>(</xsl:text><xsl:value-of select="." /><xsl:text>)</xsl:text> |
|
</xsl:if> |
|
|
|
</xsl:for-each> |
|
</xsl:for-each> |
|
</xsl:for-each> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template name="get_stg"> |
|
<xsl:param name="stg_key"/> |
|
<xsl:for-each select = "document('unl/k_stg.xml')"> |
|
<xsl:for-each select="rs/row"> |
|
<xsl:for-each select="fld[@name='stg']"> |
|
<xsl:if test="$stg_key=."> |
|
<xsl:call-template name="get_text"> |
|
</xsl:call-template> |
|
<xsl:text>(</xsl:text><xsl:value-of select="." /><xsl:text>)</xsl:text> |
|
</xsl:if> |
|
|
|
</xsl:for-each> |
|
</xsl:for-each> |
|
</xsl:for-each> |
|
|
|
</xsl:template> |
|
<xsl:template name="get_vertfg"> |
|
<xsl:param name="vertfg_key"/> |
|
<xsl:for-each select = "document('unl/k_vert.xml')"> |
|
<xsl:for-each select="rs/row"> |
|
<xsl:for-each select="fld[@name='vert']"> |
|
<xsl:if test="$vertfg_key=."> |
|
<xsl:call-template name="get_text"> |
|
</xsl:call-template> |
|
<xsl:text>(</xsl:text><xsl:value-of select="." /><xsl:text>)</xsl:text> |
|
</xsl:if> |
|
|
|
</xsl:for-each> |
|
</xsl:for-each> |
|
</xsl:for-each> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template name="get_schwp"> |
|
<xsl:param name="schwp_key"/> |
|
<xsl:for-each select = "document('unl/k_schwp.xml')"> |
|
<xsl:for-each select="rs/row"> |
|
<xsl:for-each select="fld[@name='schwp']"> |
|
<xsl:if test="$schwp_key=."> |
|
<xsl:call-template name="get_text"> |
|
</xsl:call-template> |
|
<xsl:text>(</xsl:text><xsl:value-of select="." /><xsl:text>)</xsl:text> |
|
</xsl:if> |
|
|
|
</xsl:for-each> |
|
</xsl:for-each> |
|
</xsl:for-each> |
|
|
|
</xsl:template> |
|
|
|
<!--Allgemeine Funktionen --> |
|
<xsl:template name="get_text"> |
|
<xsl:for-each select="../fld[@name='dtxt']"> |
|
<xsl:value-of select="." /> |
|
</xsl:for-each> |
|
</xsl:template> |
|
</xsl:stylesheet>
|
|
|