java/dictionary-generator/concept.m.xsl
changeset 21 e7c9a8722f76
parent 15 93208f791318
child 25 00f9a66da2eb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/dictionary-generator/concept.m.xsl	Wed Jul 10 20:48:18 2013 +0200
     1.3 @@ -0,0 +1,48 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<xsl:stylesheet version="1.0"
     1.6 +	xmlns="http://www.w3.org/1999/xhtml"
     1.7 +	xmlns:h="http://www.w3.org/1999/xhtml"
     1.8 +	xmlns:d="https://telco.frantovo.cz/xmlns/dictionary"
     1.9 +	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    1.10 +	xmlns:fn="http://www.w3.org/2005/xpath-functions"
    1.11 +	xmlns:xs="http://www.w3.org/2001/XMLSchema"
    1.12 +	exclude-result-prefixes="fn h d xs">
    1.13 +	<xsl:output 
    1.14 +		method="text" 
    1.15 +		indent="no" 
    1.16 +		encoding="UTF-8"
    1.17 +		omit-xml-declaration="yes"/>
    1.18 +		
    1.19 +	<xsl:param name="tags"/>
    1.20 +	
    1.21 +	<!--
    1.22 +		Plain text template
    1.23 +	-->
    1.24 +	<xsl:template match="d:concept">
    1.25 +			<xsl:for-each select="d:term">
    1.26 +				<xsl:value-of select="@abbreviation"/>
    1.27 +				<xsl:if test="normalize-space(@abbreviation) and normalize-space(@completeForm)">: </xsl:if>
    1.28 +				<xsl:value-of select="@completeForm"/>
    1.29 +				<xsl:text>&#10;</xsl:text>
    1.30 +			</xsl:for-each>
    1.31 +
    1.32 +			<xsl:for-each select="d:explanation">
    1.33 +				<xsl:if test="normalize-space(.)">
    1.34 +					<xsl:text>&#10;</xsl:text>
    1.35 +					<xsl:apply-templates/>
    1.36 +					<xsl:text>&#10;</xsl:text>
    1.37 +				</xsl:if>
    1.38 +			</xsl:for-each>
    1.39 +			
    1.40 +			<xsl:if test="d:tag">
    1.41 +				<xsl:text>&#10;</xsl:text>
    1.42 +				<xsl:text>Tags: </xsl:text>
    1.43 +				<xsl:for-each select="d:tag">
    1.44 +					<xsl:variable name="tagID" select="text()"/>
    1.45 +					<xsl:apply-templates/>
    1.46 +					<xsl:if test="not(position() = last())"><xsl:text>, </xsl:text></xsl:if>
    1.47 +				</xsl:for-each>
    1.48 +			</xsl:if>
    1.49 +	</xsl:template>
    1.50 +
    1.51 +</xsl:stylesheet>