Line | |
---|
1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
3 | xmlns:my="myFunctions" |
---|
4 | version="2.0"> |
---|
5 | |
---|
6 | <!-- the stylesheet for the operation mode: |
---|
7 | uses the prepared map to resolve terms to other terms, or list available terms. |
---|
8 | --> |
---|
9 | <xsl:include href="smc_commons.xsl"/> |
---|
10 | |
---|
11 | <xsl:output indent="yes"></xsl:output> |
---|
12 | |
---|
13 | <!-- user input-params --> |
---|
14 | <xsl:param name="set">*</xsl:param> |
---|
15 | <xsl:param name="term"></xsl:param> |
---|
16 | <xsl:param name="lang">pt</xsl:param> |
---|
17 | |
---|
18 | |
---|
19 | <xsl:template match="/"> |
---|
20 | <xsl:choose> |
---|
21 | <!-- if $term=*, list all terms --> |
---|
22 | <xsl:when test="$set='*' or $set='top'"> |
---|
23 | <xsl:copy-of select="my:getData('termsets')"></xsl:copy-of> |
---|
24 | </xsl:when> |
---|
25 | <xsl:when test="$term='*'"> |
---|
26 | <Termset set="{$set}" xml:lang="{$lang}"> |
---|
27 | <xsl:for-each select="$dcr-cmd-map//Term[@set=$set and @xml:lang=$lang]" > |
---|
28 | <xsl:copy-of select="." /> |
---|
29 | </xsl:for-each> |
---|
30 | </Termset> |
---|
31 | </xsl:when> |
---|
32 | <xsl:otherwise> |
---|
33 | <xsl:variable name="matching_concepts" select="$dcr-cmd-map//Concept[Term=$term]"></xsl:variable> |
---|
34 | <xsl:for-each select="$matching_concepts//Term[@set='cmd']"> |
---|
35 | <xsl:value-of select="." />; |
---|
36 | </xsl:for-each> |
---|
37 | </xsl:otherwise> |
---|
38 | </xsl:choose> |
---|
39 | |
---|
40 | |
---|
41 | </xsl:template> |
---|
42 | |
---|
43 | </xsl:stylesheet> |
---|
Note: See
TracBrowser
for help on using the repository browser.