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

michi at wyona.com michi at wyona.com
Mon Dec 3 14:57:55 CET 2007


Author: michi
Date: 2007-12-03 14:57:54 +0100 (Mon, 03 Dec 2007)
New Revision: 29478

Modified:
   public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
Log:
namespaces as workaround added

Modified: public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java
===================================================================
--- public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java	2007-12-03 13:50:24 UTC (rev 29477)
+++ public/yanel/contributions/realms/foaf/src/resources/foaf/src/java/org/wyona/yanel/impl/resources/foaf/FOAFResource.java	2007-12-03 13:57:54 UTC (rev 29478)
@@ -87,7 +87,8 @@
             }
 
             StringBuffer sb = new StringBuffer("<?xml version=\"1.0\"?>");
-            sb.append("<wyona:foaf xmlns:wyona=\"http://www.wyona.org/foaf/1.0\">");
+// WORKAROUND: The XIncludeTransformer does to propagate the namespaces ...
+            sb.append("<wyona:foaf xmlns:wyona=\"http://www.wyona.org/foaf/1.0\" xmlns:admin=\"http://webns.net/mvcb/\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:i18n=\"http://www.wyona.org/yanel/i18n/1.0\" xmlns:xi=\"http://www.w3.org/2001/XInclude\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:foaf=\"http://xmlns.com/foaf/0.1/\" xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">");
             if (getRequest().getParameter("href") != null) {
                 sb.append("<wyona:third-party-source href=\"" + getRequest().getParameter("href") + "\"/>");
             } else {
@@ -147,8 +148,8 @@
 */
                 return view;
             } else {
-                return getXMLView(viewId, new StringBufferInputStream(sb.toString()));
-                //return getXMLView(viewId, new java.io.ByteArrayInputStream(baos.toByteArray()));
+                //return getXMLView(viewId, new StringBufferInputStream(sb.toString()));
+                return getXMLView(viewId, new java.io.ByteArrayInputStream(baos.toByteArray()));
             }
         } catch (java.io.FileNotFoundException e) {
             log.error(e);



More information about the Yanel-commits mailing list