[Yanel-commits] rev 20504 - public/yanel/branches/sandbox/src/resources/xml/src/java/org/wyona/yanel/impl/resources

josias at wyona.com josias at wyona.com
Fri Dec 1 16:51:12 CET 2006


Author: josias
Date: 2006-12-01 16:51:11 +0100 (Fri, 01 Dec 2006)
New Revision: 20504

Modified:
   public/yanel/branches/sandbox/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
fixed path to include resources with ViewableV1. this should fix the news page with the atom feed.

Modified: public/yanel/branches/sandbox/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/branches/sandbox/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2006-12-01 14:36:41 UTC (rev 20503)
+++ public/yanel/branches/sandbox/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java	2006-12-01 15:51:11 UTC (rev 20504)
@@ -123,10 +123,12 @@
     private InputStream getContentXML(Repository repo, String yanelPath) throws Exception {
         if (yanelPath != null) {
             log.debug("Yanel Path: " + yanelPath);
-            Resource res = yanel.getResourceManager().getResource(realm, new Path(yanelPath));
+            Resource res = yanel.getResourceManager().getResource(getRealm(), new Path(yanelPath));
             if (ResourceAttributeHelper.hasAttributeImplemented(res, "Viewable", "1")) {
                 // TODO: Pass the request ...
-                View view = ((ViewableV1) res).getView(path, null);
+                String viewV1path = getRealm().getMountPoint() + yanelPath.substring(1);
+                log.debug("including document: " + viewV1path);
+                View view = ((ViewableV1) res).getView(new Path(viewV1path), null);
                 if (view.getMimeType().indexOf("xml") >= 0) {
                     // TODO: Shall the mime-type be transfered?
                     return view.getInputStream();




More information about the Yanel-commits mailing list