mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
README BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/xsl/README
mysqltest.xsl BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/xsl/mysqltest.xsl sel000001.xml BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/tests/sel000001.xml README BitKeeper file /home/mwagner/work/bk/mysql/mysql-test/xml/README
This commit is contained in:
4
mysql-test/xml/xsl/README
Normal file
4
mysql-test/xml/xsl/README
Normal file
@ -0,0 +1,4 @@
|
||||
XML Stylesheets for converting test cases in XML to other forms.
|
||||
|
||||
- mysqltest.xsl -> mysqltest format (text)
|
||||
|
59
mysql-test/xml/xsl/mysqltest.xsl
Normal file
59
mysql-test/xml/xsl/mysqltest.xsl
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:output method="text"/>
|
||||
|
||||
<xsl:template match="/"><xsl:apply-templates /></xsl:template>
|
||||
|
||||
<!-- Main Template -->
|
||||
|
||||
<xsl:template match="/test"># <xsl:apply-templates select="@name"/>
|
||||
#
|
||||
# Versions
|
||||
# --------<xsl:apply-templates select="version"/>
|
||||
#
|
||||
# Description
|
||||
# -----------<xsl:apply-templates select="description"/>
|
||||
#
|
||||
|
||||
<xsl:apply-templates select="connect"/>
|
||||
|
||||
<xsl:apply-templates select="connection"/>
|
||||
|
||||
<xsl:apply-templates select="sql"/>
|
||||
|
||||
<xsl:apply-templates select="resultfile"/>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- End Main Template -->
|
||||
|
||||
|
||||
<xsl:template match="version">
|
||||
# <xsl:apply-templates select="@value"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="description">
|
||||
# <xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="connect">
|
||||
connect(<xsl:apply-templates select="@name"/>, <xsl:apply-templates select="@host"/>, <xsl:apply-templates select="@user"/>, <xsl:apply-templates select="@pass"/>, <xsl:apply-templates select="@db"/>, <xsl:apply-templates select="@port"/>, <xsl:apply-templates select="@sock"/>)
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="connection">
|
||||
<xsl:text>
|
||||
connection </xsl:text><xsl:apply-templates select="@name"/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select="sql"/>
|
||||
<xsl:apply-templates select="resultfile"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="resultfile">@<xsl:apply-templates select="@name"/><xsl:text> </xsl:text><xsl:apply-templates select="sql"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sql">
|
||||
<xsl:apply-templates />;
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
Reference in New Issue
Block a user