Output of ZMS data tables as CSVAuthor: Diez B. Roggisch, Artnology; Dr. F. Hoffmann, SNTL Publishing, 2006/02/28 The abbreviation CSV (Character Separated Values, also Comma Separated Values) stands for a file format. A simply structured XML-code underlies the ZMS data table that can be transformed with DTML or XSLT to CSV. In this way ZMS data table contents can be transferred very easily to other database systems. The example shows the variant with XSLT.
For the transformation a ZMS-filter is applied consisting of one single process step: per XSL the XML-stream generated by ZMS is converted into a CSV-stream. The corresponding XSL-code processes the list of dictionary elements acc. to the following instruction and line-by-line writes out the values separated by a vertical bar (Download): <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="//list">
<xsl:for-each select="item">
<xsl:apply-templates select="dictionary"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
<xsl:template match="dictionary">
<xsl:for-each select="item">
<xsl:value-of select="text()"/>
<xsl:if test="position() < last()">
<xsl:text>|</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- suppress unneeded textual content -->
<xsl:template match="text()"/>
</xsl:stylesheet>
|
Home |
Sitemap |
Printversion |
Top |
Imprint |
pressinfo
© 2001-2008 Hoffmann+Liebenberg GmbH, SNTL Publishing GmbH & Co KG
|
ZMS is a partner project of medvalue.net