Index: /SMC/trunk/SMC/src/eu/clarin/cmdi/smc/SMC.java
===================================================================
--- /SMC/trunk/SMC/src/eu/clarin/cmdi/smc/SMC.java	(revision 1649)
+++ /SMC/trunk/SMC/src/eu/clarin/cmdi/smc/SMC.java	(revision 1650)
@@ -32,4 +32,5 @@
  */
 public class SMC {
+	private static String appname="smc"; 
 	
 	public SMC () {
@@ -49,5 +50,6 @@
 			
 		SMC smc = new SMC();
-		smc.init();		
+
+		//smc.init();		
 		
 		InputStream is = smc.listTermsets("");
@@ -59,9 +61,9 @@
 
 	public void configure(){
-		Utils.loadConfig("smc", "smc.properties", this.getClass().getClassLoader());
+		Utils.loadConfig(appname, "smc.properties", this.getClass().getClassLoader());
 	}
 	public void configure(String configPath) {
 		try {
-			Utils.loadConfig("smc", configPath, this.getClass().getClassLoader());
+			Utils.loadConfig(appname, configPath, this.getClass().getClassLoader());
 			
 			//config = new PropertiesConfiguration("smc.properties");
@@ -76,5 +78,5 @@
  */
 	public void init () {
- 
+		 
 		InputStream is =null;
 		is = Utils.load2Stream(Utils.getConfig("termsets.config.file"),this.getClass().getClassLoader());
@@ -83,5 +85,6 @@
 		
 		MDTransformer transformer = new MDTransformer();
-		//transformer.configure(config, this.getClass().getClassLoader());
+		transformer.configure(Utils.getAppConfig(appname), this.getClass().getClassLoader());
+		
 		// set URL as srcFile (for MDTransformer to pass to xsl-scripts)
 		// TODO: WHY??
@@ -90,5 +93,5 @@
 
 		// this is necessary for the transformer (in MDUTILS-library) to search for the resources (config and xsls) in the correct context)
-		transformer.configure(Utils.getConfig(), this.getClass().getClassLoader());
+		//transformer.configure(Utils.getConfig(), this.getClass().getClassLoader());
 		
 		transformer.setParams(getParams());		
@@ -103,5 +106,5 @@
 			//String output_path = config.getString("cache.dir") +  getParam("data_key") + ".xml" ;
 			File f = Utils.write2File(output_path, resultStream);
-			log.debug("result stored in: " + f.getAbsolutePath());
+			log.debug("SMC.init(): result stored in: " + f.getAbsolutePath());
 
 		} catch (IOException e1) {
@@ -195,5 +198,5 @@
 	 * @return stream with XML listing the available termsets
 	 */
-	public InputStream listTermsets(String context) {
+	public InputStream listTermsets(String context) {		
 		InputStream is =null;
 		is = Utils.load2Stream(Utils.getConfig("termsets.config.file").trim(), this.getClass().getClassLoader());
@@ -207,5 +210,36 @@
 	 */	
 	public InputStream listTerms(String context) {
-		return null;
+		 
+		InputStream is =null;
+		is = Utils.load2Stream(Utils.getConfig("termsets.config.file"),this.getClass().getClassLoader());
+		
+		MDTransformer transformer = new MDTransformer();
+		// this is necessary for the transformer (in MDUTILS-library) to search for the resources (config and xsls) in the correct context)
+		transformer.configure(Utils.getAppConfig(appname), this.getClass().getClassLoader());
+		
+		// set URL as srcFile (for MDTransformer to pass to xsl-scripts)
+		// TODO: WHY??
+		//transformer.setSrcFile(Utils.getConfig("termsets.config.file"));
+		
+		addParam("set", context);
+		 
+		transformer.setParams(getParams());		
+		transformer.setTranskey("op");
+
+		InputStream resultStream=null;
+		try {
+			resultStream = transformer.transformXML(is);
+
+		} catch (IOException e1) {
+			log.debug(Utils.errorMessage(e1));
+		} catch (InterruptedException e1) {
+			log.debug(Utils.errorMessage(e1));
+		} catch (TransformerException e1) {		
+			log.debug(Utils.errorMessage(e1));
+		} catch (NoStylesheetException e1) {
+			log.debug(Utils.errorMessage(e1));
+		}
+		
+		return resultStream;
 	}
 	
@@ -216,5 +250,36 @@
 	 */
 	public InputStream map(String term) {
-		return null;
+		 
+		InputStream is =null;
+		is = Utils.load2Stream(Utils.getConfig("termsets.config.file"),this.getClass().getClassLoader());
+		
+		MDTransformer transformer = new MDTransformer();
+		// this is necessary for the transformer (in MDUTILS-library) to search for the resources (config and xsls) in the correct context)
+		transformer.configure(Utils.getAppConfig(appname), this.getClass().getClassLoader());
+		
+		// set URL as srcFile (for MDTransformer to pass to xsl-scripts)
+		// TODO: WHY??
+		//transformer.setSrcFile(Utils.getConfig("termsets.config.file"));
+		
+		addParam("term", term);
+		 
+		transformer.setParams(getParams());		
+		transformer.setTranskey("op");
+
+		InputStream resultStream=null;
+		try {
+			resultStream = transformer.transformXML(is);
+
+		} catch (IOException e1) {
+			log.debug(Utils.errorMessage(e1));
+		} catch (InterruptedException e1) {
+			log.debug(Utils.errorMessage(e1));
+		} catch (TransformerException e1) {		
+			log.debug(Utils.errorMessage(e1));
+		} catch (NoStylesheetException e1) {
+			log.debug(Utils.errorMessage(e1));
+		}
+		
+		return resultStream;
 	}
 	
Index: /SMC/trunk/SMC/src/scripts/smc_op.xsl
===================================================================
--- /SMC/trunk/SMC/src/scripts/smc_op.xsl	(revision 1649)
+++ /SMC/trunk/SMC/src/scripts/smc_op.xsl	(revision 1650)
@@ -18,9 +18,10 @@
     
  <xsl:template match="/">
-     <xsl:choose>
-         <!-- if $term=*, list all terms -->
+     <xsl:choose>     
+     <!-- if $set=*, list all termsets -->
          <xsl:when test="$set='*' or $set='top'">
                 <xsl:copy-of select="my:getData('termsets')"></xsl:copy-of>             
-         </xsl:when>         
+         </xsl:when>
+             <!-- if $term=*, list all terms -->         
          <xsl:when test="$term='*'">
              <Termset set="{$set}" xml:lang="{$lang}">
@@ -36,6 +37,5 @@
              </xsl:for-each>
          </xsl:otherwise>
-     </xsl:choose>
-     
+     </xsl:choose>     
      
  </xsl:template>
Index: /SMC/trunk/SMC/src/scripts/smc_stats.xsl
===================================================================
--- /SMC/trunk/SMC/src/scripts/smc_stats.xsl	(revision 1649)
+++ /SMC/trunk/SMC/src/scripts/smc_stats.xsl	(revision 1650)
@@ -27,5 +27,5 @@
 -->
  
-<xsl:import href="cmd_commons.xsl"/>
+<!--<xsl:import href="cmd_commons.xsl"/>-->
     
 <xsl:output method="xml" indent="yes" />
Index: /SMC/trunk/SMC/src/smc.properties
===================================================================
--- /SMC/trunk/SMC/src/smc.properties	(revision 1649)
+++ /SMC/trunk/SMC/src/smc.properties	(revision 1650)
@@ -1,6 +1,7 @@
 termsets.config.file = smc_config.xml
-#cache.dir = C:/Users/m/3lingua/clarin/CMDI/SMC/cache/
-cache.dir = C:/apache-tomcat-6.0.26/webapps/SMC_cache/
+cache.dir = C:/Users/m/3lingua/clarin/CMDI/SMC/cache/
+#cache.dir = C:/apache-tomcat-6.0.26/webapps/SMC_cache/
 
 scripts.path = scripts/
 xsl.init = smc_init.xsl
+xsl.map = smc_op.xsl
