[Yanel-commits] rev 58417 - public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend

michi at wyona.com michi at wyona.com
Fri May 20 15:32:07 CEST 2011


Author: michi
Date: 2011-05-20 15:32:06 +0200 (Fri, 20 May 2011)
New Revision: 58417

Modified:
   public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java
Log:
use source resolver

Modified: public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java	2011-05-20 13:31:29 UTC (rev 58416)
+++ public/yanel/contributions/realms/foaf/src/resources/findfriend/src/java/org/wyona/yanel/impl/resources/findfriend/FindFriendResource.java	2011-05-20 13:32:06 UTC (rev 58417)
@@ -8,6 +8,7 @@
 import org.wyona.yanel.core.api.attributes.ViewableV2;
 import org.wyona.yanel.core.attributes.viewable.View;
 import org.wyona.yanel.core.attributes.viewable.ViewDescriptor;
+import org.wyona.yanel.core.source.SourceResolver;
 
 import org.wyona.meguni.parser.Parser;
 import org.wyona.meguni.util.ResultSet;
@@ -23,14 +24,14 @@
 
 import java.io.File;
 
-import org.apache.log4j.Category;
+import org.apache.log4j.Logger;
 
 /**
  *
  */
 public class FindFriendResource extends Resource implements ViewableV2 {
 
-    private static Category log = Category.getInstance(FindFriendResource.class);
+    private static Logger log = Logger.getLogger(FindFriendResource.class);
 
     /**
      *
@@ -183,8 +184,8 @@
      *
      */
     private Transformer getTransformer() throws Exception {
-        File xsltFile = org.wyona.commons.io.FileUtil.file(rtd.getConfigFile().getParentFile().getAbsolutePath(), "xslt" + File.separator + "foaf2xhtml.xsl");
-        Transformer tf = TransformerFactory.newInstance().newTransformer(new StreamSource(xsltFile));
+        SourceResolver uriResolver = new SourceResolver(this);
+        Transformer tf = TransformerFactory.newInstance().newTransformer(uriResolver.resolve("rthtdocs:/xslt/foaf2xhtml.xsl", null));
 
         if (getRequest().getParameter("q") != null) {
             tf.setParameter("query", getRequest().getParameter("q"));



More information about the Yanel-commits mailing list