From michael.wechner at wyona.com Tue Jan 1 23:19:23 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Tue Jan 1 23:07:30 2008 Subject: [Yanel-dev] XML Resource serializer problem Message-ID: <477ABC6B.8060300@wyona.com> Hi It seems to me that the XML resource has still some troubles re serializer in some cases. For instance when I try to serve some APP service document with mime type application/atomsvc+xml and it contains some XHTML snippets, then the APP namespace is being replaced by the XHTML namespace http://127.0.0.1:8080/yanel/yulup-demo/atom/entries/introspection-.xml resp. http://demo.yulup.org/atom/entries/introspection-.xml ... . Yulup Demo.. . Early Yulup <i>Releases& lt;/i>.. ... .. . Yulup Website.. . <div>Yul up <b>Releases</b></div>... ... .. whereas this doesn't happen when setting the mime type to application/xml within the resource config of this particular document. Also please note it doesn't happen for http://www.yulup.org/download/introspection-atom.xml or http://www.yulup.org/news-entries/introspection-atom.xml Any idea what might be wrong? Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Tue Jan 1 23:34:53 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Tue Jan 1 23:22:57 2008 Subject: [Yanel-dev] XML Resource serializer problem In-Reply-To: <477ABC6B.8060300@wyona.com> References: <477ABC6B.8060300@wyona.com> Message-ID: <477AC00D.6060208@wyona.com> Michael Wechner wrote: > Hi > > It seems to me that the XML resource has still some troubles re > serializer in some cases. For instance when I try to serve some APP > service document with mime type application/atomsvc+xml and it > contains some XHTML snippets, then the APP namespace is being replaced > by the XHTML namespace > > http://127.0.0.1:8080/yanel/yulup-demo/atom/entries/introspection-.xml > > resp. > > http://demo.yulup.org/atom/entries/introspection-.xml > > > ml version="1.0"?>. Strict//EN" "http://www.w3.org/T > R/xhtml1/DTD/xhtml1-strict.dtd">. xmlns="http://www.w3.org/1999/xhtml">. le="Yulup Demo">. Yulup Demo.. > f="../entries/?yanel.resource.viewid=atom">. type="html">Early Yulup <i>Releases& > lt;/i>.. ... .. title="Yulup Website">. le type="text">Yulup Website.. title="Releases" href="http://www.yulup.or > g/download/release-atom-entries/?yanel.resource.viewid=atom">. > <div>Yul > up <b>Releases</b></div>... ... > .. > > > whereas this doesn't happen when setting the mime type to > application/xml within the resource config of this particular > document. Also please note it doesn't happen for > > http://www.yulup.org/download/introspection-atom.xml > > or > > http://www.yulup.org/news-entries/introspection-atom.xml > > Any idea what might be wrong? it seems to me that src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java should retuen the view if no XSLT has been set String[] xsltPaths = viewDescriptor.getXSLTPaths(); if (xsltPaths == null || xsltPaths.length == 0) { xsltPaths = getXSLTPath(getPath()); } whereas I have noticed that even if no XSLT is being configured xsltPaths won't be null, because protected String[] getXSLTPath(String path) throws Exception { String[] xsltPath = getResourceConfigProperties("xslt"); if (xsltPath != null) return xsltPath; log.info("No XSLT Path within: " + path); return new String[0]; but I'm not sure if this really makes sense (only maybe because if one still wants to apply the i18n Transformer, but that has actually nothing to do with the XSLTs. WDYT? Thanks Michi > > Thanks > > Michi > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From josias.thoeny at wyona.com Mon Jan 7 09:28:08 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 7 09:30:18 2008 Subject: [Yanel-dev] XML Resource serializer problem In-Reply-To: <477ABC6B.8060300@wyona.com> References: <477ABC6B.8060300@wyona.com> Message-ID: <4781E298.9080206@wyona.com> Michael Wechner wrote: > Hi > > It seems to me that the XML resource has still some troubles re > serializer in some cases. For instance when I try to serve some APP > service document with mime type application/atomsvc+xml and it contains > some XHTML snippets, then the APP namespace is being replaced by the > XHTML namespace > > http://127.0.0.1:8080/yanel/yulup-demo/atom/entries/introspection-.xml > > resp. > > http://demo.yulup.org/atom/entries/introspection-.xml > > > ml version="1.0"?>. Strict//EN" "http://www.w3.org/T > R/xhtml1/DTD/xhtml1-strict.dtd">. xmlns="http://www.w3.org/1999/xhtml">. le="Yulup Demo">. Yulup Demo.. > f="../entries/?yanel.resource.viewid=atom">. type="html">Early Yulup <i>Releases& > lt;/i>.. ... .. title="Yulup Website">. le type="text">Yulup Website.. href="http://www.yulup.or > g/download/release-atom-entries/?yanel.resource.viewid=atom">. > <div>Yul > up <b>Releases</b></div>... ... > .. > > > whereas this doesn't happen when setting the mime type to > application/xml within the resource config of this particular document. > Also please note it doesn't happen for > > http://www.yulup.org/download/introspection-atom.xml > > or > > http://www.yulup.org/news-entries/introspection-atom.xml > > Any idea what might be wrong? I guess this happens because it's using the XHTML serializer. If no serializer is configured in the rc, the following "fallback" is implemented: if mimetype == "text/html" -> use HTML serializer if mimetype == "application/xml" -> use XML serializer else use XHTML_STRICT serializer Do you think this behaviour should be changed? To solve your problem you could try to specify the serializer explicitely in the rc: application/atomsvc+xml josias > > Thanks > > Michi > From josias.thoeny at wyona.com Mon Jan 7 09:36:42 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 7 09:38:48 2008 Subject: [Yanel-dev] XML Resource serializer problem In-Reply-To: <477AC00D.6060208@wyona.com> References: <477ABC6B.8060300@wyona.com> <477AC00D.6060208@wyona.com> Message-ID: <4781E49A.50009@wyona.com> Michael Wechner wrote: > Michael Wechner wrote: > >> Hi >> >> It seems to me that the XML resource has still some troubles re >> serializer in some cases. For instance when I try to serve some APP >> service document with mime type application/atomsvc+xml and it >> contains some XHTML snippets, then the APP namespace is being replaced >> by the XHTML namespace >> >> http://127.0.0.1:8080/yanel/yulup-demo/atom/entries/introspection-.xml >> >> resp. >> >> http://demo.yulup.org/atom/entries/introspection-.xml >> >> >> > ml version="1.0"?>.> Strict//EN" "http://www.w3.org/T >> R/xhtml1/DTD/xhtml1-strict.dtd">.> xmlns="http://www.w3.org/1999/xhtml">. > le="Yulup Demo">. Yulup Demo.. >> > f="../entries/?yanel.resource.viewid=atom">. > type="html">Early Yulup <i>Releases& >> lt;/i>.. ... .. > title="Yulup Website">. > le type="text">Yulup Website.. > title="Releases" href="http://www.yulup.or >> g/download/release-atom-entries/?yanel.resource.viewid=atom">. >> <div>Yul >> up <b>Releases</b></div>... ... >> .. >> >> >> whereas this doesn't happen when setting the mime type to >> application/xml within the resource config of this particular >> document. Also please note it doesn't happen for >> >> http://www.yulup.org/download/introspection-atom.xml >> >> or >> >> http://www.yulup.org/news-entries/introspection-atom.xml >> >> Any idea what might be wrong? > > > it seems to me that > > src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java > > should retuen the view if no XSLT has been set I don't understand what you mean with "return the view". Which view? > > String[] xsltPaths = viewDescriptor.getXSLTPaths(); > if (xsltPaths == null || xsltPaths.length == 0) { > xsltPaths = getXSLTPath(getPath()); > } > > whereas I have noticed that even if no XSLT is being configured > xsltPaths won't be null, because > > protected String[] getXSLTPath(String path) throws Exception { > String[] xsltPath = getResourceConfigProperties("xslt"); > if (xsltPath != null) return xsltPath; > log.info("No XSLT Path within: " + path); > return new String[0]; > > but I'm not sure if this really makes sense (only maybe because if one > still wants to apply the i18n Transformer, but that has actually nothing > to do with the XSLTs. > > WDYT? I think it makes sense for this method to return an empty array instead of null. It makes it easier for the caller, and it's something like best practice. Or maybe I just don't understand what the problem is... josias > > Thanks > > Michi > >> >> Thanks >> >> Michi >> > > From etaroza at optaros.com Tue Jan 8 16:39:27 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Tue Jan 8 16:40:43 2008 Subject: [Yanel-dev] GWT usage for AJAX features in Yanel Message-ID: <2999224.305501199806767291.JavaMail.root@enzo.optaros.com> SGkgZXZlcnlvbmUsIApJIHBsYXllZCB3aXRoIEdvb2dsZSBXZWIgVG9vbGtpdCAoR1dUKSBhIGJp dCAoSSB1c2VkIGl0IGJlZm9yZSBhbmQgcmVhbGx5IGxvdmVkIGl0KSBhbmQgdHJpZWQgdG8gdXNl IGl0IGluIFlhbmVsLiBBbmQgSSBsaWtlZCB0aGUgb3V0Y29tZS4gCgpBcyB5b3UgbWlnaHQga25v dyBHV1QgZW5hYmxlcyBBSkFYIGRldmVsb3BtZW50IGluIEpBVkE6IHlvdSBkZXZlbG9wIGluIEpB VkEsIHRoZW4gdHJhbnNsYXRlIGV2ZXJ5dGhpbmcgaW50byBKYXZhU2NyaXB0LiBUbyBteSBtaW5k IHRoaXMgaXMgdmFsdWFibGUsIGJlY2F1c2UgeW91IGRvbid0IG5lZWQgdG8gc2VhcmNoIGFuZCBs ZWFybiBuZXcgSlMgbGlicmFyaWVzIHRoYXQgdXN1YWxseSBkb24ndCB3b3JrIHRoZSB3YXkgeW91 IHdhbnQgKG1vZGlmeWluZyBKUyBsaWJyYXJpZXMgaXMgcmVhbGx5IGVycm9yIHByb25lKS4gRm9y IGluc3RhbmNlLCBJIGZpbmQgaXQgZWFzaWVyIHRvIHByb2dyYW0geW91ciBvd24gQUpBWHkgdGFi bGUgd2l0aCBHV1QgdGhhbiBsZWFybmluZyBMaXZlR3JpZCBhbmQgc2ltaWxhciBKUyBsaWJyYXJp ZXMuIE1vcmVvdmVyLCBtYW55IHdpZGdldHMgYXJlIGFscmVhZHkgZGV2ZWxvcGVkIGFuZCBhdmFp bGFibGUsIGFuZCBldmVyeXRoaW5nIGlzIGluIEpBVkEhIEFsbCB5b3UgbmVlZCBpcyBzaW1wbHkg dG8gcnVuIGl0IHRocm91Z2ggYSB0b29sIHRvIGdldCBjb3JyZXNwb25kaW5nIEphdmFTY3JpcHQu IFdlbGwsIHlvdSBjYW4gcmVhZCBhYm91dCBHV1QgaW4gaHR0cDovL2NvZGUuZ29vZ2xlLmNvbS93 ZWJ0b29sa2l0L292ZXJ2aWV3Lmh0bWwgCgpOb3cgYSBiaXQgb24gaG93IHRvIGludGVncmF0ZSBH V1QgaW50byBZYW5lbC4gVGhlcmUgaXMgYXQgbGVhc3Qgb25lIHdheTogZGV2ZWxvcCBhIHdpZGdl dCB3aXRoIEdXVCwgY29tcGlsZSBpdCBpbnRvIEphdmFTY3JpcHQgYW5kIHVzZSBpdCBhcyBhbnkg b3RoZXIgSlMgbGlicmFyeSBpbnNpZGUgV2ViIHBhZ2VzLiBTbyB5b3UgY2FuIGRldmVsb3AgV2Vi IHBhZ2UgVUkgYWxtb3N0IGxpa2UgU3dpbmcuIEZvciBpbnN0YW5jZTogCjxodG1sPiAKPGJvZHk+ IAo8c2NyaXB0IGxhbmd1YWdlPSJqYXZhc2NyaXB0IiBzcmM9IiRwYXRoJC93aWRnZXQuZm9yLnBh bmVsMS5qcyI+IAo8L3NjcmlwdD4gCjxkaXYgaWQ9InBhbmVsMSI+IAo8L2Rpdj4gCjxzY3JpcHQg bGFuZ3VhZ2U9ImphdmFzY3JpcHQiIHNyYz0iJHBhdGgkL3dpZGdldC5mb3IucGFuZWwyLmpzIj4g Cjwvc2NyaXB0PiAKPGRpdiBpZD0icGFuZWwyIj4gCjwvZGl2PiAKPC9ib2R5PiAKPC9odG1sPiAK CkluIHRoaXMgZXhhbXBsZSBJIGhhdmUgdHdvIHBhbmVscyB0aGF0IHdvdWxkIGhhdmUgdGhlIGNv bnRlbnRzIGdlbmVyYXRlZCBieSByZXNwZWN0aXZlIEpTLiBFYWNoIG9mIHRoZW0gaXMgZGV2ZWxv cGVkIHdpdGggR1dUIChpbiBwdXJlIEpBVkEsIGxpa2UgU3dpbmcpLiAKCkFzIGZhciBhcyB0aGUg c2VydmVyIHNpZGUgaXMgY29uY2VybmVkLCBHV1QgaXMgYWxzbyBxdWl0ZSBkZXZlbG9wZXIgZnJp ZW5kbHkgYXMgaXQgcHJvdmlkZXMgYSBmdWxseSBmbGVkZ2VkIFJQQyBBUEksIGhlbmNlIHRoZSBz ZXJ2bGV0cyBtYXkgYmUgbWFkZSBtb3JlIGZpbmUgZ3JhaW5lZC4gCgpJbiBnZW5lcmFsLCBJIHRo aW5rLCB0aGF0IFlhbmVsIHVzZXJzIHdpbGwgYWx3YXlzIHdhbnQgQUpBWHkgZmVhdHVyZXMsIHNv IGhhdmluZyBhIG5pY2UgZnJhbWV3b3JrIGZvciBpdCBpcyBhIHN0ZXAgZm9yd2FyZCwgYW5kIGZv ciB0aGF0IEkgc3VnZ2VzdCBHV1QuIE1heWJlIHRoZXJlIG90aGVyIGFsdGVybmF0aXZlcz8gCgpF dmFsZGFzIAotLS0tLS0tLS0tLS0tLSBuZXh0IHBhcnQgLS0tLS0tLS0tLS0tLS0KQW4gSFRNTCBh dHRhY2htZW50IHdhcyBzY3J1YmJlZC4uLgpVUkw6IGh0dHA6Ly9saXN0cy53eW9uYS5vcmcvcGlw ZXJtYWlsL3lhbmVsLWRldmVsb3BtZW50L2F0dGFjaG1lbnRzLzIwMDgwMTA4LzdkYjQ0NjA4L2F0 dGFjaG1lbnQuaHRtCg== From etaroza at optaros.com Wed Jan 9 23:50:00 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 9 23:51:07 2008 Subject: [Yanel-dev] JCR and Yanel Message-ID: <47854F98.6050105@optaros.com> Hi everyone, I am reading now about JCR. Is Yanel JCR compliant, if yes, then which level(1, 2, 3)? Somehow I don't really like that Yanel is keeping all the resources (where most of it is XML) in the file system. There are pretty good native XML databases around, e.g. eXist, which would be quite a nice thing to use as a content repository. What do you think? Evaldas From michael.wechner at wyona.com Thu Jan 10 00:07:58 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 10 00:08:53 2008 Subject: [Yanel-dev] JCR and Yanel In-Reply-To: <47854F98.6050105@optaros.com> References: <47854F98.6050105@optaros.com> Message-ID: <478553CE.7000201@wyona.com> Evaldas Taroza wrote: > Hi everyone, > I am reading now about JCR. Is Yanel JCR compliant, if yes, then which > level(1, 2, 3)? there is JCR-Yarep implementation which is using Apache Jackrabbit, which means yes ;-) but > Somehow I don't really like that Yanel is keeping all the resources > (where most of it is XML) in the file system. it doesn't, it's using Yarep as data abstraction layer, but in the sample realms the file system implementations of yarep are being used and hence you can see the data within the filesystem, but you can easily switch. Yarep also contains a utility to migrate your data from one implementation into another one, e.g. from virtual filesystem to eXist. > There are pretty good native XML databases around, e.g. eXist, which > would be quite a nice thing to use as a content repository. What do > you think? agreed, but the key is the data abstraction layer which is hiding the actual implementation. So maybe eXist is a better implementation than others, but the application itself is never seeing this implementation, but only the API, e.g. JCR or Yarep. HTH Michi > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Thu Jan 10 00:41:37 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 10 00:42:42 2008 Subject: [Yanel-dev] JCR and Yanel In-Reply-To: <478553CE.7000201@wyona.com> References: <47854F98.6050105@optaros.com> <478553CE.7000201@wyona.com> Message-ID: <47855BB1.5010804@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Hi everyone, >> I am reading now about JCR. Is Yanel JCR compliant, if yes, then which >> level(1, 2, 3)? > > > there is JCR-Yarep implementation which is using Apache Jackrabbit, > which means yes ;-) but Correct me if I am wrong: Yarep is a bit extended Jackrabbit? Hence it looks like JCR API is a subset of Yarep API. So which interface/class I would need to extend to enable my own storage let's say in eXist. Evaldas From michael.wechner at wyona.com Thu Jan 10 00:53:11 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 10 00:53:56 2008 Subject: [Yanel-dev] JCR and Yanel In-Reply-To: <47855BB1.5010804@optaros.com> References: <47854F98.6050105@optaros.com> <478553CE.7000201@wyona.com> <47855BB1.5010804@optaros.com> Message-ID: <47855E67.5090907@wyona.com> Evaldas Taroza wrote: > > Michael Wechner wrote: > >> Evaldas Taroza wrote: >> >>> Hi everyone, >>> I am reading now about JCR. Is Yanel JCR compliant, if yes, then >>> which level(1, 2, 3)? >> >> >> >> there is JCR-Yarep implementation which is using Apache Jackrabbit, >> which means yes ;-) but > > > Correct me if I am wrong: Yarep is a bit extended Jackrabbit? no, "yarep core" is an API https://svn.wyona.com/repos/public/yarep/trunk/src/core/java/org/wyona/yarep/core , which is a bit simpler than JCR, which is also an API. Jackrabbit is an implementation of JCR. There exists a yarep-jcr-impl which is using Jackrabbit https://svn.wyona.com/repos/public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/jcr > Hence it looks like JCR API is a subset of Yarep API. rather the opposite > So which interface/class I would need to extend to enable my own > storage let's say in eXist. I think you have two choices: 1) Either find a persistance manager for eXist based on JCR for instance within the Jackrabbit environment, e.g. http://yukatan.fi/2007/1.3/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.html and then you only have to change the configuration or 2) Develop an eXist implementation for Yarep, similar to https://svn.wyona.com/repos/public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/xmldb whereas I don't think this got ever finished, but maybe helps as a start Cheers Michi > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Thu Jan 10 01:09:52 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 10 01:10:57 2008 Subject: [Yanel-dev] JCR and Yanel In-Reply-To: <47855E67.5090907@wyona.com> References: <47854F98.6050105@optaros.com> <478553CE.7000201@wyona.com> <47855BB1.5010804@optaros.com> <47855E67.5090907@wyona.com> Message-ID: <47856250.4030807@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> >> Michael Wechner wrote: >> >>> Evaldas Taroza wrote: >>> >>>> Hi everyone, >>>> I am reading now about JCR. Is Yanel JCR compliant, if yes, then >>>> which level(1, 2, 3)? >>> >>> >>> >>> there is JCR-Yarep implementation which is using Apache Jackrabbit, >>> which means yes ;-) but >> >> >> Correct me if I am wrong: Yarep is a bit extended Jackrabbit? > > > no, "yarep core" is an API > > https://svn.wyona.com/repos/public/yarep/trunk/src/core/java/org/wyona/yarep/core > > > , which is a bit simpler than JCR, which is also an API. > > Jackrabbit is an implementation of JCR. > > There exists a yarep-jcr-impl which is using Jackrabbit > > https://svn.wyona.com/repos/public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/jcr > > >> Hence it looks like JCR API is a subset of Yarep API. > > > rather the opposite Ok, now I understand. > >> So which interface/class I would need to extend to enable my own >> storage let's say in eXist. > > > I think you have two choices: > > 1) Either find a persistance manager for eXist based on JCR for instance > within the Jackrabbit environment, e.g. > > http://yukatan.fi/2007/1.3/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.html > Maybe an easier way would be to pretend that eXist is a filesystem because it supports Webdav? > > and then you only have to change the configuration > > or > > 2) Develop an eXist implementation for Yarep, similar to > > https://svn.wyona.com/repos/public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/xmldb > > > whereas I don't think this got ever finished, but maybe helps as a start > Actually major XML databases support XML:DB (including eXist), I wish this part was finished in Yarep :) Evaldas From michael.wechner at wyona.com Thu Jan 10 23:37:45 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 10 23:41:06 2008 Subject: [Yanel-dev] GWT usage for AJAX features in Yanel In-Reply-To: <2999224.305501199806767291.JavaMail.root@enzo.optaros.com> References: <2999224.305501199806767291.JavaMail.root@enzo.optaros.com> Message-ID: <47869E39.70204@wyona.com> Evaldas Taroza wrote: > Hi everyone, > I played with Google Web Toolkit (GWT) a bit (I used it before and > really loved it) and tried to use it in Yanel. And I liked the outcome. > > As you might know GWT enables AJAX development in JAVA: you develop in > JAVA, then translate everything into JavaScript. To my mind this is > valuable, because you don't need to search and learn new JS libraries > that usually don't work the way you want (modifying JS libraries is > really error prone). For instance, I find it easier to program your > own AJAXy table with GWT than learning LiveGrid and similar JS > libraries. Moreover, many widgets are already developed and available, > and everything is in JAVA! All you need is simply to run it through a > tool to get corresponding JavaScript. Well, you can read about GWT in > http://code.google.com/webtoolkit/overview.html > > Now a bit on how to integrate GWT into Yanel. There is at least one > way: develop a widget with GWT, compile it into JavaScript and use it > as any other JS library inside Web pages. So you can develop Web page > UI almost like Swing. For instance: > > > >
>
> >
>
> > > > In this example I have two panels that would have the contents > generated by respective JS. Each of them is developed with GWT (in > pure JAVA, like Swing). > > As far as the server side is concerned, GWT is also quite developer > friendly as it provides a fully fledged RPC API, hence the servlets > may be made more fine grained. > > In general, I think, that Yanel users will always want AJAXy features, > so having a nice framework for it is a step forward, and for that I > suggest GWT. sounds great resp. what would be the next steps to get this going? WDOT? Cheers Michi > Maybe there other alternatives? > > Evaldas > >------------------------------------------------------------------------ > >_______________________________________________ >Yanel-development mailing list >Yanel-development@wyona.com >http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > -- Michael Wechner Wyona - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org michael.wechner@wyona.com michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Fri Jan 11 00:03:25 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 11 00:06:47 2008 Subject: [Yanel-dev] OpenID integration Message-ID: <4786A43D.5030501@wyona.com> Hi Evaldas recently sent me the link of JOID http://code.google.com/p/joid/ whereas I remember Evaldas saying something about Sun has also a nice lib, whereas I cannot find it. Evaldas, do you remember or did I misunderstand something? Now in order to get started I guess beside the regular login form we should also provide an OpenID login input field, e.g. Regular Login Username: ... Password: ... or login with OpenID OpenID: ... (For example michaelwechner.livejournal.com) WDYT? Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org michael.wechner@wyona.com michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Fri Jan 11 09:26:47 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 11 09:27:46 2008 Subject: [Yanel-dev] OpenID integration In-Reply-To: <4786A43D.5030501@wyona.com> References: <4786A43D.5030501@wyona.com> Message-ID: <47872847.7020000@optaros.com> Michael Wechner wrote: > Hi > > Evaldas recently sent me the link of JOID > > http://code.google.com/p/joid/ > > whereas I remember Evaldas saying something about Sun has also a nice > lib, whereas I cannot find it. Evaldas, do you remember or did I > misunderstand something? I meant this library only. I think this is the most reliable one. > > Now in order to get started I guess beside the regular login form we > should also provide an OpenID login input field, e.g. > > Regular Login > Username: ... > Password: ... > > or login with OpenID > OpenID: ... > (For example michaelwechner.livejournal.com) I already tried to play with it and it is as easy as they say it is. I built my JSP page where you can log in with an OpenID. As a next step I was already thinking how to put it into Yanel, but then I got some other work to do :) Evaldas From etaroza at optaros.com Fri Jan 11 09:36:56 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 11 09:37:57 2008 Subject: [Yanel-dev] GWT usage for AJAX features in Yanel In-Reply-To: <47869E39.70204@wyona.com> References: <2999224.305501199806767291.JavaMail.root@enzo.optaros.com> <47869E39.70204@wyona.com> Message-ID: <47872AA8.8080204@optaros.com> Hi, We were discussing that with Simon. One should know that GWT allows both server and client side development. I don't know how to deal with the server side, I can only tell you that it allows you to create "servlets" with methods that you can call via RPC. I am not sure how and where to put it in Yanel. Client side is pretty straightforward: 1. You develop the JS library as a separate JAVA (GWT) project, then you need to put the compiled JS files where appropriate 2. You develop in JAVA and then build everything together with the Yanel. If we decide to put GWT, and make content management more AJAX-oriented, I think it is a good idea that we all sit together, I show you how it works and we think on how to put it into Yanel. I think not more than 2 hours would be needed for that, and another hour for documenting this. Evaldas Michael Wechner wrote: > Evaldas Taroza wrote: > >> Hi everyone, >> I played with Google Web Toolkit (GWT) a bit (I used it before and >> really loved it) and tried to use it in Yanel. And I liked the outcome. >> >> As you might know GWT enables AJAX development in JAVA: you develop in >> JAVA, then translate everything into JavaScript. To my mind this is >> valuable, because you don't need to search and learn new JS libraries >> that usually don't work the way you want (modifying JS libraries is >> really error prone). For instance, I find it easier to program your >> own AJAXy table with GWT than learning LiveGrid and similar JS >> libraries. Moreover, many widgets are already developed and available, >> and everything is in JAVA! All you need is simply to run it through a >> tool to get corresponding JavaScript. Well, you can read about GWT in >> http://code.google.com/webtoolkit/overview.html >> >> Now a bit on how to integrate GWT into Yanel. There is at least one >> way: develop a widget with GWT, compile it into JavaScript and use it >> as any other JS library inside Web pages. So you can develop Web page >> UI almost like Swing. For instance: >> >> >> >>
>>
>> >>
>>
>> >> >> >> In this example I have two panels that would have the contents >> generated by respective JS. Each of them is developed with GWT (in >> pure JAVA, like Swing). >> >> As far as the server side is concerned, GWT is also quite developer >> friendly as it provides a fully fledged RPC API, hence the servlets >> may be made more fine grained. >> >> In general, I think, that Yanel users will always want AJAXy features, >> so having a nice framework for it is a step forward, and for that I >> suggest GWT. > > > sounds great resp. what would be the next steps to get this going? > > WDOT? > > Cheers > > Michi > >> Maybe there other alternatives? >> >> Evaldas >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Yanel-development mailing list >> Yanel-development@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >> >> > > From michael.wechner at wyona.com Fri Jan 11 09:57:07 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 11 09:57:41 2008 Subject: [Yanel-dev] OpenID integration In-Reply-To: <47872847.7020000@optaros.com> References: <4786A43D.5030501@wyona.com> <47872847.7020000@optaros.com> Message-ID: <47872F63.5010308@wyona.com> Evaldas Taroza wrote: > Michael Wechner wrote: > >> Hi >> >> Evaldas recently sent me the link of JOID >> >> http://code.google.com/p/joid/ >> >> whereas I remember Evaldas saying something about Sun has also a nice >> lib, whereas I cannot find it. Evaldas, do you remember or did I >> misunderstand something? > > > I meant this library only. I think this is the most reliable one. ok, sorry for misunderstanding > >> >> Now in order to get started I guess beside the regular login form we >> should also provide an OpenID login input field, e.g. >> >> Regular Login >> Username: ... >> Password: ... >> >> or login with OpenID >> OpenID: ... >> (For example michaelwechner.livejournal.com) > > > I already tried to play with it and it is as easy as they say it is. I > built my JSP page where you can log in with an OpenID. cool > As a next step I was already thinking how to put it into Yanel, btw, I have added an input field to the standard login screen src/webapp/xslt/login-screen.xsl and also added a method to start the openID implementation src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java Also see http://yanel.wyona.org/roadmap.html (search for OpenID ;-) resp. http://yanel.wyona.org/specification/openid.html resp. http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5184 > but then I got some other work to do :) I understand ;-) Cheers Michi > > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Fri Jan 11 10:05:44 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 11 10:06:18 2008 Subject: [Yanel-dev] Problems using wildcards resp. regular expressions with Java 1.6 and Yanel Message-ID: <47873168.8040107@wyona.com> Hi It seems like with Java 1.6 causes some problems re wildcards resp. regular expressions. This is particular a problem re the res config map. Any idea how to fix this? Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From simon.litwan at wyona.com Fri Jan 11 11:14:42 2008 From: simon.litwan at wyona.com (simon litwan) Date: Fri Jan 11 11:15:34 2008 Subject: [Yanel-dev] GWT usage for AJAX features in Yanel In-Reply-To: <47872AA8.8080204@optaros.com> References: <2999224.305501199806767291.JavaMail.root@enzo.optaros.com> <47869E39.70204@wyona.com> <47872AA8.8080204@optaros.com> Message-ID: <47874192.5020509@wyona.com> Evaldas Taroza schrieb: > Hi, > We were discussing that with Simon. One should know that GWT allows > both server and client side development. I don't know how to deal with > the server side, I can only tell you that it allows you to create > "servlets" with methods that you can call via RPC. I am not sure how > and where to put it in Yanel. > > Client side is pretty straightforward: > 1. You develop the JS library as a separate JAVA (GWT) project, then > you need to put the compiled JS files where appropriate > 2. You develop in JAVA and then build everything together with the Yanel. after i had a closer look at gwt i really like it. i think the benefit of writing ajax stuff without the need of having knowledge of javascript is huge for a a java based cms. what i don't like so far is the workflow as evaldas proposed it. develop your widget, generate js from java via gwt, copy the js over to your resource or content. i would appreciate if the ajax source is also located in the resource and gets compiled by the build of the resource using gwt. the yanel build process would need to have access to the gwt which probably could be downloaded via maven. not sure someone agrees but i like if things are together if they belong together. i think it's very time consuming and increases the learning curve if one wants to modify a resource-type which uses ajax and first has to find out where the source of the ajax widget used by this resource is located, then download gwt to generate the new js files and then copy them to the resource. cheers simon > > If we decide to put GWT, and make content management more > AJAX-oriented, I think it is a good idea that we all sit together, I > show you how it works and we think on how to put it into Yanel. I > think not more than 2 hours would be needed for that, and another hour > for documenting this. > > Evaldas > > Michael Wechner wrote: >> Evaldas Taroza wrote: >> >>> Hi everyone, >>> I played with Google Web Toolkit (GWT) a bit (I used it before and >>> really loved it) and tried to use it in Yanel. And I liked the outcome. >>> >>> As you might know GWT enables AJAX development in JAVA: you develop >>> in JAVA, then translate everything into JavaScript. To my mind this >>> is valuable, because you don't need to search and learn new JS >>> libraries that usually don't work the way you want (modifying JS >>> libraries is really error prone). For instance, I find it easier to >>> program your own AJAXy table with GWT than learning LiveGrid and >>> similar JS libraries. Moreover, many widgets are already developed >>> and available, and everything is in JAVA! All you need is simply to >>> run it through a tool to get corresponding JavaScript. Well, you can >>> read about GWT in http://code.google.com/webtoolkit/overview.html >>> >>> Now a bit on how to integrate GWT into Yanel. There is at least one >>> way: develop a widget with GWT, compile it into JavaScript and use >>> it as any other JS library inside Web pages. So you can develop Web >>> page UI almost like Swing. For instance: >>> >>> >>> >>>
>>>
>>> >>>
>>>
>>> >>> >>> >>> In this example I have two panels that would have the contents >>> generated by respective JS. Each of them is developed with GWT (in >>> pure JAVA, like Swing). >>> >>> As far as the server side is concerned, GWT is also quite developer >>> friendly as it provides a fully fledged RPC API, hence the servlets >>> may be made more fine grained. >>> >>> In general, I think, that Yanel users will always want AJAXy >>> features, so having a nice framework for it is a step forward, and >>> for that I suggest GWT. >> >> >> sounds great resp. what would be the next steps to get this going? >> >> WDOT? >> >> Cheers >> >> Michi >> >>> Maybe there other alternatives? >>> >>> Evaldas >>> >>> ------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Yanel-development mailing list >>> Yanel-development@wyona.com >>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >>> >>> >> >> > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From etaroza at optaros.com Fri Jan 11 11:21:15 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 11 11:22:14 2008 Subject: [Yanel-dev] GWT usage for AJAX features in Yanel In-Reply-To: <47874192.5020509@wyona.com> References: <2999224.305501199806767291.JavaMail.root@enzo.optaros.com> <47869E39.70204@wyona.com> <47872AA8.8080204@optaros.com> <47874192.5020509@wyona.com> Message-ID: <4787431B.5090601@optaros.com> simon litwan wrote: > Evaldas Taroza schrieb: >> Hi, >> We were discussing that with Simon. One should know that GWT allows >> both server and client side development. I don't know how to deal with >> the server side, I can only tell you that it allows you to create >> "servlets" with methods that you can call via RPC. I am not sure how >> and where to put it in Yanel. >> >> Client side is pretty straightforward: >> 1. You develop the JS library as a separate JAVA (GWT) project, then >> you need to put the compiled JS files where appropriate >> 2. You develop in JAVA and then build everything together with the Yanel. > after i had a closer look at gwt i really like it. > i think the benefit of writing ajax stuff without the need of having > knowledge of javascript is huge for a a java based cms. > > what i don't like so far is the workflow as evaldas proposed it. develop > your widget, generate js from java via gwt, copy the js over to your > resource or content. i would appreciate if the ajax source is also > located in the resource and gets compiled by the build of the resource > using gwt. the yanel build process would need to have access to the gwt > which probably could be downloaded via maven. > > not sure someone agrees but i like if things are together if they belong > together. i think it's very time consuming and increases the learning > curve if one wants to modify a resource-type which uses ajax and first > has to find out where the source of the ajax widget used by this > resource is located, then download gwt to generate the new js files and > then copy them to the resource. I agree that this could be a nice integration strategy. If we also manage to put server side GWT into Yanel, then Yanel may end-up as a very very AJAXy CMS, which I think is a competitive advantage. Evaldas From michael.wechner at wyona.com Fri Jan 11 22:46:06 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 11 22:46:37 2008 Subject: [Yanel-dev] [Fwd: Message on TheServerSide.com: Frustration with competing apache projects (Lenya vs. JCR)] Message-ID: <4787E39E.5040501@wyona.com> Maybe something to learn from Cheers Michi -------- Original Message -------- Subject: Message on TheServerSide.com: Frustration with competing apache projects (Lenya vs. JCR) Date: Fri, 11 Jan 2008 16:08:59 +0100 From: Andreas Hartmann Reply-To: dev@lenya.apache.org To: dev@lenya.apache.org Hi Lenya devs, FYI: http://www.theserverside.com/news/thread.tss?m=c.reply&thread_id=48070#245093 Total frustration with competing apache projects!!! For some unknown reason apache projects always have competing and incompatible projects. The Lenya and Jackrabbit is just an obvious one! If the JSR standard has been approved and apache promotes to be a top domain project then WHY do they not have some say about minimum compatibility! This is beyond me! Any other company or organization will make great efforts to ensure the value of one product can be used by other products! If I download JBoss Portal I feel quite confident that it will work with JBoss AS. Maybe it just me but at some time I would like to see some real up life for organizations and not a major integration, redundant solution approach!! I like the given features of Lenya but also would like my CMS repository to be JSR compliant so I can access with other tools such as BPM engines or WebDav compliant applications. So all that being said? why does Lenya community think that JR integration is not important? And continue to support a proprietary API? And why do they not understand that a CMS system is a central part to most organizations infrastructure!! Do other developers out there feel the same way?? -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch Tel.: +41 (0) 43 818 57 01 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org For additional commands, e-mail: dev-help@lenya.apache.org -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 13 21:12:31 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 13 21:12:49 2008 Subject: [Yanel-dev] Refreshing users Message-ID: <478A70AF.3000007@wyona.com> Hi It seems to me that users should not be refreshed if a login fails (see below) 88401 2008-01-13 21:09:40,531 [http-8443-Processor23] WARN org.wyona.security.impl.yarep.YarepUserManager.refreshCache():224 - Reloading all users in order to refresh cache! 88423 2008-01-13 21:09:40,553 [http-8443-Processor23] WARN org.wyona.yanel.servlet.security.impl.DefaultWebAuthenticatorImpl.doAuthenticate():80 - Login failed: lenya Also I think this needs to be refactored such users are being reloaded incrementally, because it doesn't scale otherwise. WDYT? Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 13 23:20:25 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 13 23:20:53 2008 Subject: [Yanel-dev] Flow/Sequence of Access Control within YanelServlet refactored Message-ID: <478A8EA9.2010105@wyona.com> Hi I have refactored the flow/sequence of the access control within the YanelServlet, which should have the following advantages: - doAuthenticate is only called when authorization is denied (instead with every request as it was) - the code should be now much easier to read now (whereas it still needs more refactoring) I have tested the following usecases: - standard form based login - HTTP BASIC login (where the response might need some more work if bad credentials were provided) - Custom form based login - Custom Single-Sign-On login - OpenID login (whereas OpenID itself is not supported yet) - Neutron based login All usecases seem still to work, but maybe I have forgotten something. Also I have tested yet behind a proxy. So please let me know if you find any issues. Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Mon Jan 14 10:13:08 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 10:14:03 2008 Subject: [Yanel-dev] different schemes in yanel Message-ID: <478B27A4.5060603@optaros.com> Hi, I am trying to understand how I can programmatically access a resource in Yanel without passing it through HTTP. Can anyone explain how yanelrepo: and yanelreource: schemes are working? For instance I have an XML resource (extends BasicXMLResource) for which I get content as specified in the parameter. I need a class which transparently gives me an XML with any given URI in the repository, for example, the parameters for my resource can be 1. my.xml 2. yanelrepo:/my.xml 3. yanelresource:/my.xml Is there anything like: InputStream is = new NodeInRepository(paramURI).getContents(); Evaldas From etaroza at optaros.com Mon Jan 14 11:15:04 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 11:15:54 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies Message-ID: <478B3628.6030008@optaros.com> Hi, there are static properties in BasicXMLResource: SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; They are not used within the class, although, as I understand, they are supposed to override the Serializer properties. Evaldas From etaroza at optaros.com Mon Jan 14 11:43:01 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 11:43:53 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B3628.6030008@optaros.com> References: <478B3628.6030008@optaros.com> Message-ID: <478B3CB5.5010503@optaros.com> Also, I think there is a bug in org.wyona.yanel.core.serialization.SerializerFactory.getSerializer(int) For XML serializer it is using HTML format. Why do we need serialization package in Yanel? It does not do much, does it? Evaldas Evaldas Taroza wrote: > Hi, > there are static properties in BasicXMLResource: > SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; > SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; > SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; > > They are not used within the class, although, as I understand, they are > supposed to override the Serializer properties. > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > From etaroza at optaros.com Mon Jan 14 11:48:59 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 11:49:52 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B3CB5.5010503@optaros.com> References: <478B3628.6030008@optaros.com> <478B3CB5.5010503@optaros.com> Message-ID: <478B3E1B.5060300@optaros.com> > Also, I think there is a bug in > org.wyona.yanel.core.serialization.SerializerFactory.getSerializer(int) > > For XML serializer it is using HTML format. Sorry, that was my fault. I put method='xml' in the XSLT, but left serializer as HTML, this caused that behaviour. No bug here:) Evaldas From josias.thoeny at wyona.com Mon Jan 14 14:04:45 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 14 14:05:26 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B3628.6030008@optaros.com> References: <478B3628.6030008@optaros.com> Message-ID: <478B5DED.90504@wyona.com> Evaldas Taroza wrote: > Hi, > there are static properties in BasicXMLResource: > SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; > SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; > SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; I think those properties are obsolete and should be removed. Thanks for pointing this out. The serializer can be overridden in the rc like so: text/html /xslt/global.xsl yes -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd josias > > They are not used within the class, although, as I understand, they are > supposed to override the Serializer properties. > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From etaroza at optaros.com Mon Jan 14 14:08:34 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 14:09:25 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B5DED.90504@wyona.com> References: <478B3628.6030008@optaros.com> <478B5DED.90504@wyona.com> Message-ID: <478B5ED2.5000209@optaros.com> Josias Th?ny wrote: > Evaldas Taroza wrote: >> Hi, >> there are static properties in BasicXMLResource: >> SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; >> SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; >> SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; > > I think those properties are obsolete and should be removed. > Thanks for pointing this out. > > The serializer can be overridden in the rc like so: > > > > > text/html > /xslt/global.xsl > > yes > -//W3C//DTD XHTML 1.0 > Transitional//EN > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd > > > > > > The thing is that these properties don't override serializer's behaviour... That needs to be implemented in BasicXMLResource. Evaldas From etaroza at optaros.com Mon Jan 14 14:14:34 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 14:15:25 2008 Subject: [Yanel-dev] view descriptor 'source' does not go through an XSLT Message-ID: <478B603A.10703@optaros.com> Hi, The following view does not go through the my.xsl: application/xml /xslt/my.xsl I believe this is an undocumented feature. Are there any other similar features? Evaldas From josias.thoeny at wyona.com Mon Jan 14 14:21:16 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 14 14:21:56 2008 Subject: [Yanel-dev] different schemes in yanel In-Reply-To: <478B27A4.5060603@optaros.com> References: <478B27A4.5060603@optaros.com> Message-ID: <478B61CC.8010203@wyona.com> Evaldas Taroza wrote: > Hi, > > I am trying to understand how I can programmatically access a resource > in Yanel without passing it through HTTP. > > Can anyone explain how yanelrepo: and yanelreource: schemes are working? > For instance I have an XML resource (extends BasicXMLResource) for which > I get content as specified in the parameter. I need a class which > transparently gives me an XML with any given URI in the repository, for > example, the parameters for my resource can be > 1. my.xml > 2. yanelrepo:/my.xml > 3. yanelresource:/my.xml > > Is there anything like: > InputStream is = new NodeInRepository(paramURI).getContents(); The yanelrepo protocol can be used to access a repository node, and the yanelresource protocol can be used to access a resource view (it's like calling getView() on the resource). I'm not sure which protocol you need. Be aware that a repository node does not necessarily correspond to a resource. I mean a resource may store its content in a repo node, but it doesn't have to. Moreover the path of the resource does not have to be the same as the repository path. It depends on the resource implementation. If you want to resolve a URI like e.g. yanelrepo:/my.xml, you can use the SourceResolver: SourceResolver resolver = new SourceResolver(resource); Source source = resolver.resolve("yanelrepo:/my.xml", null); InputStream is = SAXSource.sourceToInputSource(source).getByteStream(); hth, josias > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From josias.thoeny at wyona.com Mon Jan 14 14:25:22 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 14 14:26:02 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B5ED2.5000209@optaros.com> References: <478B3628.6030008@optaros.com> <478B5DED.90504@wyona.com> <478B5ED2.5000209@optaros.com> Message-ID: <478B62C2.2010307@wyona.com> Evaldas Taroza wrote: > Josias Th?ny wrote: >> Evaldas Taroza wrote: >>> Hi, >>> there are static properties in BasicXMLResource: >>> SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; >>> SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; >>> SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; >> >> I think those properties are obsolete and should be removed. >> Thanks for pointing this out. >> >> The serializer can be overridden in the rc like so: >> >> >> >> >> text/html >> /xslt/global.xsl >> >> yes >> -//W3C//DTD XHTML 1.0 >> Transitional//EN >> >> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd >> >> >> >> >> >> > The thing is that these properties > > > > > don't override serializer's behaviour... That needs to be implemented in > BasicXMLResource. Hm, it's implemented as follows (line 276): // allow to override xml declaration and doctype: Properties properties = viewDescriptor.getSerializerProperties(); if (properties != null) { Enumeration propNames = properties.propertyNames(); while (propNames.hasMoreElements()) { String name = (String)propNames.nextElement(); String value = properties.getProperty(name); serializer.getOutputFormat().setProperty(name, value); } } do you think it's not working? josias > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From etaroza at optaros.com Mon Jan 14 14:35:37 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 14:36:28 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B62C2.2010307@wyona.com> References: <478B3628.6030008@optaros.com> <478B5DED.90504@wyona.com> <478B5ED2.5000209@optaros.com> <478B62C2.2010307@wyona.com> Message-ID: <478B6529.2030404@optaros.com> Josias Th?ny wrote: > Evaldas Taroza wrote: >> Josias Th?ny wrote: >>> Evaldas Taroza wrote: >>>> Hi, >>>> there are static properties in BasicXMLResource: >>>> SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; >>>> SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; >>>> SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; >>> >>> I think those properties are obsolete and should be removed. >>> Thanks for pointing this out. >>> >>> The serializer can be overridden in the rc like so: >>> >>> >>> >>> >>> text/html >>> /xslt/global.xsl >>> >>> yes >>> -//W3C//DTD XHTML 1.0 >>> Transitional//EN >>> >>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd >>> >>> >>> >>> >>> >>> >> The thing is that these properties >> >> >> >> >> don't override serializer's behaviour... That needs to be implemented >> in BasicXMLResource. > > Hm, it's implemented as follows (line 276): > > // allow to override xml declaration and doctype: > Properties properties = viewDescriptor.getSerializerProperties(); > if (properties != null) { > Enumeration propNames = properties.propertyNames(); > while (propNames.hasMoreElements()) { > String name = (String)propNames.nextElement(); > String value = properties.getProperty(name); > > serializer.getOutputFormat().setProperty(name, value); > } > } > > do you think it's not working? Yeah, it is really implemented. Still with this view: text/html /xslt/brand-browser-xml2json.xsl yes -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd The generated XHTML has the following header: which is not quite as specified. Evaldas From etaroza at optaros.com Mon Jan 14 14:40:10 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 14:41:02 2008 Subject: [Yanel-dev] different schemes in yanel In-Reply-To: <478B61CC.8010203@wyona.com> References: <478B27A4.5060603@optaros.com> <478B61CC.8010203@wyona.com> Message-ID: <478B663A.2030006@optaros.com> Josias Th?ny wrote: > Evaldas Taroza wrote: >> Hi, >> >> I am trying to understand how I can programmatically access a resource >> in Yanel without passing it through HTTP. >> >> Can anyone explain how yanelrepo: and yanelreource: schemes are >> working? For instance I have an XML resource (extends >> BasicXMLResource) for which I get content as specified in the >> parameter. I need a class which transparently gives me an XML with any >> given URI in the repository, for example, the parameters for my >> resource can be >> 1. my.xml >> 2. yanelrepo:/my.xml >> 3. yanelresource:/my.xml >> >> Is there anything like: >> InputStream is = new NodeInRepository(paramURI).getContents(); > > The yanelrepo protocol can be used to access a repository node, and the > yanelresource protocol can be used to access a resource view (it's like > calling getView() on the resource). > > I'm not sure which protocol you need. Be aware that a repository node > does not necessarily correspond to a resource. I mean a resource may > store its content in a repo node, but it doesn't have to. Moreover the > path of the resource does not have to be the same as the repository > path. It depends on the resource implementation. > > If you want to resolve a URI like e.g. yanelrepo:/my.xml, you can use > the SourceResolver: > > SourceResolver resolver = new SourceResolver(resource); > Source source = resolver.resolve("yanelrepo:/my.xml", null); > InputStream is = SAXSource.sourceToInputSource(source).getByteStream(); Thanks, this was helpful. I just don't understand why XInclude is needed for Yanel. There is: //Set an object that will be used to resolve URIs used in document(). void javax.xml.transform.Transformer.setURIResolver(URIResolver) The URIResolver can be the SourceResolver. Evaldas From josias.thoeny at wyona.com Mon Jan 14 16:43:18 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 14 16:43:57 2008 Subject: [Yanel-dev] BasicXMLResource inconsistencies In-Reply-To: <478B6529.2030404@optaros.com> References: <478B3628.6030008@optaros.com> <478B5DED.90504@wyona.com> <478B5ED2.5000209@optaros.com> <478B62C2.2010307@wyona.com> <478B6529.2030404@optaros.com> Message-ID: <478B8316.7070409@wyona.com> Evaldas Taroza wrote: > > > Josias Th?ny wrote: >> Evaldas Taroza wrote: >>> Josias Th?ny wrote: >>>> Evaldas Taroza wrote: >>>>> Hi, >>>>> there are static properties in BasicXMLResource: >>>>> SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; >>>>> SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; >>>>> SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; >>>> >>>> I think those properties are obsolete and should be removed. >>>> Thanks for pointing this out. >>>> >>>> The serializer can be overridden in the rc like so: >>>> >>>> >>>> >>>> >>>> text/html >>>> /xslt/global.xsl >>>> >>>> yes >>>> -//W3C//DTD XHTML 1.0 >>>> Transitional//EN >>>> >>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd >>>> >>>> >>>> >>>> >>>> >>>> >>> The thing is that these properties >>> >>> >>> >>> >>> don't override serializer's behaviour... That needs to be implemented >>> in BasicXMLResource. >> >> Hm, it's implemented as follows (line 276): >> >> // allow to override xml declaration and doctype: >> Properties properties = viewDescriptor.getSerializerProperties(); >> if (properties != null) { >> Enumeration propNames = properties.propertyNames(); >> while (propNames.hasMoreElements()) { >> String name = (String)propNames.nextElement(); >> String value = properties.getProperty(name); >> >> serializer.getOutputFormat().setProperty(name, value); >> } >> } >> >> do you think it's not working? > > Yeah, it is really implemented. Still with this view: > > text/html > /xslt/brand-browser-xml2json.xsl > > yes > -//W3C//DTD XHTML 1.0 > Transitional//EN > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd > > > > > The generated XHTML has the following header: > "http://www.w3.org/TR/html4/loose.dtd"> > > which is not quite as specified. This looks like a bug. I'm quite busy right now, but I'll try to debug this later, unless somebody beats me to do it. josias > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From josias.thoeny at wyona.com Mon Jan 14 16:53:34 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 14 16:54:12 2008 Subject: [Yanel-dev] different schemes in yanel In-Reply-To: <478B663A.2030006@optaros.com> References: <478B27A4.5060603@optaros.com> <478B61CC.8010203@wyona.com> <478B663A.2030006@optaros.com> Message-ID: <478B857E.20105@wyona.com> Evaldas Taroza wrote: > > > Josias Th?ny wrote: >> Evaldas Taroza wrote: >>> Hi, >>> >>> I am trying to understand how I can programmatically access a >>> resource in Yanel without passing it through HTTP. >>> >>> Can anyone explain how yanelrepo: and yanelreource: schemes are >>> working? For instance I have an XML resource (extends >>> BasicXMLResource) for which I get content as specified in the >>> parameter. I need a class which transparently gives me an XML with >>> any given URI in the repository, for example, the parameters for my >>> resource can be >>> 1. my.xml >>> 2. yanelrepo:/my.xml >>> 3. yanelresource:/my.xml >>> >>> Is there anything like: >>> InputStream is = new NodeInRepository(paramURI).getContents(); >> >> The yanelrepo protocol can be used to access a repository node, and >> the yanelresource protocol can be used to access a resource view (it's >> like calling getView() on the resource). >> >> I'm not sure which protocol you need. Be aware that a repository node >> does not necessarily correspond to a resource. I mean a resource may >> store its content in a repo node, but it doesn't have to. Moreover the >> path of the resource does not have to be the same as the repository >> path. It depends on the resource implementation. >> >> If you want to resolve a URI like e.g. yanelrepo:/my.xml, you can use >> the SourceResolver: >> >> SourceResolver resolver = new SourceResolver(resource); >> Source source = resolver.resolve("yanelrepo:/my.xml", null); >> InputStream is = SAXSource.sourceToInputSource(source).getByteStream(); > > Thanks, this was helpful. > I just don't understand why XInclude is needed for Yanel. There is: > > //Set an object that will be used to resolve URIs used in document(). > void javax.xml.transform.Transformer.setURIResolver(URIResolver) > > The URIResolver can be the SourceResolver. I think we could have used document() with a resolver. I guess we didn't think about this alternative because of our cocoon/lenya background, where xinclude is used frequently. One advantage of xinclude is that you can put it also into the content xml, not only into the xsl. One day we will have to set an URIResolver on the transformer anyway, to allow including another xslt. Feel free to file an enhancement bug. josias > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From etaroza at optaros.com Mon Jan 14 17:57:04 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 14 17:57:54 2008 Subject: [Yanel-dev] simple problem hard solution Message-ID: <478B9460.1000100@optaros.com> Hi, I created a resource type which extends the BasicXMLResource. I want with this resource to: 1. Aggregate several XMLs into one document (a couple of simple ones and the sitetree) 2. Apply a transformation and return it as a view So I tried the most natural solution: I put into the resource configuration two XSLTs, one with xincludes another with transformations. Didn't work, XIncludes are resolved last. All the other configurations that I can think of are not very natural... Maybe anyone can think of a reasonable solution? Evaldas From michael.wechner at wyona.com Mon Jan 14 22:00:52 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 14 22:01:03 2008 Subject: [Yanel-dev] simple problem hard solution In-Reply-To: <478B9460.1000100@optaros.com> References: <478B9460.1000100@optaros.com> Message-ID: <478BCD84.2010904@wyona.com> Evaldas Taroza wrote: > Hi, > I created a resource type which extends the BasicXMLResource. I want > with this resource to: > 1. Aggregate several XMLs into one document (a couple of simple ones > and the sitetree) > 2. Apply a transformation and return it as a view > > So I tried the most natural solution: I put into the resource > configuration two XSLTs, one with xincludes another with > transformations. Didn't work, XIncludes are resolved last. > > All the other configurations that I can think of are not very natural... > > Maybe anyone can think of a reasonable solution? either do your own custom resource or aggregate the content before you send it through the XSLTs by overwriting the getContent... method of the BasicXMLResource Of course it would be nice to have something like a "Cocoon Resource" where one could configure such stuff, but I am afraid of other drawbacks then. But I understand we need to come up with a simple solution which would covering the most commong uses and for the rest one can do custom resources. It's about finding the balance ;-) Cheers Michi > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From josias.thoeny at wyona.com Tue Jan 15 09:29:29 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Tue Jan 15 09:30:07 2008 Subject: [Yanel-dev] simple problem hard solution In-Reply-To: <478BCD84.2010904@wyona.com> References: <478B9460.1000100@optaros.com> <478BCD84.2010904@wyona.com> Message-ID: <478C6EE9.2030403@wyona.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Hi, >> I created a resource type which extends the BasicXMLResource. I want >> with this resource to: >> 1. Aggregate several XMLs into one document (a couple of simple ones >> and the sitetree) >> 2. Apply a transformation and return it as a view >> >> So I tried the most natural solution: I put into the resource >> configuration two XSLTs, one with xincludes another with >> transformations. Didn't work, XIncludes are resolved last. >> >> All the other configurations that I can think of are not very natural... >> >> Maybe anyone can think of a reasonable solution? > > > either do your own custom resource or aggregate the content before you > send it through the XSLTs by overwriting the getContent... method of the > BasicXMLResource As an alternative you could try what you suggested earlier, to set the URIResolver on the transformer, so you could include xml documents during the xslt transformation using document(). You would have to patch BasicXMLResource or add this to your own resource. I cannot think of any other easy solutions right now. If we want to make the whole pipeline configurable, it would be a lot of work. josias > > Of course it would be nice to have something like a "Cocoon Resource" > where one could configure such stuff, but I am afraid of other drawbacks > then. > > But I understand we need to come up with a simple solution which would > covering the most commong uses and for the rest one can do custom > resources. It's about finding the balance ;-) > > Cheers > > Michi > >> >> Evaldas >> _______________________________________________ >> Yanel-development mailing list >> Yanel-development@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > > From etaroza at optaros.com Tue Jan 15 10:21:44 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Tue Jan 15 10:22:30 2008 Subject: [Yanel-dev] authentication ssl patch Message-ID: <478C7B28.3040402@optaros.com> There was a small bug in YanelServlet. A check for ssl was needed. -------------- next part -------------- Index: src/java/org/wyona/yanel/servlet/YanelServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/java/org/wyona/yanel/servlet/YanelServlet.java (revision 30347) +++ src/java/org/wyona/yanel/servlet/YanelServlet.java (working copy) @@ -1151,7 +1151,11 @@ } else { log.warn("Authentication was successful!"); URL url =3D new URL(getRequestURLQS(request, null, false).= toString()); - url =3D new URL("https", url.getHost(), new Integer(sslPor= t).intValue(), url.getFile()); + if(sslPort !=3D null){ + url =3D new URL("https", url.getHost(), new Integer(ss= lPort).intValue(), url.getFile()); + }else{ + // leave default + } log.warn("Redirect to original request: " + url); response.setHeader("Location", url.toString()); // TODO: Yulup has a bug re TEMPORARY_REDIRECT From etaroza at optaros.com Tue Jan 15 17:11:05 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Tue Jan 15 17:11:52 2008 Subject: [Yanel-dev] OpenID patch Message-ID: <478CDB19.9070100@optaros.com> Hi everyone, I did a simple implementation for the logging in with an OpenID. After = applying the patch *joid.jar and tsik.jar* must be in the dependencies. = I believe these libraries should be put into Wyona's Maven repository. There is several issues though: 1. When someone logs in with an OpenID a respective user in Yanel is = created. It is not clear which policies this user should have nor to = which group it should belong... So now I preinsert openid-yanel users = into some groups, e.g. I put http---evaldas.taroza.myopenid.com into = ac-identities/groups/editor.xml and then when I log in with my = http://evaldas.taroza.myopenid.com I get the editor privileges. (Note = that I the Yanel user id is made out of OpenID by replacing special = characters, like , * : / & by a dash) 2. When I press "Deny" on the OpenID provider and then try to = reauthenticate again, I cannot do that... I posted a question on Joid = mailing list, hopefully there will be some help from there. So Michael, can you commit that? And I think we should think about = solution to the problem (1). Cheers, Evaldas -------------- next part -------------- Index: src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticat= orImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorI= mpl.java (revision 30347) +++ src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorI= mpl.java (working copy) @@ -1,37 +1,34 @@ package org.wyona.yanel.servlet.security.impl; = -import org.wyona.yanel.core.map.Map; -import org.wyona.yanel.core.map.Realm; -import org.wyona.yanel.servlet.IdentityMap; -import org.wyona.yanel.servlet.YanelServlet; -import org.wyona.yanel.core.api.security.WebAuthenticator; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.net.URL; +import java.util.Iterator; = -import org.wyona.security.core.api.AccessManagementException; -import org.wyona.security.core.ExpiredIdentityException; -import org.wyona.security.core.api.Identity; -import org.wyona.security.core.api.User; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; - -import java.io.File; -import java.io.IOException; -import java.io.PrintWriter; - import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamSource; = -import java.net.URL; - -import org.w3c.dom.Element; - -import org.apache.log4j.Category; - import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.DefaultConfigurationBuild= er; +import org.apache.log4j.Category; +import org.verisign.joid.consumer.OpenIdFilter; +import org.verisign.joid.util.UrlUtils; +import org.w3c.dom.Element; +import org.wyona.security.core.ExpiredIdentityException; +import org.wyona.security.core.api.AccessManagementException; +import org.wyona.security.core.api.Identity; +import org.wyona.security.core.api.User; +import org.wyona.yanel.core.api.security.WebAuthenticator; +import org.wyona.yanel.core.map.Map; +import org.wyona.yanel.core.map.Realm; +import org.wyona.yanel.servlet.IdentityMap; +import org.wyona.yanel.servlet.YanelServlet; = /** * @@ -48,7 +45,7 @@ } = /** - * + * This method is called from within the YanelServlet whenever authent= ication is needed. Normally it is the case when the user enters credentials= into the login form. */ public HttpServletResponse doAuthenticate(HttpServletRequest request, = HttpServletResponse response, Map map, String reservedPrefix, String xsltLo= ginScreenDefault, String servletContextRealPath, String sslPort) throws Ser= vletException, IOException { try { @@ -91,13 +88,109 @@ return response; } } else if (openID !=3D null) { + // NOTE[et]: there is actually an issue with the OpenID pr= ovider, when I press "Deny" there and then try to reauthenticate + // the FullUrl will be about denial, so consumer will fail= . I don't know where is the issue and how to work around this + = + String returnTo =3D UrlUtils.getFullUrl(request); + if (null !=3D openID && !openID.startsWith("http:")) { + openID =3D "http://" + openID; + } + String trustRoot =3D returnTo; + = + String s =3D OpenIdFilter.joid().getAuthUrl(openID, return= To, trustRoot); + response.sendRedirect(s); + = // TODO: Implement OpenID ... (see for instance http://cod= e.google.com/p/joid/) - log.warn("OpenID implementation not finished yet: [" + ope= nID + "]"); - getXHTMLAuthenticationForm(request, response, realm, "Logi= n failed because OpenID implementation is not finished yet!", reservedPrefi= x, xsltLoginScreenDefault, servletContextRealPath, sslPort, map); - return response; +// log.warn("OpenID implementation not finished yet: [" + o= penID + "]"); +// getXHTMLAuthenticationForm(request, response, realm, "Lo= gin failed because OpenID implementation is not finished yet!", reservedPre= fix, xsltLoginScreenDefault, servletContextRealPath, sslPort, map); + return null; } else { if (log.isDebugEnabled()) log.debug("No form based authent= ication request."); } + = + { // Check if the user is logged in with the OpenID + = + HttpSession session =3D null; + String userURL =3D null; + if((userURL =3D OpenIdFilter.getCurrentUser((session =3D r= equest.getSession()))) !=3D null){ + // logged in with the OpenID + log.debug("Logged in with OpenID:"+OpenIdFilter.getCur= rentUser(request.getSession())); + = + class PasswordGenerator{ + private int length =3D 9; + private PasswordGenerator(){} + private PasswordGenerator(int length){this.length = =3D length;} + public String createPassword(){ + StringBuffer password =3D new StringBuffer(len= gth); + for (int i =3D 0; i < 9; i++) { + if(Math.random() < 0.4){ + // Number + password.append((int)(Math.random()*(5= 7 - 48 + 1)) + 48); + }else if(Math.random() >=3D 0.4 && Math.ra= ndom() < 0.7){ + // Capital letter + password.append((int)(Math.random()*(9= 0 - 65 + 1)) + 65); + }else if(Math.random() >=3D 0.7){ + // Not capital letter + password.append((int)(Math.random()*(1= 22 - 97 + 1)) + 97); + } = + } + return password.toString(); + } + } + = + // Replace the chars that don't allow to create a files + String userID =3D userURL.replace('/', '-'); + userID =3D userID.replace(':', '-'); + userID =3D userID.replace('?', '-'); + userID =3D userID.replace('&', '-'); + userID =3D userID.replace('*', '-'); + userID =3D userID.replace('|', '-'); + // TODO: maybe there are dissallowed chars, but mind b= ackwards compatibility + = + User user =3D null; + if((user =3D realm.getIdentityManager().getUserManager= ().getUser(userID, true)) =3D=3D null){ + user =3D realm.getIdentityManager().getUserManager= ().createUser(userID, userURL, "email@not.provided", new PasswordGenerator(= 8).createPassword()); + = + // Save the user, otherwise it will be lost on fir= st refresh of the user manager + user.save(); + = + // Refresh to see the groups for this user because= they are inserted manually + //TODO: avoid this workaround + user =3D realm.getIdentityManager().getUserManager= ().getUser(userID, true); + } + = + //TODO: the user must have some policies assigned, or = it must belong to some group + //It is currently not clear how to do that, (no API fo= r that still?) = + //so the user (e.g. http---evaldas.taroza.myopenid.com= ) should be inserted to some group manually in order to login with an OpenID + = + // Register identity + IdentityMap identityMap =3D (IdentityMap)session.getAt= tribute(YanelServlet.IDENTITY_MAP_KEY); + if (identityMap =3D=3D null) { + identityMap =3D new IdentityMap(); + session.setAttribute(YanelServlet.IDENTITY_MAP_KEY= , identityMap); + identityMap.put(realm.getID(), new Identity(user)); + }else{ + // Check if the openID identity is registered for = Yanel + boolean registered =3D false; + for (Iterator i =3D identityMap.values().iterator(= ); i.hasNext() && !registered;) { + Identity identity =3D (Identity) i.next(); + if(identity.getUsername().equals(userID)){ + registered =3D true; + } + } + if(!registered){ + identityMap.put(realm.getID(), new Identity(us= er)); + } + = + } + = + // Yanel user was created, consumer must be disconnect= ed from the OpenID provider + // This is also needed to avoid loops of redirection + OpenIdFilter.logout(session); + = + return null; + } + } = // Check for Neutron-Auth based authentication String yanelUsecase =3D request.getParameter("yanel.usecase"); Index: WEB-INF/web.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- WEB-INF/web.xml (revision 30347) +++ WEB-INF/web.xml (working copy) @@ -16,6 +16,30 @@ Yanel Yanel = + + This filter (for Consumer side) automatically parses = OpenID responses and sets the user's identity in the session. + OpenIdFilter + org.verisign.joid.consumer.OpenIdFilter + + Optional. Will store the identity url in a cookie under= "openid.identity" if set to true. + saveInCookie + false + + + + = YanelServlet org.wyona.yanel.servlet.YanelServlet @@ -45,7 +69,12 @@ 2 - + = + + OpenIdFilter + /* + + = YanelServlet / From etaroza at optaros.com Tue Jan 15 17:19:03 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Tue Jan 15 17:19:48 2008 Subject: [Yanel-dev] Toolbar security hole? Message-ID: <478CDCF7.3000104@optaros.com> Hi everyone, I just noticed the following behavior with the yanel-website realm: 1. Click on the toolbar link 2. Log in 3. Toolbar appears 4. Select Yanel-Log out in the toolbar 5. The toolbar stays (with reduced functionality) 6. When you click on the toolbar link it asks to log in So 5 and 6 steps are conflicting. Evaldas From etaroza at optaros.com Tue Jan 15 19:09:27 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Tue Jan 15 19:10:13 2008 Subject: [Yanel-dev] Sitetree translation Message-ID: <478CF6D7.5090005@optaros.com> I am creating a resource which should get the info in the sitetree and transform it with an XSLT. I have the sitetree in two languages: sitetree-de.xml and sitetree-en.xml. Together with translations.xml. How do I programatically get a translated sitetree? Let's say that my resource is accessed through .../yanel/de/myresource.html, so in the implementation I would like to do something like ... getContentXML(...){ return toView("yanelresource:/navigator"+"?"+getRequestedLanguage()); } how do I do that? Can I somehow reuse some navigator resource which translates the sitetree? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Wed Jan 16 09:32:32 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 16 09:32:32 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478CDB19.9070100@optaros.com> References: <478CDB19.9070100@optaros.com> Message-ID: <478DC120.3000808@wyona.com> Evaldas Taroza wrote: > Hi everyone, > > I did a simple implementation for the logging in with an OpenID. After > applying the patch *joid.jar and tsik.jar* must be in the > dependencies. I believe these libraries should be put into Wyona's > Maven repository. are there no other public maven where these libs are being hosted (e.g. ibiblio, maven itself)? If not, what versions are these libs (?), such that we can add a version to the Wyona maven repo > > There is several issues though: > 1. When someone logs in with an OpenID a respective user in Yanel is > created. It is not clear which policies this user should have nor to > which group it should belong... I would say none. Also I don't tunk such a user should be created by default, because it would mean a big security hole, but I understand it depends on the situation, e.g. - NO: http://www.wyona.com/ - YES: http://foaf.wyona.org/ also how to configure the trusted openID providers. How can we make this configurable or moderateable? > So now I preinsert openid-yanel users into some groups, e.g. I put > http---evaldas.taroza.myopenid.com into > ac-identities/groups/editor.xml and then when I log in with my > http://evaldas.taroza.myopenid.com I get the editor privileges. (Note > that I the Yanel user id is made out of OpenID by replacing special > characters, like , * : / & by a dash) I guess this would be custom and hence we need to provide a way that developers/integrators can change this. > > > 2. When I press "Deny" on the OpenID provider and then try to > reauthenticate again, I cannot do that... I posted a question on Joid > mailing list, hopefully there will be some help from there. ok > > So Michael, can you commit that? And I think we should think about > solution to the problem (1). yes, will commit as soon as we will have solved the issues which you describe above ;-) Cheers Michi > > Cheers, > > Evaldas > >------------------------------------------------------------------------ > >Index: src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java >=================================================================== >--- src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java (revision 30347) >+++ src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java (working copy) >@@ -1,37 +1,34 @@ > package org.wyona.yanel.servlet.security.impl; > >-import org.wyona.yanel.core.map.Map; >-import org.wyona.yanel.core.map.Realm; >-import org.wyona.yanel.servlet.IdentityMap; >-import org.wyona.yanel.servlet.YanelServlet; >-import org.wyona.yanel.core.api.security.WebAuthenticator; >+import java.io.File; >+import java.io.IOException; >+import java.io.PrintWriter; >+import java.net.URL; >+import java.util.Iterator; > >-import org.wyona.security.core.api.AccessManagementException; >-import org.wyona.security.core.ExpiredIdentityException; >-import org.wyona.security.core.api.Identity; >-import org.wyona.security.core.api.User; >- > import javax.servlet.ServletException; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > import javax.servlet.http.HttpSession; >- >-import java.io.File; >-import java.io.IOException; >-import java.io.PrintWriter; >- > import javax.xml.transform.Transformer; > import javax.xml.transform.TransformerFactory; > import javax.xml.transform.stream.StreamSource; > >-import java.net.URL; >- >-import org.w3c.dom.Element; >- >-import org.apache.log4j.Category; >- > import org.apache.avalon.framework.configuration.Configuration; > import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; >+import org.apache.log4j.Category; >+import org.verisign.joid.consumer.OpenIdFilter; >+import org.verisign.joid.util.UrlUtils; >+import org.w3c.dom.Element; >+import org.wyona.security.core.ExpiredIdentityException; >+import org.wyona.security.core.api.AccessManagementException; >+import org.wyona.security.core.api.Identity; >+import org.wyona.security.core.api.User; >+import org.wyona.yanel.core.api.security.WebAuthenticator; >+import org.wyona.yanel.core.map.Map; >+import org.wyona.yanel.core.map.Realm; >+import org.wyona.yanel.servlet.IdentityMap; >+import org.wyona.yanel.servlet.YanelServlet; > > /** > * >@@ -48,7 +45,7 @@ > } > > /** >- * >+ * This method is called from within the YanelServlet whenever authentication is needed. Normally it is the case when the user enters credentials into the login form. > */ > public HttpServletResponse doAuthenticate(HttpServletRequest request, HttpServletResponse response, Map map, String reservedPrefix, String xsltLoginScreenDefault, String servletContextRealPath, String sslPort) throws ServletException, IOException { > try { >@@ -91,13 +88,109 @@ > return response; > } > } else if (openID != null) { >+ // NOTE[et]: there is actually an issue with the OpenID provider, when I press "Deny" there and then try to reauthenticate >+ // the FullUrl will be about denial, so consumer will fail. I don't know where is the issue and how to work around this >+ >+ String returnTo = UrlUtils.getFullUrl(request); >+ if (null != openID && !openID.startsWith("http:")) { >+ openID = "http://" + openID; >+ } >+ String trustRoot = returnTo; >+ >+ String s = OpenIdFilter.joid().getAuthUrl(openID, returnTo, trustRoot); >+ response.sendRedirect(s); >+ > // TODO: Implement OpenID ... (see for instance http://code.google.com/p/joid/) >- log.warn("OpenID implementation not finished yet: [" + openID + "]"); >- getXHTMLAuthenticationForm(request, response, realm, "Login failed because OpenID implementation is not finished yet!", reservedPrefix, xsltLoginScreenDefault, servletContextRealPath, sslPort, map); >- return response; >+// log.warn("OpenID implementation not finished yet: [" + openID + "]"); >+// getXHTMLAuthenticationForm(request, response, realm, "Login failed because OpenID implementation is not finished yet!", reservedPrefix, xsltLoginScreenDefault, servletContextRealPath, sslPort, map); >+ return null; > } else { > if (log.isDebugEnabled()) log.debug("No form based authentication request."); > } >+ >+ { // Check if the user is logged in with the OpenID >+ >+ HttpSession session = null; >+ String userURL = null; >+ if((userURL = OpenIdFilter.getCurrentUser((session = request.getSession()))) != null){ >+ // logged in with the OpenID >+ log.debug("Logged in with OpenID:"+OpenIdFilter.getCurrentUser(request.getSession())); >+ >+ class PasswordGenerator{ >+ private int length = 9; >+ private PasswordGenerator(){} >+ private PasswordGenerator(int length){this.length = length;} >+ public String createPassword(){ >+ StringBuffer password = new StringBuffer(length); >+ for (int i = 0; i < 9; i++) { >+ if(Math.random() < 0.4){ >+ // Number >+ password.append((int)(Math.random()*(57 - 48 + 1)) + 48); >+ }else if(Math.random() >= 0.4 && Math.random() < 0.7){ >+ // Capital letter >+ password.append((int)(Math.random()*(90 - 65 + 1)) + 65); >+ }else if(Math.random() >= 0.7){ >+ // Not capital letter >+ password.append((int)(Math.random()*(122 - 97 + 1)) + 97); >+ } >+ } >+ return password.toString(); >+ } >+ } >+ >+ // Replace the chars that don't allow to create a files >+ String userID = userURL.replace('/', '-'); >+ userID = userID.replace(':', '-'); >+ userID = userID.replace('?', '-'); >+ userID = userID.replace('&', '-'); >+ userID = userID.replace('*', '-'); >+ userID = userID.replace('|', '-'); >+ // TODO: maybe there are dissallowed chars, but mind backwards compatibility >+ >+ User user = null; >+ if((user = realm.getIdentityManager().getUserManager().getUser(userID, true)) == null){ >+ user = realm.getIdentityManager().getUserManager().createUser(userID, userURL, "email@not.provided", new PasswordGenerator(8).createPassword()); >+ >+ // Save the user, otherwise it will be lost on first refresh of the user manager >+ user.save(); >+ >+ // Refresh to see the groups for this user because they are inserted manually >+ //TODO: avoid this workaround >+ user = realm.getIdentityManager().getUserManager().getUser(userID, true); >+ } >+ >+ //TODO: the user must have some policies assigned, or it must belong to some group >+ //It is currently not clear how to do that, (no API for that still?) >+ //so the user (e.g. http---evaldas.taroza.myopenid.com) should be inserted to some group manually in order to login with an OpenID >+ >+ // Register identity >+ IdentityMap identityMap = (IdentityMap)session.getAttribute(YanelServlet.IDENTITY_MAP_KEY); >+ if (identityMap == null) { >+ identityMap = new IdentityMap(); >+ session.setAttribute(YanelServlet.IDENTITY_MAP_KEY, identityMap); >+ identityMap.put(realm.getID(), new Identity(user)); >+ }else{ >+ // Check if the openID identity is registered for Yanel >+ boolean registered = false; >+ for (Iterator i = identityMap.values().iterator(); i.hasNext() && !registered;) { >+ Identity identity = (Identity) i.next(); >+ if(identity.getUsername().equals(userID)){ >+ registered = true; >+ } >+ } >+ if(!registered){ >+ identityMap.put(realm.getID(), new Identity(user)); >+ } >+ >+ } >+ >+ // Yanel user was created, consumer must be disconnected from the OpenID provider >+ // This is also needed to avoid loops of redirection >+ OpenIdFilter.logout(session); >+ >+ return null; >+ } >+ } > > // Check for Neutron-Auth based authentication > String yanelUsecase = request.getParameter("yanel.usecase"); >Index: WEB-INF/web.xml >=================================================================== >--- WEB-INF/web.xml (revision 30347) >+++ WEB-INF/web.xml (working copy) >@@ -16,6 +16,30 @@ > Yanel > Yanel > >+ >+ This filter (for Consumer side) automatically parses OpenID responses and sets the user's identity in the session. >+ OpenIdFilter >+ org.verisign.joid.consumer.OpenIdFilter >+ >+ Optional. Will store the identity url in a cookie under "openid.identity" if set to true. >+ saveInCookie >+ false >+ >+ >+ >+ > > YanelServlet > org.wyona.yanel.servlet.YanelServlet >@@ -45,7 +69,12 @@ > 2 > > >- >+ >+ >+ OpenIdFilter >+ /* >+ >+ > > YanelServlet > / > > >------------------------------------------------------------------------ > >_______________________________________________ >Yanel-development mailing list >Yanel-development@wyona.com >http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Wed Jan 16 09:32:20 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 09:33:01 2008 Subject: [Yanel-dev] XML resource patch Message-ID: <478DC114.1080201@optaros.com> Some small changes to BasicXMLResource and SerializerFactory. Evaldas -- = +41 79 616 53 76 Optaros - www.optaros.com -------------- next part -------------- Index: core/java/org/wyona/yanel/core/serialization/SerializerFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- core/java/org/wyona/yanel/core/serialization/SerializerFactory.java (re= vision 30347) +++ core/java/org/wyona/yanel/core/serialization/SerializerFactory.java (wo= rking copy) @@ -4,6 +4,7 @@ import org.apache.log4j.Category; import org.apache.xml.serializer.OutputPropertiesFactory; import org.apache.xml.serializer.Serializer; +import org.apache.xml.serializer.SerializerFactory; = /** * Factory to create serializers. = @@ -16,10 +17,12 @@ public static final int XHTML_STRICT =3D 1; public static final int HTML_TRANSITIONAL =3D 2; public static final int XML =3D 3; + public static final int TEXT =3D 4; = public static final String XHTML_STRICT_KEY =3D "XHTML_STRICT"; public static final String HTML_TRANSITIONAL_KEY =3D "HTML_TRANSITIONA= L"; public static final String XML_KEY =3D "XML"; + public static final String TEXT_KEY =3D "TEXT"; = public static Serializer getSerializer(Properties format) { Serializer serializer =3D new HTMLSerializer(); @@ -32,10 +35,12 @@ return getSerializer(XHTML_STRICT); } else if (key.equals(HTML_TRANSITIONAL_KEY)) { return getSerializer(HTML_TRANSITIONAL); - } if (key.equals(XML_KEY)) { + } else if (key.equals(XML_KEY)) { return getSerializer(XML); + } else if (key.equals(TEXT_KEY)) { + return getSerializer(TEXT); } - return null; + return getSerializer(TEXT); } = public static Serializer getSerializer(int key) { @@ -47,8 +52,7 @@ format.setProperty("doctype-public", "-//W3C//DTD XHTML 1.0 St= rict//EN"); format.setProperty("doctype-system", "http://www.w3.org/TR/xht= ml1/DTD/xhtml1-strict.dtd"); serializer.setOutputFormat(format); - } - if (key =3D=3D HTML_TRANSITIONAL) { + }else if (key =3D=3D HTML_TRANSITIONAL) { serializer =3D new HTMLSerializer(); Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties("html"); format.setProperty("indent", "yes"); @@ -56,12 +60,14 @@ format.setProperty("doctype-public", "-//W3C//DTD HTML 4.01 Tr= ansitional//EN"); format.setProperty("doctype-system", "http://www.w3.org/TR/htm= l4/loose.dtd"); serializer.setOutputFormat(format); - } - if (key =3D=3D XML) { + }else if (key =3D=3D XML) { serializer =3D new XMLSerializer(); Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties("xml"); format.setProperty("indent", "yes"); serializer.setOutputFormat(format); + } else { + Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties("text"); + serializer =3D SerializerFactory.getSerializer(format); } return serializer; } Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (revisio= n 30348) +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (working= copy) @@ -64,10 +64,6 @@ protected static String DEFAULT_VIEW_ID =3D "default"; protected static String SOURCE_VIEW_ID =3D "source"; = - protected static String SERIALIZER_OMIT_XML_DECLARATION =3D "serialize= r-omit-xml-declaration"; - protected static String SERIALIZER_DOCTYPE_PUBLIC =3D "serializer-doct= ype-public"; - protected static String SERIALIZER_DOCTYPE_SYSTEM =3D "serializer-doct= ype-system"; - protected HashMap viewDescriptors; = public ViewDescriptor getViewDescriptor(String viewId) { @@ -261,10 +257,8 @@ = if (mimeType.equals("text/html")) { serializer =3D SerializerFactory.getSerializer(SerializerF= actory.HTML_TRANSITIONAL); - } else if (mimeType.equals("application/xml")) { - serializer =3D SerializerFactory.getSerializer(SerializerF= actory.XML); } else { - serializer =3D SerializerFactory.getSerializer(SerializerF= actory.XHTML_STRICT); + serializer =3D SerializerFactory.getSerializer(SerializerF= actory.XML); } } // allow to override xml declaration and doctype: From michael.wechner at wyona.com Wed Jan 16 09:36:26 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 16 09:36:25 2008 Subject: [Yanel-dev] Toolbar security hole? In-Reply-To: <478CDCF7.3000104@optaros.com> References: <478CDCF7.3000104@optaros.com> Message-ID: <478DC20A.4030500@wyona.com> Evaldas Taroza wrote: > Hi everyone, > > I just noticed the following behavior with the yanel-website realm: > 1. Click on the toolbar link > 2. Log in > 3. Toolbar appears > 4. Select Yanel-Log out in the toolbar > 5. The toolbar stays (with reduced functionality) > 6. When you click on the toolbar link it asks to log in > > So 5 and 6 steps are conflicting. very much agreed. The problem is not so grave, because you have to login resp. get authorized before you get into this situation, but if you leave your computer open and go for lunch then other people might sit at your computer and might be able to do resp. see certain things, which they are not supposed to. Can you please a bugzilla entry as a blocker bug? Cheers Michi > > Evaldas > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From bugzilla-daemon at bugzilla.wyona.com Wed Jan 16 09:14:04 2008 From: bugzilla-daemon at bugzilla.wyona.com (bugzilla-daemon@bugzilla.wyona.com) Date: Wed Jan 16 09:43:55 2008 Subject: [Yanel-dev] [Bug 5795] Authentication considering expiration date Message-ID: <20080116081404.8D3D8740541@bugzilla.wyona.com> http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5795 simone.gerber@wyona.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact. From bugzilla-daemon at bugzilla.wyona.com Wed Jan 16 09:16:50 2008 From: bugzilla-daemon at bugzilla.wyona.com (bugzilla-daemon@bugzilla.wyona.com) Date: Wed Jan 16 09:46:43 2008 Subject: [Yanel-dev] [Bug 5891] New: Toobar should hide after log-out Message-ID: <20080116081650.CDF9E740592@bugzilla.wyona.com> http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=5891 Summary: Toobar should hide after log-out Product: Yanel Version: unspecified Platform: All OS/Version: All Status: NEW Severity: blocker Priority: P2 Component: General AssignedTo: michael.wechner@wyona.org ReportedBy: etaroza@optaros.com QAContact: yanel-development@wyona.com I just noticed the following behavior with the yanel-website realm: 1. Click on the toolbar link 2. Log in 3. Toolbar appears 4. Select Yanel-Log out in the toolbar 5. The toolbar stays (with reduced functionality) 6. When you click on the toolbar link it asks to log in So 5 and 6 steps are conflicting. ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact. From etaroza at optaros.com Wed Jan 16 10:03:50 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 10:04:32 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478DC120.3000808@wyona.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> Message-ID: <478DC876.4030001@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Hi everyone, >> >> I did a simple implementation for the logging in with an OpenID. After >> applying the patch *joid.jar and tsik.jar* must be in the >> dependencies. I believe these libraries should be put into Wyona's >> Maven repository. > > > are there no other public maven where these libs are being hosted (e.g. > ibiblio, maven itself)? I could not find them on the web. I use joid.jar and tsik.jar as downloaded from SVN together with all the sources. Official joid-1.0.2.jar as downloaded from the http://code.google.com/p/joid/downloads/list does not include many helper classes, e.g. OpenIDFilter So we could use those two jars with version 1.0.2-SVN, or something like that. > > If not, what versions are these libs (?), such that we can add a version > to the Wyona maven repo > >> >> There is several issues though: >> 1. When someone logs in with an OpenID a respective user in Yanel is >> created. It is not clear which policies this user should have nor to >> which group it should belong... > > > I would say none. Also I don't tunk such a user should be created by > default, because it would mean a big security hole, but I understand it > depends on the situation, e.g. > > - NO: http://www.wyona.com/ > - YES: http://foaf.wyona.org/ I agree this will depend on the application, because every realm can have its own default policies > > also how to configure the trusted openID providers. > > How can we make this configurable or moderateable? Trusted providers can simply be a list of providers with an assigned trust level. I would say that the domain of an OpenID can be assigned default policies. E.g. *.myopenid.com - editor, *.aol.com - reader. Managing by domain could also solve the problem of creating a user inside Yanel, because the profile info is on the provider. > >> So now I preinsert openid-yanel users into some groups, e.g. I put >> http---evaldas.taroza.myopenid.com into >> ac-identities/groups/editor.xml and then when I log in with my >> http://evaldas.taroza.myopenid.com I get the editor privileges. (Note >> that I the Yanel user id is made out of OpenID by replacing special >> characters, like , * : / & by a dash) > > > I guess this would be custom and hence we need to provide a way that > developers/integrators can change this. > Yes, thats more like a workaround for testing, then a normal implementation. Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From etaroza at optaros.com Wed Jan 16 10:17:00 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 10:17:41 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DC114.1080201@optaros.com> References: <478DC114.1080201@optaros.com> Message-ID: <478DCB8C.1020702@optaros.com> Sorry the line: import org.apache.xml.serializer.SerializerFactory; should be removed in order to compile. Evaldas Evaldas Taroza wrote: > Some small changes to BasicXMLResource and SerializerFactory. > > Evaldas > > > ------------------------------------------------------------------------ > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- +41 79 616 53 76 Optaros - www.optaros.com From josias.thoeny at wyona.com Wed Jan 16 11:03:48 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Wed Jan 16 11:04:29 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DC114.1080201@optaros.com> References: <478DC114.1080201@optaros.com> Message-ID: <478DD684.205@wyona.com> Hi Evaldas, please see my comments below. Evaldas Taroza wrote: > Some small changes to BasicXMLResource and SerializerFactory. > > Evaldas > > > ------------------------------------------------------------------------ > > Index: core/java/org/wyona/yanel/core/serialization/SerializerFactory.java > =================================================================== > --- core/java/org/wyona/yanel/core/serialization/SerializerFactory.java (revision 30347) > +++ core/java/org/wyona/yanel/core/serialization/SerializerFactory.java (working copy) > @@ -4,6 +4,7 @@ > import org.apache.log4j.Category; > import org.apache.xml.serializer.OutputPropertiesFactory; > import org.apache.xml.serializer.Serializer; > +import org.apache.xml.serializer.SerializerFactory; > > /** > * Factory to create serializers. > @@ -16,10 +17,12 @@ > public static final int XHTML_STRICT = 1; > public static final int HTML_TRANSITIONAL = 2; > public static final int XML = 3; > + public static final int TEXT = 4; > > public static final String XHTML_STRICT_KEY = "XHTML_STRICT"; > public static final String HTML_TRANSITIONAL_KEY = "HTML_TRANSITIONAL"; > public static final String XML_KEY = "XML"; > + public static final String TEXT_KEY = "TEXT"; > > public static Serializer getSerializer(Properties format) { > Serializer serializer = new HTMLSerializer(); > @@ -32,10 +35,12 @@ > return getSerializer(XHTML_STRICT); > } else if (key.equals(HTML_TRANSITIONAL_KEY)) { > return getSerializer(HTML_TRANSITIONAL); > - } if (key.equals(XML_KEY)) { > + } else if (key.equals(XML_KEY)) { > return getSerializer(XML); > + } else if (key.equals(TEXT_KEY)) { > + return getSerializer(TEXT); > } > - return null; > + return getSerializer(TEXT); > } > > public static Serializer getSerializer(int key) { > @@ -47,8 +52,7 @@ > format.setProperty("doctype-public", "-//W3C//DTD XHTML 1.0 Strict//EN"); > format.setProperty("doctype-system", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); > serializer.setOutputFormat(format); > - } > - if (key == HTML_TRANSITIONAL) { > + }else if (key == HTML_TRANSITIONAL) { > serializer = new HTMLSerializer(); > Properties format = OutputPropertiesFactory.getDefaultMethodProperties("html"); > format.setProperty("indent", "yes"); > @@ -56,12 +60,14 @@ > format.setProperty("doctype-public", "-//W3C//DTD HTML 4.01 Transitional//EN"); > format.setProperty("doctype-system", "http://www.w3.org/TR/html4/loose.dtd"); > serializer.setOutputFormat(format); > - } > - if (key == XML) { > + }else if (key == XML) { > serializer = new XMLSerializer(); > Properties format = OutputPropertiesFactory.getDefaultMethodProperties("xml"); > format.setProperty("indent", "yes"); > serializer.setOutputFormat(format); > + } else { > + Properties format = OutputPropertiesFactory.getDefaultMethodProperties("text"); > + serializer = SerializerFactory.getSerializer(format); I've got a question here: currently we don't have a TextSerializer, so SerializerFactory.getSerializer(format) will return a HTMLSerializer. I guess this is not intented in the case of text format. Or what is your intention with the text format? > } > return serializer; > } > Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java > =================================================================== > --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (revision 30348) > +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (working copy) > @@ -64,10 +64,6 @@ > protected static String DEFAULT_VIEW_ID = "default"; > protected static String SOURCE_VIEW_ID = "source"; > > - protected static String SERIALIZER_OMIT_XML_DECLARATION = "serializer-omit-xml-declaration"; > - protected static String SERIALIZER_DOCTYPE_PUBLIC = "serializer-doctype-public"; > - protected static String SERIALIZER_DOCTYPE_SYSTEM = "serializer-doctype-system"; > - > protected HashMap viewDescriptors; > > public ViewDescriptor getViewDescriptor(String viewId) { > @@ -261,10 +257,8 @@ > > if (mimeType.equals("text/html")) { > serializer = SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); > - } else if (mimeType.equals("application/xml")) { > - serializer = SerializerFactory.getSerializer(SerializerFactory.XML); > } else { > - serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); > + serializer = SerializerFactory.getSerializer(SerializerFactory.XML); I'm afraid we cannot change the default behavior because some existing realms rely on this. With this patch, e.g. the yanel-website realm doesn't work anymore. josias > } > } > // allow to override xml declaration and doctype: > > > ------------------------------------------------------------------------ > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From etaroza at optaros.com Wed Jan 16 11:09:55 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 11:10:37 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DD684.205@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> Message-ID: <478DD7F3.2020909@optaros.com> Ok, maybe I changed too much. What I need is to be able to serialize XML resource into pure text. So I introduced TEXT in SerializerFactory. If I use HTML serializer I get all the DTD stuff prepended, which I don't want... Evaldas Josias Th?ny wrote: > Hi Evaldas, > > please see my comments below. > > Evaldas Taroza wrote: >> Some small changes to BasicXMLResource and SerializerFactory. >> >> Evaldas >> >> >> ------------------------------------------------------------------------ >> >> Index: >> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >> =================================================================== >> --- >> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >> (revision 30347) >> +++ >> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >> (working copy) >> @@ -4,6 +4,7 @@ >> import org.apache.log4j.Category; >> import org.apache.xml.serializer.OutputPropertiesFactory; >> import org.apache.xml.serializer.Serializer; >> +import org.apache.xml.serializer.SerializerFactory; >> >> /** >> * Factory to create serializers. @@ -16,10 +17,12 @@ >> public static final int XHTML_STRICT = 1; >> public static final int HTML_TRANSITIONAL = 2; >> public static final int XML = 3; >> + public static final int TEXT = 4; >> public static final String XHTML_STRICT_KEY = "XHTML_STRICT"; >> public static final String HTML_TRANSITIONAL_KEY = >> "HTML_TRANSITIONAL"; >> public static final String XML_KEY = "XML"; >> + public static final String TEXT_KEY = "TEXT"; >> >> public static Serializer getSerializer(Properties format) { >> Serializer serializer = new HTMLSerializer(); >> @@ -32,10 +35,12 @@ >> return getSerializer(XHTML_STRICT); >> } else if (key.equals(HTML_TRANSITIONAL_KEY)) { >> return getSerializer(HTML_TRANSITIONAL); >> - } if (key.equals(XML_KEY)) { >> + } else if (key.equals(XML_KEY)) { >> return getSerializer(XML); >> + } else if (key.equals(TEXT_KEY)) { >> + return getSerializer(TEXT); >> } >> - return null; >> + return getSerializer(TEXT); >> } >> public static Serializer getSerializer(int key) { >> @@ -47,8 +52,7 @@ >> format.setProperty("doctype-public", "-//W3C//DTD XHTML >> 1.0 Strict//EN"); >> format.setProperty("doctype-system", >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); >> serializer.setOutputFormat(format); >> - } >> - if (key == HTML_TRANSITIONAL) { >> + }else if (key == HTML_TRANSITIONAL) { >> serializer = new HTMLSerializer(); >> Properties format = >> OutputPropertiesFactory.getDefaultMethodProperties("html"); >> format.setProperty("indent", "yes"); >> @@ -56,12 +60,14 @@ >> format.setProperty("doctype-public", "-//W3C//DTD HTML >> 4.01 Transitional//EN"); >> format.setProperty("doctype-system", >> "http://www.w3.org/TR/html4/loose.dtd"); >> serializer.setOutputFormat(format); >> - } >> - if (key == XML) { >> + }else if (key == XML) { >> serializer = new XMLSerializer(); >> Properties format = >> OutputPropertiesFactory.getDefaultMethodProperties("xml"); >> format.setProperty("indent", "yes"); >> serializer.setOutputFormat(format); >> + } else { >> + Properties format = >> OutputPropertiesFactory.getDefaultMethodProperties("text"); >> + serializer = SerializerFactory.getSerializer(format); > > I've got a question here: currently we don't have a TextSerializer, so > SerializerFactory.getSerializer(format) will return a HTMLSerializer. I > guess this is not intented in the case of text format. > Or what is your intention with the text format? > >> } >> return serializer; >> } >> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> =================================================================== >> --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> (revision 30348) >> +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> (working copy) >> @@ -64,10 +64,6 @@ >> protected static String DEFAULT_VIEW_ID = "default"; >> protected static String SOURCE_VIEW_ID = "source"; >> >> - protected static String SERIALIZER_OMIT_XML_DECLARATION = >> "serializer-omit-xml-declaration"; >> - protected static String SERIALIZER_DOCTYPE_PUBLIC = >> "serializer-doctype-public"; >> - protected static String SERIALIZER_DOCTYPE_SYSTEM = >> "serializer-doctype-system"; >> - >> protected HashMap viewDescriptors; >> >> public ViewDescriptor getViewDescriptor(String viewId) { >> @@ -261,10 +257,8 @@ >> >> if (mimeType.equals("text/html")) { >> serializer = >> SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); >> - } else if (mimeType.equals("application/xml")) { >> - serializer = >> SerializerFactory.getSerializer(SerializerFactory.XML); >> } else { >> - serializer = >> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >> + serializer = >> SerializerFactory.getSerializer(SerializerFactory.XML); > > I'm afraid we cannot change the default behavior because some existing > realms rely on this. With this patch, e.g. the yanel-website realm > doesn't work anymore. > > josias > >> } >> } >> // allow to override xml declaration and doctype: >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Yanel-development mailing list >> Yanel-development@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > -- +41 79 616 53 76 Optaros - www.optaros.com From josias.thoeny at wyona.com Wed Jan 16 11:56:34 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Wed Jan 16 11:57:08 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DD7F3.2020909@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> Message-ID: <478DE2E2.9080400@wyona.com> Evaldas Taroza wrote: > Ok, maybe I changed too much. What I need is to be able to serialize XML = > resource into pure text. So I introduced TEXT in SerializerFactory. If I = > use HTML serializer I get all the DTD stuff prepended, which I don't = > want... ok, I see. Maybe we could add a property "omit-document-type" or something like = that, as in the attached patch. You could use it in the rc: yes yes Would that solve your problem? Or should we implement that empty and = elements cause the doctype to be removed from the output? WDYT? josias > = > Evaldas > = > Josias Th=F6ny wrote: >> Hi Evaldas, >> >> please see my comments below. >> >> Evaldas Taroza wrote: >>> Some small changes to BasicXMLResource and SerializerFactory. >>> >>> Evaldas >>> >>> >>> ------------------------------------------------------------------------ >>> >>> Index: = >>> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- = >>> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java = >>> (revision 30347) >>> +++ = >>> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java = >>> (working copy) >>> @@ -4,6 +4,7 @@ >>> import org.apache.log4j.Category; >>> import org.apache.xml.serializer.OutputPropertiesFactory; >>> import org.apache.xml.serializer.Serializer; >>> +import org.apache.xml.serializer.SerializerFactory; >>> = >>> /** >>> * Factory to create serializers. @@ -16,10 +17,12 @@ >>> public static final int XHTML_STRICT =3D 1; >>> public static final int HTML_TRANSITIONAL =3D 2; >>> public static final int XML =3D 3; >>> + public static final int TEXT =3D 4; >>> public static final String XHTML_STRICT_KEY =3D "XHTML_STRICT= "; >>> public static final String HTML_TRANSITIONAL_KEY =3D = >>> "HTML_TRANSITIONAL"; >>> public static final String XML_KEY =3D "XML"; >>> + public static final String TEXT_KEY =3D "TEXT"; >>> = >>> public static Serializer getSerializer(Properties format) { >>> Serializer serializer =3D new HTMLSerializer(); >>> @@ -32,10 +35,12 @@ >>> return getSerializer(XHTML_STRICT); >>> } else if (key.equals(HTML_TRANSITIONAL_KEY)) { >>> return getSerializer(HTML_TRANSITIONAL); >>> - } if (key.equals(XML_KEY)) { >>> + } else if (key.equals(XML_KEY)) { >>> return getSerializer(XML); >>> + } else if (key.equals(TEXT_KEY)) { >>> + return getSerializer(TEXT); >>> } >>> - return null; >>> + return getSerializer(TEXT); >>> } >>> public static Serializer getSerializer(int key) { >>> @@ -47,8 +52,7 @@ >>> format.setProperty("doctype-public", "-//W3C//DTD XHTML = >>> 1.0 Strict//EN"); >>> format.setProperty("doctype-system", = >>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); >>> serializer.setOutputFormat(format); >>> - } >>> - if (key =3D=3D HTML_TRANSITIONAL) { >>> + }else if (key =3D=3D HTML_TRANSITIONAL) { >>> serializer =3D new HTMLSerializer(); >>> Properties format =3D = >>> OutputPropertiesFactory.getDefaultMethodProperties("html"); >>> format.setProperty("indent", "yes"); >>> @@ -56,12 +60,14 @@ >>> format.setProperty("doctype-public", "-//W3C//DTD HTML = >>> 4.01 Transitional//EN"); >>> format.setProperty("doctype-system", = >>> "http://www.w3.org/TR/html4/loose.dtd"); >>> serializer.setOutputFormat(format); >>> - } >>> - if (key =3D=3D XML) { >>> + }else if (key =3D=3D XML) { >>> serializer =3D new XMLSerializer(); >>> Properties format =3D = >>> OutputPropertiesFactory.getDefaultMethodProperties("xml"); >>> format.setProperty("indent", "yes"); >>> serializer.setOutputFormat(format); >>> + } else { >>> + Properties format =3D = >>> OutputPropertiesFactory.getDefaultMethodProperties("text"); >>> + serializer =3D SerializerFactory.getSerializer(format); >> >> I've got a question here: currently we don't have a TextSerializer, so = >> SerializerFactory.getSerializer(format) will return a HTMLSerializer. = >> I guess this is not intented in the case of text format. >> Or what is your intention with the text format? >> >>> } >>> return serializer; >>> } >>> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java = >>> (revision 30348) >>> +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java = >>> (working copy) >>> @@ -64,10 +64,6 @@ >>> protected static String DEFAULT_VIEW_ID =3D "default"; >>> protected static String SOURCE_VIEW_ID =3D "source"; >>> = >>> - protected static String SERIALIZER_OMIT_XML_DECLARATION =3D = >>> "serializer-omit-xml-declaration"; >>> - protected static String SERIALIZER_DOCTYPE_PUBLIC =3D = >>> "serializer-doctype-public"; >>> - protected static String SERIALIZER_DOCTYPE_SYSTEM =3D = >>> "serializer-doctype-system"; >>> - >>> protected HashMap viewDescriptors; >>> = >>> public ViewDescriptor getViewDescriptor(String viewId) { >>> @@ -261,10 +257,8 @@ >>> = >>> if (mimeType.equals("text/html")) { >>> serializer =3D = >>> SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); >>> - } else if (mimeType.equals("application/xml")) { >>> - serializer =3D = >>> SerializerFactory.getSerializer(SerializerFactory.XML); >>> } else { >>> - serializer =3D = >>> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >>> + serializer =3D = >>> SerializerFactory.getSerializer(SerializerFactory.XML); >> >> I'm afraid we cannot change the default behavior because some existing = >> realms rely on this. With this patch, e.g. the yanel-website realm = >> doesn't work anymore. >> >> josias >> >>> } >>> } >>> // allow to override xml declaration and doctype: >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Yanel-development mailing list >>> Yanel-development@wyona.com >>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >> >> _______________________________________________ >> Yanel-development mailing list >> Yanel-development@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >> > = > = -------------- next part -------------- A non-text attachment was scrubbed... Name: patch_omit_document_type.diff Type: text/x-patch Size: 2156 bytes Desc: not available Url : http://lists.wyona.org/pipermail/yanel-development/attachments/200801= 16/789e0859/patch_omit_document_type.bin From michael.wechner at wyona.com Wed Jan 16 12:03:46 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 16 12:03:44 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DD684.205@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> Message-ID: <478DE492.8000507@wyona.com> Josias Th?ny wrote: > > I'm afraid we cannot change the default behavior because some existing > realms rely on this. With this patch, e.g. the yanel-website realm > doesn't work anymore. btw, it might make sense to introduce a new resource xml2.0 which has all kind of improvements, which means realms using xml resource will still work fine. This is one of the great things of Yanel ;-) Cheers Michi > > josias > >> } >> } >> // allow to override xml declaration and doctype: >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Yanel-development mailing list >> Yanel-development@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Wed Jan 16 12:05:28 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 12:06:09 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DE2E2.9080400@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> Message-ID: <478DE4F8.3010109@optaros.com> Yes, maybe that would work, but then I am a bit confused how to configure all the stuff: 1. in *.xsl I set 2. in *.yanel-rc I set mime-type to text/html 3. in *.yanel-rc I set serializer to HTML_TRANSITIONAL (plus all the stuff about omitting the declarations) Is that right? Why do I have to set so many things? For me it would be natural to set everything in the XSLT, i.e. when I set 1. then mime-type and serializer are like for text 2. then mime-type and serializer are like for html 3. then mime-type and serializer are like for xml Evaldas Josias Th?ny wrote: > Evaldas Taroza wrote: >> Ok, maybe I changed too much. What I need is to be able to serialize >> XML resource into pure text. So I introduced TEXT in >> SerializerFactory. If I use HTML serializer I get all the DTD stuff >> prepended, which I don't want... > > ok, I see. > Maybe we could add a property "omit-document-type" or something like > that, as in the attached patch. > > You could use it in the rc: > > > yes > yes > > > Would that solve your problem? > > Or should we implement that empty and > elements cause the doctype to be removed from the output? > > WDYT? > > josias > >> >> Evaldas >> >> Josias Th?ny wrote: >>> Hi Evaldas, >>> >>> please see my comments below. >>> >>> Evaldas Taroza wrote: >>>> Some small changes to BasicXMLResource and SerializerFactory. >>>> >>>> Evaldas >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> Index: >>>> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >>>> =================================================================== >>>> --- >>>> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >>>> (revision 30347) >>>> +++ >>>> core/java/org/wyona/yanel/core/serialization/SerializerFactory.java >>>> (working copy) >>>> @@ -4,6 +4,7 @@ >>>> import org.apache.log4j.Category; >>>> import org.apache.xml.serializer.OutputPropertiesFactory; >>>> import org.apache.xml.serializer.Serializer; >>>> +import org.apache.xml.serializer.SerializerFactory; >>>> >>>> /** >>>> * Factory to create serializers. @@ -16,10 +17,12 @@ >>>> public static final int XHTML_STRICT = 1; >>>> public static final int HTML_TRANSITIONAL = 2; >>>> public static final int XML = 3; >>>> + public static final int TEXT = 4; >>>> public static final String XHTML_STRICT_KEY = "XHTML_STRICT"; >>>> public static final String HTML_TRANSITIONAL_KEY = >>>> "HTML_TRANSITIONAL"; >>>> public static final String XML_KEY = "XML"; >>>> + public static final String TEXT_KEY = "TEXT"; >>>> >>>> public static Serializer getSerializer(Properties format) { >>>> Serializer serializer = new HTMLSerializer(); >>>> @@ -32,10 +35,12 @@ >>>> return getSerializer(XHTML_STRICT); >>>> } else if (key.equals(HTML_TRANSITIONAL_KEY)) { >>>> return getSerializer(HTML_TRANSITIONAL); >>>> - } if (key.equals(XML_KEY)) { >>>> + } else if (key.equals(XML_KEY)) { >>>> return getSerializer(XML); >>>> + } else if (key.equals(TEXT_KEY)) { >>>> + return getSerializer(TEXT); >>>> } >>>> - return null; >>>> + return getSerializer(TEXT); >>>> } >>>> public static Serializer getSerializer(int key) { >>>> @@ -47,8 +52,7 @@ >>>> format.setProperty("doctype-public", "-//W3C//DTD XHTML >>>> 1.0 Strict//EN"); >>>> format.setProperty("doctype-system", >>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); >>>> serializer.setOutputFormat(format); >>>> - } >>>> - if (key == HTML_TRANSITIONAL) { >>>> + }else if (key == HTML_TRANSITIONAL) { >>>> serializer = new HTMLSerializer(); >>>> Properties format = >>>> OutputPropertiesFactory.getDefaultMethodProperties("html"); >>>> format.setProperty("indent", "yes"); >>>> @@ -56,12 +60,14 @@ >>>> format.setProperty("doctype-public", "-//W3C//DTD HTML >>>> 4.01 Transitional//EN"); >>>> format.setProperty("doctype-system", >>>> "http://www.w3.org/TR/html4/loose.dtd"); >>>> serializer.setOutputFormat(format); >>>> - } >>>> - if (key == XML) { >>>> + }else if (key == XML) { >>>> serializer = new XMLSerializer(); >>>> Properties format = >>>> OutputPropertiesFactory.getDefaultMethodProperties("xml"); >>>> format.setProperty("indent", "yes"); >>>> serializer.setOutputFormat(format); >>>> + } else { >>>> + Properties format = >>>> OutputPropertiesFactory.getDefaultMethodProperties("text"); >>>> + serializer = SerializerFactory.getSerializer(format); >>> >>> I've got a question here: currently we don't have a TextSerializer, >>> so SerializerFactory.getSerializer(format) will return a >>> HTMLSerializer. I guess this is not intented in the case of text format. >>> Or what is your intention with the text format? >>> >>>> } >>>> return serializer; >>>> } >>>> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>>> =================================================================== >>>> --- >>>> impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>>> (revision 30348) >>>> +++ >>>> impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>>> (working copy) >>>> @@ -64,10 +64,6 @@ >>>> protected static String DEFAULT_VIEW_ID = "default"; >>>> protected static String SOURCE_VIEW_ID = "source"; >>>> >>>> - protected static String SERIALIZER_OMIT_XML_DECLARATION = >>>> "serializer-omit-xml-declaration"; >>>> - protected static String SERIALIZER_DOCTYPE_PUBLIC = >>>> "serializer-doctype-public"; >>>> - protected static String SERIALIZER_DOCTYPE_SYSTEM = >>>> "serializer-doctype-system"; >>>> - >>>> protected HashMap viewDescriptors; >>>> >>>> public ViewDescriptor getViewDescriptor(String viewId) { >>>> @@ -261,10 +257,8 @@ >>>> >>>> if (mimeType.equals("text/html")) { >>>> serializer = >>>> SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); >>>> - } else if (mimeType.equals("application/xml")) { >>>> - serializer = >>>> SerializerFactory.getSerializer(SerializerFactory.XML); >>>> } else { >>>> - serializer = >>>> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >>>> + serializer = >>>> SerializerFactory.getSerializer(SerializerFactory.XML); >>> >>> I'm afraid we cannot change the default behavior because some >>> existing realms rely on this. With this patch, e.g. the yanel-website >>> realm doesn't work anymore. >>> >>> josias >>> >>>> } >>>> } >>>> // allow to override xml declaration and doctype: >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Yanel-development mailing list >>>> Yanel-development@wyona.com >>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >>> >>> _______________________________________________ >>> Yanel-development mailing list >>> Yanel-development@wyona.com >>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >>> >> >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- +41 79 616 53 76 Optaros - www.optaros.com From etaroza at optaros.com Wed Jan 16 12:11:46 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 12:12:28 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DE492.8000507@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DE492.8000507@wyona.com> Message-ID: <478DE672.9060408@optaros.com> Michael Wechner wrote: > Josias Th?ny wrote: > >> >> I'm afraid we cannot change the default behavior because some existing >> realms rely on this. With this patch, e.g. the yanel-website realm >> doesn't work anymore. > > > btw, it might make sense to introduce a new resource xml2.0 which has > all kind of improvements, which means realms using xml resource will > still work fine. This is one of the great things of Yanel ;-) I am not yet familiar with XML 2.0 improvements, however, to my mind, Yanel XML resource needs some cleanup possibly refactoring. Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Wed Jan 16 12:16:15 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 16 12:16:14 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DE672.9060408@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DE492.8000507@wyona.com> <478DE672.9060408@optaros.com> Message-ID: <478DE77F.9010902@wyona.com> Evaldas Taroza wrote: > Michael Wechner wrote: > >> Josias Th?ny wrote: >> >>> >>> I'm afraid we cannot change the default behavior because some >>> existing realms rely on this. With this patch, e.g. the >>> yanel-website realm doesn't work anymore. >> >> >> >> btw, it might make sense to introduce a new resource xml2.0 which has >> all kind of improvements, which means realms using xml resource will >> still work fine. This is one of the great things of Yanel ;-) > > > I am not yet familiar with XML 2.0 improvements, sorry, I wasn't refering to XML 2.0 but creating a Yanel resource called xml2, e.g. > however, to my mind, Yanel XML resource needs some cleanup possibly > refactoring. as long as it doesn't break backwards compatibility that would be fine, but as soon as it does, we need to introduce a different resource type. Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Wed Jan 16 12:26:49 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 12:27:30 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DE77F.9010902@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DE492.8000507@wyona.com> <478DE672.9060408@optaros.com> <478DE77F.9010902@wyona.com> Message-ID: <478DE9F9.4080409@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Michael Wechner wrote: >> >>> Josias Th?ny wrote: >>> >>>> >>>> I'm afraid we cannot change the default behavior because some >>>> existing realms rely on this. With this patch, e.g. the >>>> yanel-website realm doesn't work anymore. >>> >>> >>> >>> btw, it might make sense to introduce a new resource xml2.0 which has >>> all kind of improvements, which means realms using xml resource will >>> still work fine. This is one of the great things of Yanel ;-) >> >> >> I am not yet familiar with XML 2.0 improvements, > > > sorry, I wasn't refering to XML 2.0 but creating a Yanel resource called > xml2, e.g. > > > > name="xml2" > namespace="http://www.wyona.org/yanel/resource/1.0" > class="org.wyona.yanel.impl.resources.xml2.XML2Resource" > > > >> however, to my mind, Yanel XML resource needs some cleanup possibly >> refactoring. > > > as long as it doesn't break backwards compatibility that would be fine, > but as soon as it does, we need to introduce a different resource type. What do you think xml2 would be good for? Is it worth doing it? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Wed Jan 16 12:31:08 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 16 12:31:06 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DE9F9.4080409@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DE492.8000507@wyona.com> <478DE672.9060408@optaros.com> <478DE77F.9010902@wyona.com> <478DE9F9.4080409@optaros.com> Message-ID: <478DEAFC.2040701@wyona.com> Evaldas Taroza wrote: >> >> as long as it doesn't break backwards compatibility that would be >> fine, but as soon as it does, we need to introduce a different >> resource type. > > > What do you think xml2 would be good for? Is it worth doing it? you tell me ;-) If the refactoring of the current xml resource type is not backwards compatible, then we need to introduce a new resource type (which could be a refactoted copy of the current xml resource type). Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Wed Jan 16 12:32:20 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 16 12:32:18 2008 Subject: [Yanel-dev] authentication ssl patch In-Reply-To: <478C7B28.3040402@optaros.com> References: <478C7B28.3040402@optaros.com> Message-ID: <478DEB44.6080003@wyona.com> Evaldas Taroza wrote: > There was a small bug in YanelServlet. A check for ssl was needed. done, thanks very much for your patch Cheers Michi >------------------------------------------------------------------------ > >Index: src/java/org/wyona/yanel/servlet/YanelServlet.java >=================================================================== >--- src/java/org/wyona/yanel/servlet/YanelServlet.java (revision 30347) >+++ src/java/org/wyona/yanel/servlet/YanelServlet.java (working copy) >@@ -1151,7 +1151,11 @@ > } else { > log.warn("Authentication was successful!"); > URL url = new URL(getRequestURLQS(request, null, false).toString()); >- url = new URL("https", url.getHost(), new Integer(sslPort).intValue(), url.getFile()); >+ if(sslPort != null){ >+ url = new URL("https", url.getHost(), new Integer(sslPort).intValue(), url.getFile()); >+ }else{ >+ // leave default >+ } > log.warn("Redirect to original request: " + url); > response.setHeader("Location", url.toString()); > // TODO: Yulup has a bug re TEMPORARY_REDIRECT > > >------------------------------------------------------------------------ > >_______________________________________________ >Yanel-development mailing list >Yanel-development@wyona.com >http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Wed Jan 16 18:00:52 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Wed Jan 16 18:01:32 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478DE2E2.9080400@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> Message-ID: <478E3844.4070802@optaros.com> I made a small patch for the GenericXMLResource. I hope this does not = brake much. What it allows to do is to refer to different documents = inside the XSLT. For instance: However, document('yanelresource:/....') does not work, either there is = an exception says that "Content is not allowed in prolog" or other = problems... WDYT? Josias Th=F6ny wrote: > Evaldas Taroza wrote: >> Ok, maybe I changed too much. What I need is to be able to serialize = >> XML resource into pure text. So I introduced TEXT in = >> SerializerFactory. If I use HTML serializer I get all the DTD stuff = >> prepended, which I don't want... > = > ok, I see. > Maybe we could add a property "omit-document-type" or something like = > that, as in the attached patch. > = > You could use it in the rc: > = > > yes > yes > > = > Would that solve your problem? I think this is a good idea to do that. Evaldas -- = +41 79 616 53 76 Optaros - www.optaros.com -------------- next part -------------- Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (revisio= n 30438) +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (working= copy) @@ -198,6 +198,7 @@ TransformerHandler[] xsltHandlers =3D new TransformerHandler[x= sltPaths.length]; for (int i =3D 0; i < xsltPaths.length; i++) { xsltHandlers[i] =3D tf.newTransformerHandler(new StreamSou= rce(repo.getNode(xsltPaths[i]).getInputStream())); + xsltHandlers[i].getTransformer().setURIResolver(new Source= Resolver(this)); passTransformerParameters(xsltHandlers[i].getTransformer()= ); } =20 From michael.wechner at wyona.com Thu Jan 17 00:35:56 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 17 00:35:51 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478DC876.4030001@optaros.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> Message-ID: <478E94DC.8040807@wyona.com> Evaldas Taroza wrote: > Michael Wechner wrote: > >> Evaldas Taroza wrote: >> >>> Hi everyone, >>> >>> I did a simple implementation for the logging in with an OpenID. >>> After applying the patch *joid.jar and tsik.jar* must be in the >>> dependencies. I believe these libraries should be put into Wyona's >>> Maven repository. >> >> >> >> are there no other public maven where these libs are being hosted >> (e.g. ibiblio, maven itself)? > > > I could not find them on the web. > I use joid.jar and tsik.jar as downloaded from SVN together with all > the sources. I guess you mean here http://joid.googlecode.com/svn/ but what about tsik.jar http://code.google.com/p/joids/issues/detail?id=1 ? I guess you got it from http://joid.googlecode.com/svn/trunk/lib/ right? But can one get the source of tsik.jar? resp. what is the license? > Official joid-1.0.2.jar as downloaded from the > http://code.google.com/p/joid/downloads/list does not include many > helper classes, e.g. OpenIDFilter > > So we could use those two jars with version 1.0.2-SVN, or something > like that. so you mean we should build our own lib based on the most recent SVN version, e.g. Revision 80? And we could call it within our maven dir something like joid-1.0.3-dev-r80.jar WDYT? Thanks Michi > >> >> If not, what versions are these libs (?), such that we can add a >> version to the Wyona maven repo >> >>> >>> There is several issues though: >>> 1. When someone logs in with an OpenID a respective user in Yanel is >>> created. It is not clear which policies this user should have nor to >>> which group it should belong... >> >> >> >> I would say none. Also I don't tunk such a user should be created by >> default, because it would mean a big security hole, but I understand >> it depends on the situation, e.g. >> >> - NO: http://www.wyona.com/ >> - YES: http://foaf.wyona.org/ > > > I agree this will depend on the application, because every realm can > have its own default policies > >> >> also how to configure the trusted openID providers. >> >> How can we make this configurable or moderateable? > > > Trusted providers can simply be a list of providers with an assigned > trust level. I would say that the domain of an OpenID can be assigned > default policies. E.g. *.myopenid.com - editor, *.aol.com - reader. > Managing by domain could also solve the problem of creating a user > inside Yanel, because the profile info is on the provider. > > >> >>> So now I preinsert openid-yanel users into some groups, e.g. I put >>> http---evaldas.taroza.myopenid.com into >>> ac-identities/groups/editor.xml and then when I log in with my >>> http://evaldas.taroza.myopenid.com I get the editor privileges. >>> (Note that I the Yanel user id is made out of OpenID by replacing >>> special characters, like , * : / & by a dash) >> >> >> >> I guess this would be custom and hence we need to provide a way that >> developers/integrators can change this. >> > > Yes, thats more like a workaround for testing, then a normal > implementation. > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Thu Jan 17 00:41:22 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 17 00:41:16 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478E94DC.8040807@wyona.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> Message-ID: <478E9622.8040601@wyona.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Michael Wechner wrote: >> >>> Evaldas Taroza wrote: >>> >>>> Hi everyone, >>>> >>>> I did a simple implementation for the logging in with an OpenID. >>>> After applying the patch *joid.jar and tsik.jar* must be in the >>>> dependencies. I believe these libraries should be put into Wyona's >>>> Maven repository. >>> >>> >>> >>> >>> are there no other public maven where these libs are being hosted >>> (e.g. ibiblio, maven itself)? >> >> >> >> I could not find them on the web. >> I use joid.jar and tsik.jar as downloaded from SVN together with all >> the sources. > > > > I guess you mean here > > http://joid.googlecode.com/svn/ > > but what about tsik.jar > > http://code.google.com/p/joids/issues/detail?id=1 > > ? > > I guess you got it from > > http://joid.googlecode.com/svn/trunk/lib/ > > right? > > But can one get the source of tsik.jar? resp. what is the license? I think I have found it http://svn.apache.org/repos/asf/incubator/tsik/trunk/ whereas it seems to be dormant http://incubator.apache.org/projects/tsik.html http://marc2.theaimsgroup.com/?t=114227803100006&r=1&w=2 but we might to build the jar from the SVN WDYT? Cheers Michi > >> Official joid-1.0.2.jar as downloaded from the >> http://code.google.com/p/joid/downloads/list does not include many >> helper classes, e.g. OpenIDFilter >> >> So we could use those two jars with version 1.0.2-SVN, or something >> like that. > > > > so you mean we should build our own lib based on the most recent SVN > version, e.g. Revision 80? > > And we could call it within our maven dir something like > joid-1.0.3-dev-r80.jar > > WDYT? > > Thanks > > Michi > >> >>> >>> If not, what versions are these libs (?), such that we can add a >>> version to the Wyona maven repo >>> >>>> >>>> There is several issues though: >>>> 1. When someone logs in with an OpenID a respective user in Yanel >>>> is created. It is not clear which policies this user should have >>>> nor to which group it should belong... >>> >>> >>> >>> >>> I would say none. Also I don't tunk such a user should be created by >>> default, because it would mean a big security hole, but I understand >>> it depends on the situation, e.g. >>> >>> - NO: http://www.wyona.com/ >>> - YES: http://foaf.wyona.org/ >> >> >> >> I agree this will depend on the application, because every realm can >> have its own default policies >> >>> >>> also how to configure the trusted openID providers. >>> >>> How can we make this configurable or moderateable? >> >> >> >> Trusted providers can simply be a list of providers with an assigned >> trust level. I would say that the domain of an OpenID can be assigned >> default policies. E.g. *.myopenid.com - editor, *.aol.com - reader. >> Managing by domain could also solve the problem of creating a user >> inside Yanel, because the profile info is on the provider. >> >> >>> >>>> So now I preinsert openid-yanel users into some groups, e.g. I put >>>> http---evaldas.taroza.myopenid.com into >>>> ac-identities/groups/editor.xml and then when I log in with my >>>> http://evaldas.taroza.myopenid.com I get the editor privileges. >>>> (Note that I the Yanel user id is made out of OpenID by replacing >>>> special characters, like , * : / & by a dash) >>> >>> >>> >>> >>> I guess this would be custom and hence we need to provide a way that >>> developers/integrators can change this. >>> >> >> Yes, thats more like a workaround for testing, then a normal >> implementation. >> >> Evaldas >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Thu Jan 17 08:53:50 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 17 08:54:30 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478E94DC.8040807@wyona.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> Message-ID: <478F098E.8030007@optaros.com> Michael Wechner wrote: >> >> I could not find them on the web. >> I use joid.jar and tsik.jar as downloaded from SVN together with all >> the sources. > > > I guess you mean here > > http://joid.googlecode.com/svn/ > > but what about tsik.jar > > http://code.google.com/p/joids/issues/detail?id=1 > > ? > > I guess you got it from > > http://joid.googlecode.com/svn/trunk/lib/ > > right? > > But can one get the source of tsik.jar? resp. what is the license? Yes, I got it from joid's svn. It is an apache project. > >> Official joid-1.0.2.jar as downloaded from the >> http://code.google.com/p/joid/downloads/list does not include many >> helper classes, e.g. OpenIDFilter >> >> So we could use those two jars with version 1.0.2-SVN, or something >> like that. > > > so you mean we should build our own lib based on the most recent SVN > version, e.g. Revision 80? > > And we could call it within our maven dir something like > joid-1.0.3-dev-r80.jar Yes. We may only want to exclude the examples package from the build. -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Thu Jan 17 12:59:23 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 17 12:59:13 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478F098E.8030007@optaros.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> <478F098E.8030007@optaros.com> Message-ID: <478F431B.9020807@wyona.com> Evaldas Taroza wrote: > > > Michael Wechner wrote: > >>> >>> I could not find them on the web. >>> I use joid.jar and tsik.jar as downloaded from SVN together with all >>> the sources. >> >> >> >> I guess you mean here >> >> http://joid.googlecode.com/svn/ >> >> but what about tsik.jar >> >> http://code.google.com/p/joids/issues/detail?id=1 >> >> ? >> >> I guess you got it from >> >> http://joid.googlecode.com/svn/trunk/lib/ >> >> right? >> >> But can one get the source of tsik.jar? resp. what is the license? > > > Yes, I got it from joid's svn. It is an apache project. > >> >>> Official joid-1.0.2.jar as downloaded from the >>> http://code.google.com/p/joid/downloads/list does not include many >>> helper classes, e.g. OpenIDFilter >>> >>> So we could use those two jars with version 1.0.2-SVN, or something >>> like that. >> >> >> >> so you mean we should build our own lib based on the most recent SVN >> version, e.g. Revision 80? >> >> And we could call it within our maven dir something like >> joid-1.0.3-dev-r80.jar > > > Yes. We may only want to exclude the examples package from the build. > I guess that makes sense :-) Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Thu Jan 17 14:21:31 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 17 14:22:07 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478E3844.4070802@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> <478E3844.4070802@optaros.com> Message-ID: <478F565B.7020805@optaros.com> Evaldas Taroza wrote: > I made a small patch for the GenericXMLResource. I hope this does not > brake much. What it allows to do is to refer to different documents > inside the XSLT. For instance: > > select="document('yanelrepo:/en/sitetree.xml')/y:sitetree/y:node"> > > > > > However, document('yanelresource:/....') does not work, either there is > an exception says that "Content is not allowed in prolog" or other > problems... Well Actually it works as well it's just that it drops the query part of the URL. Do you think it is reasonable that I can not pass the URL like: yanelrepo:/en/sitetree.xml?yanel.resource.viewid=myview I find it quite useful. Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From etaroza at optaros.com Thu Jan 17 15:50:03 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 17 15:50:39 2008 Subject: [Yanel-dev] MimeTypeUtil patch Message-ID: <478F6B1B.2070503@optaros.com> Hi, I made a small improvement for Wyona commons MimeTypeUtil patch, Do you = think it makes sense? For me it does:) Can someone commit it ASAP. = Hopefully it does not break anything. Evaldas -- = +41 79 616 53 76 Optaros - www.optaros.com -------------- next part -------------- Index: src/java/org/wyona/commons/io/MimeTypeUtil.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- src/java/org/wyona/commons/io/MimeTypeUtil.java (revision 30462) +++ src/java/org/wyona/commons/io/MimeTypeUtil.java (working copy) @@ -14,11 +14,10 @@ * @return true if mime-type is textual. */ public static boolean isTextual(String mimeType) { - if (mimeType.startsWith("text") = - || mimeType.equals("application/xml") - || mimeType.equals("application/xhtml+xml") + if (mimeType.startsWith("text/") = || mimeType.equals("application/x-javascript") - || mimeType.equals("application/javascript")) { + || mimeType.equals("application/javascript") + || mimeType.equals("application/json")) { return true; } else { return false; @@ -26,6 +25,20 @@ } = /** + * Indicates whether a mimet-ype represents an XML document + * @param mimeType + * @return true if mime-type is XML. + */ + public static boolean isXML(String mimeType) { + if (mimeType.equals("application/xml") + || mimeType.endsWith("+xml")) { + return true; + } else { + return false; + } + } + = + /** * Indicates whether a mime-type represents an document containing html * or xhtml. * @param mimeType From josias.thoeny at wyona.com Thu Jan 17 17:40:31 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Thu Jan 17 17:41:01 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478F565B.7020805@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> <478E3844.4070802@optaros.com> <478F565B.7020805@optaros.com> Message-ID: <478F84FF.60909@wyona.com> Evaldas Taroza wrote: > > Evaldas Taroza wrote: >> I made a small patch for the GenericXMLResource. I hope this does not >> brake much. What it allows to do is to refer to different documents >> inside the XSLT. For instance: >> >> > select="document('yanelrepo:/en/sitetree.xml')/y:sitetree/y:node"> >> >> >> >> >> However, document('yanelresource:/....') does not work, either there >> is an exception says that "Content is not allowed in prolog" or other >> problems... > > Well Actually it works as well it's just that it drops the query part of > the URL. Do you think it is reasonable that I can not pass the URL like: > > yanelrepo:/en/sitetree.xml?yanel.resource.viewid=myview The yanelrepo: protocol currently does not understand URL parameters, because the parameters don't have any meaning for the repository. It should work however with the yanelresource protocol. We are using xinclude with parameters, e.g.: If this doesn't work with document() it's a bug, but I have no idea what could cause this problem... josias > > I find it quite useful. > > Evaldas > -- Josias Th?ny Wyona - Open Source Content Management http://www.wyona.com From josias.thoeny at wyona.com Thu Jan 17 17:54:49 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Thu Jan 17 17:55:19 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478E3844.4070802@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> <478E3844.4070802@optaros.com> Message-ID: <478F8859.2090504@wyona.com> Evaldas Taroza wrote: > I made a small patch for the GenericXMLResource. I hope this does not > brake much. What it allows to do is to refer to different documents > inside the XSLT. For instance: > > select="document('yanelrepo:/en/sitetree.xml')/y:sitetree/y:node"> > > > I checked in your patch. Thank you very much. > > However, document('yanelresource:/....') does not work, either there is > an exception says that "Content is not allowed in prolog" or other > problems... Maybe it's including the XML prolog or the DTD? josias > > WDYT? > > Josias Th?ny wrote: >> Evaldas Taroza wrote: >>> Ok, maybe I changed too much. What I need is to be able to serialize >>> XML resource into pure text. So I introduced TEXT in >>> SerializerFactory. If I use HTML serializer I get all the DTD stuff >>> prepended, which I don't want... >> >> ok, I see. >> Maybe we could add a property "omit-document-type" or something like >> that, as in the attached patch. >> >> You could use it in the rc: >> >> >> yes >> yes >> >> >> Would that solve your problem? > > I think this is a good idea to do that. > > Evaldas > > > ------------------------------------------------------------------------ > > Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java > =================================================================== > --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (revision 30438) > +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java (working copy) > @@ -198,6 +198,7 @@ > TransformerHandler[] xsltHandlers = new TransformerHandler[xsltPaths.length]; > for (int i = 0; i < xsltPaths.length; i++) { > xsltHandlers[i] = tf.newTransformerHandler(new StreamSource(repo.getNode(xsltPaths[i]).getInputStream())); > + xsltHandlers[i].getTransformer().setURIResolver(new SourceResolver(this)); > passTransformerParameters(xsltHandlers[i].getTransformer()); > } > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Josias Th?ny Wyona - Open Source Content Management http://www.wyona.com From etaroza at optaros.com Thu Jan 17 18:01:22 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 17 18:01:58 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478F8859.2090504@wyona.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> <478E3844.4070802@optaros.com> <478F8859.2090504@wyona.com> Message-ID: <478F89E2.30103@optaros.com> I have the solution. Will send the patches later. Evaldas Josias Th?ny wrote: > Evaldas Taroza wrote: >> I made a small patch for the GenericXMLResource. I hope this does not >> brake much. What it allows to do is to refer to different documents >> inside the XSLT. For instance: >> >> > select="document('yanelrepo:/en/sitetree.xml')/y:sitetree/y:node"> >> >> >> > > I checked in your patch. Thank you very much. > >> >> However, document('yanelresource:/....') does not work, either there >> is an exception says that "Content is not allowed in prolog" or other >> problems... > > Maybe it's including the XML prolog or the DTD? > > josias > >> >> WDYT? >> >> Josias Th?ny wrote: >>> Evaldas Taroza wrote: >>>> Ok, maybe I changed too much. What I need is to be able to serialize >>>> XML resource into pure text. So I introduced TEXT in >>>> SerializerFactory. If I use HTML serializer I get all the DTD stuff >>>> prepended, which I don't want... >>> >>> ok, I see. >>> Maybe we could add a property "omit-document-type" or something like >>> that, as in the attached patch. >>> >>> You could use it in the rc: >>> >>> >>> yes >>> yes >>> >>> >>> Would that solve your problem? >> >> I think this is a good idea to do that. >> >> Evaldas >> >> >> ------------------------------------------------------------------------ >> >> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> =================================================================== >> --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> (revision 30438) >> +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> (working copy) >> @@ -198,6 +198,7 @@ >> TransformerHandler[] xsltHandlers = new >> TransformerHandler[xsltPaths.length]; >> for (int i = 0; i < xsltPaths.length; i++) { >> xsltHandlers[i] = tf.newTransformerHandler(new >> StreamSource(repo.getNode(xsltPaths[i]).getInputStream())); >> + xsltHandlers[i].getTransformer().setURIResolver(new >> SourceResolver(this)); >> >> passTransformerParameters(xsltHandlers[i].getTransformer()); >> } >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Yanel-development mailing list >> Yanel-development@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development > > -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Thu Jan 17 19:38:27 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 17 19:38:16 2008 Subject: [Yanel-dev] XML resource patch In-Reply-To: <478F89E2.30103@optaros.com> References: <478DC114.1080201@optaros.com> <478DD684.205@wyona.com> <478DD7F3.2020909@optaros.com> <478DE2E2.9080400@wyona.com> <478E3844.4070802@optaros.com> <478F8859.2090504@wyona.com> <478F89E2.30103@optaros.com> Message-ID: <478FA0A3.2000401@wyona.com> Evaldas Taroza wrote: > I have the solution. Will send the patches later. great, because I have similar problems pulling in RDF/FOAF data from remote Looking forward to your patches :-) Thanks Michi > > Evaldas > > Josias Th?ny wrote: > >> Evaldas Taroza wrote: >> >>> I made a small patch for the GenericXMLResource. I hope this does >>> not brake much. What it allows to do is to refer to different >>> documents inside the XSLT. For instance: >>> >>> >> select="document('yanelrepo:/en/sitetree.xml')/y:sitetree/y:node"> >>> >>> >>> >> >> >> I checked in your patch. Thank you very much. >> >>> >>> However, document('yanelresource:/....') does not work, either there >>> is an exception says that "Content is not allowed in prolog" or >>> other problems... >> >> >> Maybe it's including the XML prolog or the DTD? >> >> josias >> >>> >>> WDYT? >>> >>> Josias Th?ny wrote: >>> >>>> Evaldas Taroza wrote: >>>> >>>>> Ok, maybe I changed too much. What I need is to be able to >>>>> serialize XML resource into pure text. So I introduced TEXT in >>>>> SerializerFactory. If I use HTML serializer I get all the DTD >>>>> stuff prepended, which I don't want... >>>> >>>> >>>> ok, I see. >>>> Maybe we could add a property "omit-document-type" or something >>>> like that, as in the attached patch. >>>> >>>> You could use it in the rc: >>>> >>>> >>>> yes >>>> yes >>>> >>>> >>>> Would that solve your problem? >>> >>> >>> I think this is a good idea to do that. >>> >>> Evaldas >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> =================================================================== >>> --- >>> impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> (revision 30438) >>> +++ >>> impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> (working copy) >>> @@ -198,6 +198,7 @@ >>> TransformerHandler[] xsltHandlers = new >>> TransformerHandler[xsltPaths.length]; >>> for (int i = 0; i < xsltPaths.length; i++) { >>> xsltHandlers[i] = tf.newTransformerHandler(new >>> StreamSource(repo.getNode(xsltPaths[i]).getInputStream())); >>> + xsltHandlers[i].getTransformer().setURIResolver(new >>> SourceResolver(this)); >>> >>> passTransformerParameters(xsltHandlers[i].getTransformer()); >>> } >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> _______________________________________________ >>> Yanel-development mailing list >>> Yanel-development@wyona.com >>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development >> >> >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Fri Jan 18 09:03:02 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 18 09:03:38 2008 Subject: [Yanel-dev] SerializerFactory and ResourceResolver patch Message-ID: <47905D36.6090903@optaros.com> I added TEXT serializer, it will use the internal Xalan text serializer. I added Constants class, where I suggest to put all the constants, in = order to minimize hardcoded values in Yanel. Modified ResourceResovler. The problem was that such request didn't work = properly: yanelresource:/en/sitetree.xml?yanel.resource.viewid=3Dmyview The problem was, that even though the parameters were passed to the = resolved resource, the view was not detected, so Resource.getView(null) = would be called instead of Resource.getView("myview"). Evaldas -- = +41 79 616 53 76 Optaros - www.optaros.com -------------- next part -------------- Index: java/org/wyona/yanel/core/Constants.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/org/wyona/yanel/core/Constants.java (revision 0) +++ java/org/wyona/yanel/core/Constants.java (revision 0) @@ -0,0 +1,25 @@ +package org.wyona.yanel.core; + + +public abstract class Constants { + /** + * General parameters and values for passing requests to Yanel (e.g. h= ttp://.../yanel/resource.xml?param=3Dvalue) = + * */ + public static interface Request{ + /** + * Controls which view a viewable resource should choose + * */ + public static final String YANEL_RESOURCE_VIEWID =3D "yanel.resour= ce.viewid"; + /** + * The value for the default view + * */ + public static final String DEFAULT_VIEW_ID =3D "default"; + = + /** + * The value for the source view + * */ + public static final String SOURCE_VIEW_ID =3D "source"; + } + = + private Constants(){}; +} Property changes on: java\org\wyona\yanel\core\Constants.java ___________________________________________________________________ Name: svn:eol-style + LF Index: java/org/wyona/yanel/core/serialization/SerializerFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/org/wyona/yanel/core/serialization/SerializerFactory.java (revisio= n 30347) +++ java/org/wyona/yanel/core/serialization/SerializerFactory.java (working= copy) @@ -2,66 +2,84 @@ = import java.util.Properties; import org.apache.log4j.Category; +import org.apache.log4j.Logger; +import org.apache.xml.serializer.Method; import org.apache.xml.serializer.OutputPropertiesFactory; import org.apache.xml.serializer.Serializer; +import org.apache.xml.serializer.ToTextStream; = /** * Factory to create serializers. = - * Currently only supports html serializers. */ public class SerializerFactory { = - private static Category log =3D Category.getInstance(SerializerFactory= .class); + private static Logger log =3D Logger.getLogger(SerializerFactory.class= ); = public static final int XHTML_STRICT =3D 1; public static final int HTML_TRANSITIONAL =3D 2; public static final int XML =3D 3; + public static final int TEXT =3D 4; = public static final String XHTML_STRICT_KEY =3D "XHTML_STRICT"; public static final String HTML_TRANSITIONAL_KEY =3D "HTML_TRANSITIONA= L"; public static final String XML_KEY =3D "XML"; + public static final String TEXT_KEY =3D "TEXT"; = + /** + * @return HTML serializer with the format specified + * */ public static Serializer getSerializer(Properties format) { Serializer serializer =3D new HTMLSerializer(); serializer.setOutputFormat(format); return serializer; } = + /** + * Get serializer by a given key. Will return TEXT serializer when the= key is not recognized. + * */ public static Serializer getSerializer(String key) { if (key.equals(XHTML_STRICT_KEY)) { return getSerializer(XHTML_STRICT); } else if (key.equals(HTML_TRANSITIONAL_KEY)) { return getSerializer(HTML_TRANSITIONAL); - } if (key.equals(XML_KEY)) { + } else if (key.equals(XML_KEY)) { return getSerializer(XML); + } else if (key.equals(TEXT_KEY)) { + return getSerializer(TEXT); } - return null; + return getSerializer(TEXT); } = + /** + * Get serializer by a given key. Will return TEXT serializer when the= key is not recognized. + * */ public static Serializer getSerializer(int key) { Serializer serializer =3D null; if (key =3D=3D XHTML_STRICT) { serializer =3D new HTMLSerializer(); - Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties("html"); + Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties(Method.XHTML); format.setProperty("indent", "yes"); format.setProperty("doctype-public", "-//W3C//DTD XHTML 1.0 St= rict//EN"); format.setProperty("doctype-system", "http://www.w3.org/TR/xht= ml1/DTD/xhtml1-strict.dtd"); serializer.setOutputFormat(format); - } - if (key =3D=3D HTML_TRANSITIONAL) { + }else if (key =3D=3D HTML_TRANSITIONAL) { serializer =3D new HTMLSerializer(); - Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties("html"); + Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties(Method.HTML); format.setProperty("indent", "yes"); format.setProperty("omit-xml-declaration", "yes"); format.setProperty("doctype-public", "-//W3C//DTD HTML 4.01 Tr= ansitional//EN"); format.setProperty("doctype-system", "http://www.w3.org/TR/htm= l4/loose.dtd"); serializer.setOutputFormat(format); - } - if (key =3D=3D XML) { + }else if (key =3D=3D XML) { serializer =3D new XMLSerializer(); - Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties("xml"); + Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties(Method.XML); format.setProperty("indent", "yes"); serializer.setOutputFormat(format); + } else { + // Internal Xalan serializer + Properties format =3D OutputPropertiesFactory.getDefaultMethod= Properties(Method.TEXT); + serializer =3D new ToTextStream(); + serializer.setOutputFormat(format); } return serializer; } Index: java/org/wyona/yanel/core/source/ResourceResolver.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/org/wyona/yanel/core/source/ResourceResolver.java (revision 30347) +++ java/org/wyona/yanel/core/source/ResourceResolver.java (working copy) @@ -3,6 +3,7 @@ import java.util.HashMap; = import org.apache.log4j.Category; +import org.wyona.yanel.core.Constants; import org.wyona.yanel.core.Path; import org.wyona.yanel.core.Resource; import org.wyona.yanel.core.ResourceManager; @@ -58,15 +59,19 @@ Resource targetResource =3D manager.getResource(resource.getEn= vironment(), = resource.getRealm(), uri); targetResource.setParameters(parameters); + = + // Check which if there is a view requested for the resource + String viewid =3D String.valueOf(parameters.get(Constants.Requ= est.YANEL_RESOURCE_VIEWID)); + = if (ResourceAttributeHelper.hasAttributeImplemented(targetReso= urce, "Viewable", "1")) { String viewV1path =3D resource.getRealm().getMountPoint() = + uri.substring(1); if (log.isDebugEnabled()) { log.debug("including document: " + viewV1path); } - View view =3D ((ViewableV1) targetResource).getView(new Pa= th(viewV1path), null); + View view =3D ((ViewableV1) targetResource).getView(new Pa= th(viewV1path), viewid); return new StreamSource(view.getInputStream()); } else if (ResourceAttributeHelper.hasAttributeImplemented(tar= getResource, "Viewable", "2")) { - View view =3D ((ViewableV2) targetResource).getView(null); + View view =3D ((ViewableV2) targetResource).getView(viewid= ); if (!view.isResponse()) { throw new Exception("Reading from the response has not= been implemented yet!"); } else { From etaroza at optaros.com Fri Jan 18 10:19:13 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 18 10:19:45 2008 Subject: [Yanel-dev] XPath functions in XSLT Message-ID: <47906F11.2020605@optaros.com> Hi everyone, I recently found out that simple XPath functions, like fn:replace(string, string, string), or escape(uri, boolean) don't work in XSLTs I create in Yanel. I assume that Yanel does not support the newest XSLT, XPath versions. What to do? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Fri Jan 18 10:43:59 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 18 10:43:45 2008 Subject: [Yanel-dev] XPath functions in XSLT In-Reply-To: <47906F11.2020605@optaros.com> References: <47906F11.2020605@optaros.com> Message-ID: <479074DF.6040908@wyona.com> Evaldas Taroza wrote: > Hi everyone, > I recently found out that simple XPath functions, like > fn:replace(string, string, string), or escape(uri, boolean) don't work > in XSLTs I create in Yanel. > > I assume that Yanel does not support the newest XSLT, XPath versions. > What to do? I guess this depends on the xalan lib. Give it a try with a different resp. newer xalan lib or some other XSLT lib and if it's working with this, then submit a patch for the dependencies ;-) Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Fri Jan 18 11:18:46 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 18 11:19:16 2008 Subject: [Yanel-dev] XPath functions in XSLT In-Reply-To: <479074DF.6040908@wyona.com> References: <47906F11.2020605@optaros.com> <479074DF.6040908@wyona.com> Message-ID: <47907D06.2010101@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Hi everyone, >> I recently found out that simple XPath functions, like >> fn:replace(string, string, string), or escape(uri, boolean) don't work >> in XSLTs I create in Yanel. >> >> I assume that Yanel does not support the newest XSLT, XPath versions. >> What to do? > > > I guess this depends on the xalan lib. Give it a try with a different > resp. newer xalan lib or some other XSLT lib and if it's working with > this, then submit a patch for the dependencies ;-) Indeed Xalan implements XSLT 1.0 (relies on XPath 1.0), but XSLT 2.0 (relies on XPath 2.0) is already a recomendation and the only library that implements it I could find was SAXON (Mozilla licence). Do you think replacing Xalan with Saxon won't brake Yanel? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Fri Jan 18 11:58:27 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 18 11:58:10 2008 Subject: [Yanel-dev] XPath functions in XSLT In-Reply-To: <47907D06.2010101@optaros.com> References: <47906F11.2020605@optaros.com> <479074DF.6040908@wyona.com> <47907D06.2010101@optaros.com> Message-ID: <47908653.30506@wyona.com> Evaldas Taroza wrote: > Michael Wechner wrote: > >> Evaldas Taroza wrote: >> >>> Hi everyone, >>> I recently found out that simple XPath functions, like >>> fn:replace(string, string, string), or escape(uri, boolean) don't >>> work in XSLTs I create in Yanel. >>> >>> I assume that Yanel does not support the newest XSLT, XPath >>> versions. What to do? >> >> >> >> I guess this depends on the xalan lib. Give it a try with a different >> resp. newer xalan lib or some other XSLT lib and if it's working with >> this, then submit a patch for the dependencies ;-) > > > Indeed Xalan implements XSLT 1.0 (relies on XPath 1.0), but XSLT 2.0 > (relies on XPath 2.0) is already a recomendation and the only library > that implements it I could find was SAXON (Mozilla licence). > > Do you think replacing Xalan with Saxon won't brake Yanel? maybe ;-) I would say give it a try locally, let's run some tests with various realms and if nothing seems to break, then let's switch dependencies, but keep the old config commented, announce to the mailing list the change, give it some time, and if nobody complains, then start to rely on ;-) WDYT? Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From josias.thoeny at wyona.com Fri Jan 18 17:54:35 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Fri Jan 18 17:53:45 2008 Subject: [Yanel-dev] SerializerFactory and ResourceResolver patch In-Reply-To: <47905D36.6090903@optaros.com> References: <47905D36.6090903@optaros.com> Message-ID: <4790D9CB.4080104@wyona.com> Evaldas Taroza wrote: > I added TEXT serializer, it will use the internal Xalan text serializer. > > I added Constants class, where I suggest to put all the constants, in > order to minimize hardcoded values in Yanel. > > Modified ResourceResovler. The problem was that such request didn't work > properly: > yanelresource:/en/sitetree.xml?yanel.resource.viewid=myview > The problem was, that even though the parameters were passed to the > resolved resource, the view was not detected, so Resource.getView(null) > would be called instead of Resource.getView("myview"). Your patch is now checked in. Thanks a lot. I made one minor modification: I don't use String.valueOf(...) in ResourceResolver, because it seems to return the string "null" if the parameter viewid does not exist. josias > > Evaldas > > > ------------------------------------------------------------------------ > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development From etaroza at optaros.com Fri Jan 18 18:39:47 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 18 18:40:18 2008 Subject: [Yanel-dev] BasicXMLResource patch Message-ID: <4790E463.2030905@optaros.com> Hi, I tried to beautify the BasicXMLResource class, because I think it is = one of the most important ones. This patch depends on MimeTypeUtil patch that I sent earlier. Evaldas -- = +41 79 616 53 76 Optaros - www.optaros.com -------------- next part -------------- Index: java/org/wyona/yanel/impl/resources/BasicXMLResource.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- java/org/wyona/yanel/impl/resources/BasicXMLResource.java (revision 304= 67) +++ java/org/wyona/yanel/impl/resources/BasicXMLResource.java (working copy) @@ -21,6 +21,8 @@ import java.io.InputStream; import java.util.Enumeration; import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; import java.util.Properties; = import javax.xml.transform.Transformer; @@ -37,6 +39,7 @@ import org.apache.xml.resolver.tools.CatalogResolver; import org.apache.xml.serializer.Serializer; import org.w3c.dom.Document; +import org.wyona.commons.io.MimeTypeUtil; import org.wyona.security.core.api.Identity; import org.wyona.yanel.core.Resource; import org.wyona.yanel.core.api.attributes.ViewableV2; @@ -64,10 +67,6 @@ protected static String DEFAULT_VIEW_ID =3D "default"; protected static String SOURCE_VIEW_ID =3D "source"; = - protected static String SERIALIZER_OMIT_XML_DECLARATION =3D "serialize= r-omit-xml-declaration"; - protected static String SERIALIZER_DOCTYPE_PUBLIC =3D "serializer-doct= ype-public"; - protected static String SERIALIZER_DOCTYPE_SYSTEM =3D "serializer-doct= ype-system"; - protected HashMap viewDescriptors; = public ViewDescriptor getViewDescriptor(String viewId) { @@ -195,10 +194,13 @@ if (xsltPaths =3D=3D null || xsltPaths.length =3D=3D 0) { xsltPaths =3D getXSLTPath(getPath()); } + = + SourceResolver uriResolver =3D new SourceResolver(this); + = TransformerHandler[] xsltHandlers =3D new TransformerHandler[x= sltPaths.length]; for (int i =3D 0; i < xsltPaths.length; i++) { xsltHandlers[i] =3D tf.newTransformerHandler(new StreamSou= rce(repo.getNode(xsltPaths[i]).getInputStream())); - xsltHandlers[i].getTransformer().setURIResolver(new Source= Resolver(this)); + xsltHandlers[i].getTransformer().setURIResolver(uriResolve= r); passTransformerParameters(xsltHandlers[i].getTransformer()= ); } = @@ -208,8 +210,7 @@ = // create xinclude transformer: XIncludeTransformer xIncludeTransformer =3D new XIncludeTransf= ormer(); - SourceResolver resolver =3D new SourceResolver(this); - xIncludeTransformer.setResolver(resolver); + xIncludeTransformer.setResolver(uriResolver); = // create serializer: Serializer serializer =3D createSerializer(viewDescriptor); @@ -260,12 +261,17 @@ } else { String mimeType =3D getMimeType(viewDescriptor.getId()); = - if (mimeType.equals("text/html")) { + if (MimeTypeUtil.isHTML(mimeType) && !MimeTypeUtil.isXML(mimeT= ype)) { serializer =3D SerializerFactory.getSerializer(SerializerF= actory.HTML_TRANSITIONAL); - } else if (mimeType.equals("application/xml")) { + } else if (MimeTypeUtil.isXML(mimeType)) { serializer =3D SerializerFactory.getSerializer(SerializerF= actory.XML); - } else { + } else if (MimeTypeUtil.isTextual(mimeType)) { + serializer =3D SerializerFactory.getSerializer(SerializerF= actory.TEXT); + }else if (MimeTypeUtil.isHTML(mimeType) && MimeTypeUtil.isXML(= mimeType)){ serializer =3D SerializerFactory.getSerializer(SerializerF= actory.XHTML_STRICT); + }else{ + // For backwards compatibility leave XHTML as default + serializer =3D SerializerFactory.getSerializer(SerializerF= actory.XHTML_STRICT); } } // allow to override xml declaration and doctype: @@ -302,6 +308,31 @@ * @throws Exception */ protected void passTransformerParameters(Transformer transformer) thro= ws Exception { + // Attach all paramters that came with the request. Templates can = make use of them. + // NOTE: all parameter values will be of type String. In XSLT: + for (Iterator i =3D getParameters().entrySet().iterator(); i.hasNe= xt();) { + Map.Entry entry =3D (Map.Entry) i.next(); + if (entry.getValue() instanceof String) { + String value =3D (String) entry.getValue(); + transformer.setParameter(String.valueOf(entry.getKey()), v= alue); + }else if(entry.getValue() instanceof String[]){ + // values separated by a space + String separator =3D " "; + = + StringBuffer finalValue =3D new StringBuffer(); + String [] values =3D (String[]) entry.getValue(); + for (int j =3D 0; j < values.length; j++) { + finalValue.append(values[j]); + if(j + 1 !=3D values.length){ + finalValue.append(separator); + } + } + }else{ + // Never happens + } + } + = + // Set general parameters transformer.setParameter("yanel.path.name", PathUtil.getName(getPa= th())); transformer.setParameter("yanel.path", getPath()); transformer.setParameter("yanel.back2context", PathUtil.backToCont= ext(realm, getPath())); @@ -390,4 +421,4 @@ return new String[0]; } = -} +} \ No newline at end of file From michael.wechner at wyona.com Fri Jan 18 22:05:37 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 18 22:05:17 2008 Subject: [Yanel-dev] XML namespace problem with Java 1.4 whereas it works with Java 1.5 Message-ID: <479114A1.7050101@wyona.com> Hi I have this strange problem, that when generating an XML with dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); // create a new XML document for the content Document doc = db.newDocument(); Element root = doc.createElementNS(NAMESPACE, "content"); doc.appendChild(root); and serialize it then the namespace won't be part of it when using Java 1.4 resp. it works with Java 1.5 Can anyone reproduce this problem resp. any idea why this is happening? Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sat Jan 19 10:12:01 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sat Jan 19 10:11:39 2008 Subject: [Yanel-dev] XHTML title of wiki resource type Message-ID: <4791BEE1.9020606@wyona.com> Hi The following page http://yanel.wyona.org/en/governance.html is based on the wiki resource type and because of that the XHTML title is kind of useless. My question is how should we map a wiki entry to the XHTML title? Or should we rather use meta data for this and introduce an API? AFAIK we do not have an API for meta data yet, right? Neither custom or Dublin Core ... Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 20 12:33:45 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 20 12:33:18 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <478F098E.8030007@optaros.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> <478F098E.8030007@optaros.com> Message-ID: <47933199.7090308@wyona.com> btw, it seems to me that joid only works with Java 1.5 Can you confirm this? If so we need to "downgrade" the source of joid, because Yanel also supports Java 1.4 Cheers Michi Evaldas Taroza wrote: > > > Michael Wechner wrote: > >>> >>> I could not find them on the web. >>> I use joid.jar and tsik.jar as downloaded from SVN together with all >>> the sources. >> >> >> >> I guess you mean here >> >> http://joid.googlecode.com/svn/ >> >> but what about tsik.jar >> >> http://code.google.com/p/joids/issues/detail?id=1 >> >> ? >> >> I guess you got it from >> >> http://joid.googlecode.com/svn/trunk/lib/ >> >> right? >> >> But can one get the source of tsik.jar? resp. what is the license? > > > Yes, I got it from joid's svn. It is an apache project. > >> >>> Official joid-1.0.2.jar as downloaded from the >>> http://code.google.com/p/joid/downloads/list does not include many >>> helper classes, e.g. OpenIDFilter >>> >>> So we could use those two jars with version 1.0.2-SVN, or something >>> like that. >> >> >> >> so you mean we should build our own lib based on the most recent SVN >> version, e.g. Revision 80? >> >> And we could call it within our maven dir something like >> joid-1.0.3-dev-r80.jar > > > Yes. We may only want to exclude the examples package from the build. > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Sun Jan 20 19:53:23 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Sun Jan 20 19:53:43 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <47933199.7090308@wyona.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> <478F098E.8030007@optaros.com> <47933199.7090308@wyona.com> Message-ID: <479398A3.7070500@optaros.com> Michael Wechner wrote: > btw, it seems to me that joid only works with Java 1.5 > > Can you confirm this? If so we need to "downgrade" the source of joid, > because Yanel also supports Java 1.4 I compiled joid with JDK 1.4. Also http://code.google.com/p/joid/wiki/Introduction says that joid is 1.4 compatible. Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Sun Jan 20 22:59:31 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 20 22:58:55 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <479398A3.7070500@optaros.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> <478F098E.8030007@optaros.com> <47933199.7090308@wyona.com> <479398A3.7070500@optaros.com> Message-ID: <4793C443.4040208@wyona.com> Evaldas Taroza wrote: > Michael Wechner wrote: > >> btw, it seems to me that joid only works with Java 1.5 >> >> Can you confirm this? If so we need to "downgrade" the source of >> joid, because Yanel also supports Java 1.4 > > > I compiled joid with JDK 1.4. well, I receive the following errors compile: [javac] Compiling 45 source files to /home/michi/src/openid/joid-trunk/classes/core [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/util/UrlUtils.java:21: cannot resolve symbol [javac] symbol : class StringBuilder [javac] location: class org.verisign.joid.util.UrlUtils [javac] public static StringBuilder getServletUrl(HttpServletRequest request) [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/CheckAuthenticationResponse.java:58: cannot resolve symbol [javac] symbol : method parseBoolean (java.lang.String) [javac] location: class java.lang.Boolean [javac] isValid = Boolean.parseBoolean(value); [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/consumer/Discoverer.java:39: cannot resolve symbol [javac] symbol : method contains (java.lang.String) [javac] location: class java.lang.String [javac] if(str.contains("")){ [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/consumer/OpenIdFilter.java:48: cannot resolve symbol [javac] symbol : method parseBoolean (java.lang.String) [javac] location: class java.lang.Boolean [javac] saveIdentityUrlAsCookie = Boolean.parseBoolean(saveInCookie); [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/util/UrlUtils.java:13: cannot resolve symbol [javac] symbol : class StringBuilder [javac] location: class org.verisign.joid.util.UrlUtils [javac] StringBuilder b = getServletUrl(request); [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/util/UrlUtils.java:23: cannot resolve symbol [javac] symbol : class StringBuilder [javac] location: class org.verisign.joid.util.UrlUtils [javac] StringBuilder b = new StringBuilder(getBaseUrl(request)); [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/util/UrlUtils.java:23: cannot resolve symbol [javac] symbol : class StringBuilder [javac] location: class org.verisign.joid.util.UrlUtils [javac] StringBuilder b = new StringBuilder(getBaseUrl(request)); [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/util/UrlUtils.java:38: cannot resolve symbol [javac] symbol : class StringBuilder [javac] location: class org.verisign.joid.util.UrlUtils [javac] StringBuilder b = new StringBuilder(); [javac] ^ [javac] /home/michi/src/openid/joid-trunk/src/org/verisign/joid/util/UrlUtils.java:38: cannot resolve symbol [javac] symbol : class StringBuilder [javac] location: class org.verisign.joid.util.UrlUtils [javac] StringBuilder b = new StringBuilder(); [javac] ^ [javac] 9 errors BUILD FAILED /home/michi/src/openid/joid-trunk/build.xml:61: Compile failed; see the compiler error output for details. which seems to me a Java 1.5 class http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html > Also http://code.google.com/p/joid/wiki/Introduction > > says that joid is 1.4 compatible. I guess the wiki page is outdated ... Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 21 00:04:49 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 21 00:04:13 2008 Subject: [Yanel-dev] OpenID patch In-Reply-To: <4793C443.4040208@wyona.com> References: <478CDB19.9070100@optaros.com> <478DC120.3000808@wyona.com> <478DC876.4030001@optaros.com> <478E94DC.8040807@wyona.com> <478F098E.8030007@optaros.com> <47933199.7090308@wyona.com> <479398A3.7070500@optaros.com> <4793C443.4040208@wyona.com> Message-ID: <4793D391.9060105@wyona.com> Michael Wechner wrote: > > > which seems to me a Java 1.5 class > > http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html btw, Travis Reeder just fixed this http://groups.google.com/group/joid-dev/browse_thread/thread/8ff378009750032e/496151d8c0d0e755#496151d8c0d0e755 whereas there seem to be more 1.4 issues Cheers Michi > >> Also http://code.google.com/p/joid/wiki/Introduction >> >> says that joid is 1.4 compatible. > > > > I guess the wiki page is outdated ... > > Cheers > > Michi > >> >> Evaldas >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Thu Jan 24 12:01:22 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 24 12:00:19 2008 Subject: [Yanel-dev] Namespace Workaround Message-ID: <47987002.6000601@wyona.com> Hi It seems that with Java 1.4 the serializer has a namespace problem, whereas this doesn't appear with Java 1.5. One can do the following workaround when creating a DOM document or rather a root Element with a namespace: Element rootElement = doc.createElementNS(NAMESPACE, "my-root-element"); //Workaround for serializer bug root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", NAMESPACE); doc.appendChild(root); The important thing is that a namespace is not only assigned to a document or rather an element, but also that such a namespace attribute is being set. It seems like Java 1.5 is doing this automagically. Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Thu Jan 24 14:52:27 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Thu Jan 24 14:52:35 2008 Subject: [Yanel-dev] Modifiable resource type Message-ID: <4798981B.8050905@optaros.com> Modifiable has a method delete(). It does not make much sense, does it? Maybe it is a good idea to introduce a Deletable interface? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Fri Jan 25 11:15:01 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 25 11:13:56 2008 Subject: [Yanel-dev] Modifiable resource type In-Reply-To: <4798981B.8050905@optaros.com> References: <4798981B.8050905@optaros.com> Message-ID: <4799B6A5.9040304@wyona.com> Evaldas Taroza wrote: > Modifiable has a method delete(). It does not make much sense, does it? I don't remember why we did it this way. Does anyone else remember? > Maybe it is a good idea to introduce a Deletable interface? makes sense to me, then we would have CRUD covered (Creatable, Viewable, Modifiable, Deletable) WDOT? Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Fri Jan 25 17:44:12 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 25 17:44:23 2008 Subject: [Yanel-dev] architecture burdens Message-ID: <479A11DC.3080803@optaros.com> Hi, I have some doubts about the usefulness/usage of all the *.attributes.* interfaces. I understand that they are supposed to allow the resources to be as generic as possible. However, when I am doing something I usually need very specific things to do, i.e. viewable resource must only be viewed, modifieable only updated, deletable only deleted, etc. Now, when I implement ModifiableV2, I have to implement some weired methods, when the only useful is delete(); when I implement CreatableV2, I have to implement many methods, although I need only create()... So far, for Viewable resources I find BasicXMLResource most useful. It allows to switch views, apply stylesheets etc. In other words it gives a resource a polymorphic view, that's I think is general enough and quite nice. MofifiableV2 seems to be good only because it has delete(). So as I earlier suggested, it should make sense to have Deletable interface. To make 'modifiable' action as generic as possible it should be possible to do that through properties. CreatableV2 I don't understand at all. To my mind it should only have create() method, and as with 'modifiable' generic part is done through prescribed properties. Hence I say that Modifiable, Creatable, Viewable, Deletable are good, but should only have modify(), create(), getView(), delete() methods. These methods would behave differently with respect to what properties are set for the Resource. Therefore all these interfaces could implement HasProperties interface which would provide property names and values. Implementations would make a good use of those properties as well as clients would do. (All this sounds like JCR ...). Now I find the best practice for CRUD as follows: C: not sure it should be easy with Creatable but looks like its even easier with usecases R: have a resource type extending BasicXMLResource U: have a resource type extending ExecutableUsecaseResource D: have a resource type extending ExecutableUsecaseResource But if my best practice for CRUD is as listed above, then where is the power of Yanel? It looks like all the content management projects for every Web site will have to be heavily custom, and therefore I am not even sure if it is easier to implement them using Yanel, or simply with JSPs, XSLTs and Jelly. Generally speaking, I think that the whole architecture of Yanel should be revised and cleaned-up. Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Fri Jan 25 21:16:32 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 25 21:15:22 2008 Subject: [Yanel-dev] architecture burdens In-Reply-To: <479A11DC.3080803@optaros.com> References: <479A11DC.3080803@optaros.com> Message-ID: <479A43A0.2000101@wyona.com> Evaldas Taroza wrote: > Hi, > > I have some doubts about the usefulness/usage of all the > *.attributes.* interfaces. I understand that they are supposed to > allow the resources to be as generic as possible. However, when I am > doing something I usually need very specific things to do, i.e. > viewable resource must only be viewed, modifieable only updated, > deletable only deleted, etc. > > Now, when I implement ModifiableV2, I have to implement some weired > methods, when the only useful is delete(); when I implement > CreatableV2, I have to implement many methods, although I need only > create()... > > So far, for Viewable resources I find BasicXMLResource most useful. It > allows to switch views, apply stylesheets etc. In other words it gives > a resource a polymorphic view, that's I think is general enough and > quite nice. > > MofifiableV2 seems to be good only because it has delete(). So as I > earlier suggested, it should make sense to have Deletable interface. > To make 'modifiable' action as generic as possible it should be > possible to do that through properties. > > CreatableV2 I don't understand at all. To my mind it should only have > create() method, and as with 'modifiable' generic part is done through > prescribed properties. > > Hence I say that Modifiable, Creatable, Viewable, Deletable are good, > but should only have modify(), create(), getView(), delete() methods. > These methods would behave differently with respect to what properties > are set for the Resource. Therefore all these interfaces could > implement HasProperties interface which would provide property names > and values. Implementations would make a good use of those properties > as well as clients would do. (All this sounds like JCR ...). > > Now I find the best practice for CRUD as follows: > C: not sure it should be easy with Creatable but looks like its even > easier with usecases > R: have a resource type extending BasicXMLResource > U: have a resource type extending ExecutableUsecaseResource > D: have a resource type extending ExecutableUsecaseResource > > But if my best practice for CRUD is as listed above, then where is the > power of Yanel? well, it's about integration with all kind of other applications and data repositories. I think I understand what you are saying and very much appreciate your directness and speaking out what you think, but I would argue if you see other usecases (and content management is not just about "simple" websites), then you might change your mind ;-) Your feedback is also very much appreciated, because it shows once more that we have to document all the stuff we did so far and why we did it this way. So I think before we get into a lengthy discussion, we first should document and then discuss if it makes sense or not, because I believe strongly that it makes sense of course :-) So I would suggest that I/we will try to document all the points which you are pointing to as quickly as possible and then we go through them within separate emails. > It looks like all the content management projects for every Web site > will have to be heavily custom, no,no,no ;-) Yanel is currently a Content Management Framework and the goal is to add on top of this CMF a CMSystem such that one can easily build stuff very quickly. I would say the BasicXMLResource is one big step into this direction, but there are others well, you might haven't discovered them yet ;-) (again because of lack of documentation) Think of Java itself. It's very generic, but tells you to use classes, inheritance, interfaces, etc. So Yanel tells you how to build content management applications ... I hope you understand what I am trying to say > and therefore I am not even sure if it is easier to implement them > using Yanel, or simply with JSPs, XSLTs and Jelly. > > Generally speaking, I think that the whole architecture of Yanel > should be revised and cleaned-up. shoud be documented ;-) Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Fri Jan 25 22:19:41 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Fri Jan 25 22:19:45 2008 Subject: [Yanel-dev] architecture burdens In-Reply-To: <479A43A0.2000101@wyona.com> References: <479A11DC.3080803@optaros.com> <479A43A0.2000101@wyona.com> Message-ID: <479A526D.1070101@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: >> It looks like all the content management projects for every Web site >> will have to be heavily custom, > > > no,no,no ;-) Yanel is currently a Content Management Framework and the > goal is to add on top of this CMF a CMSystem such that one can easily > build stuff very quickly. I would say the BasicXMLResource is one big > step into this direction, but there are others well, you might haven't > discovered them yet ;-) (again because of lack of documentation) > > Think of Java itself. It's very generic, but tells you to use classes, > inheritance, interfaces, etc. > > So Yanel tells you how to build content management applications ... > > I hope you understand what I am trying to say This sounds great. I hope that Yanel finally is not that complex as I have experienced by now. Evaldas > >> and therefore I am not even sure if it is easier to implement them >> using Yanel, or simply with JSPs, XSLTs and Jelly. >> >> Generally speaking, I think that the whole architecture of Yanel >> should be revised and cleaned-up. > > > shoud be documented ;-) > > Cheers > > Michi > >> >> Evaldas >> > > -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Fri Jan 25 22:35:31 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Fri Jan 25 22:34:18 2008 Subject: [Yanel-dev] architecture burdens In-Reply-To: <479A526D.1070101@optaros.com> References: <479A11DC.3080803@optaros.com> <479A43A0.2000101@wyona.com> <479A526D.1070101@optaros.com> Message-ID: <479A5623.3050402@wyona.com> Evaldas Taroza wrote: > > Michael Wechner wrote: > >> Evaldas Taroza wrote: >> >>> It looks like all the content management projects for every Web site >>> will have to be heavily custom, >> >> >> >> no,no,no ;-) Yanel is currently a Content Management Framework and >> the goal is to add on top of this CMF a CMSystem such that one can >> easily build stuff very quickly. I would say the BasicXMLResource is >> one big step into this direction, but there are others well, you >> might haven't discovered them yet ;-) (again because of lack of >> documentation) >> >> Think of Java itself. It's very generic, but tells you to use >> classes, inheritance, interfaces, etc. >> >> So Yanel tells you how to build content management applications ... >> >> I hope you understand what I am trying to say > > > This sounds great. I hope that Yanel finally is not that complex as I > have experienced by now. we will get there ;-) Also please note re the interfaces, that this exactly the reason why they are versioned, such that one can change them without breaking backwards compatibility. Cheers Michi > > Evaldas > >> >>> and therefore I am not even sure if it is easier to implement them >>> using Yanel, or simply with JSPs, XSLTs and Jelly. >>> >>> Generally speaking, I think that the whole architecture of Yanel >>> should be revised and cleaned-up. >> >> >> >> shoud be documented ;-) >> >> Cheers >> >> Michi >> >>> >>> Evaldas >>> >> >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sat Jan 26 08:39:25 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sat Jan 26 08:38:13 2008 Subject: [Yanel-dev] Status OpenID integration Message-ID: <479AE3AD.8010504@wyona.com> Hi I have finally managed to integrate OpenID support into Yanel (using the openid4java by sxip libs). Redirect and verification are fine now. What is currently missing is an "OpenID User Impl" which can be associated with an Identity and hence added to the session. And also that one can set policies accordingly. Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sat Jan 26 08:45:15 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sat Jan 26 08:44:03 2008 Subject: [Yanel-dev] Status OpenID integration In-Reply-To: <479AE3AD.8010504@wyona.com> References: <479AE3AD.8010504@wyona.com> Message-ID: <479AE50B.7050901@wyona.com> Michael Wechner wrote: > Hi > > I have finally managed to integrate OpenID support into Yanel (using > the openid4java by sxip libs). Redirect and verification are fine now. > > What is currently missing is an "OpenID User Impl" which can be > associated with an Identity and hence added to the session. > And also that one can set policies accordingly. btw, I have added a TODO (// TODO: Add verified OpenID user to the session) to src/webapp/src/java/org/wyona/yanel/servlet/security/impl/DefaultWebAuthenticatorImpl.java so in case anyone is interested to take a closer look at it ;-) Cheers Michi > > Cheers > > Michi > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sat Jan 26 23:04:13 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sat Jan 26 23:02:55 2008 Subject: [Yanel-dev] Bug within YarepUserManager.java Message-ID: <479BAE5D.7070903@wyona.com> Hi It seems to me that src/impl/java/org/wyona/security/impl/yarep/YarepUserManager.java has a bug re loading of users from the persistent repository. It seems that users like ac-identities/http\:/michaelwechner.livejournal.com/.xml are not being loaded during init() and hence also not refreshed! Actually it might be rather a bug within the Yarep implementation. I will try to fix it, but any pointers are very much appreciated Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sat Jan 26 23:47:40 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sat Jan 26 23:46:18 2008 Subject: [Yanel-dev] OpenID integration working now Message-ID: <479BB88C.3070800@wyona.com> Hi I have finished the OpenID consumer integration (at least I hope so ;-) In order to give access to certain resources one has to change ac policies accordingly, e.g. and that's it :-) The next step would be that Yanel could act as OpenID provider, but first I need to document all of the existing stuff and also do some other stuff ;-) In case somebody would like to give it a try please see http://code.google.com/p/openid4java/ or in particular http://code.google.com/p/openid4java/wiki/SampleServer which I guess could be implemented as a Yanel resource Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 27 12:24:01 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 27 12:22:37 2008 Subject: [Yanel-dev] OpenID integration working now In-Reply-To: <479BB88C.3070800@wyona.com> References: <479BB88C.3070800@wyona.com> Message-ID: <479C69D1.7020209@wyona.com> Michael Wechner wrote: > Hi > > I have finished the OpenID consumer integration (at least I hope so ;-) well, I have deployed Yanel behind a reverse proxy now and then the redirect somehow is wrong, whereas it is very strange, because the log files states the right redirect, but when ngrepping the network traffic, it has a bad redirect in it. Will debug it and try to fix it as soon as possible. Cheers Michi > > In order to give access to certain resources one has to change ac > policies accordingly, e.g. > > > > > > > > and that's it :-) > > The next step would be that Yanel could act as OpenID provider, but > first I need to document all of the existing stuff and also do some > other stuff ;-) > > In case somebody would like to give it a try please see > > http://code.google.com/p/openid4java/ > > or in particular > > http://code.google.com/p/openid4java/wiki/SampleServer > > which I guess could be implemented as a Yanel resource > > Cheers > > Michi > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 27 16:06:10 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 27 16:04:44 2008 Subject: [Yanel-dev] OpenID integration working now In-Reply-To: <479C69D1.7020209@wyona.com> References: <479BB88C.3070800@wyona.com> <479C69D1.7020209@wyona.com> Message-ID: <479C9DE2.5080705@wyona.com> Michael Wechner wrote: > Michael Wechner wrote: > >> Hi >> >> I have finished the OpenID consumer integration (at least I hope so ;-) > > > > well, I have deployed Yanel behind a reverse proxy now and then the > redirect somehow is wrong, whereas it is very strange, because the log > files states the right redirect, but when ngrepping the network > traffic, it has a bad redirect in it. > > Will debug it and try to fix it as soon as possible. It seems that Yanel does everything correctly T 127.0.0.1:9190 -> 127.0.0.1:33248 [AP] HTTP/1.1 301 Moved Permanently..Location: http://www.ezra.com:80/test.html..Content-Length: 0..Date: S un, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1.... but the load balancer for whatever strange reason is rewriting the redirect: T 127.0.0.1:9090 -> 127.0.0.1:47680 [AP] HTTP/1.1 301 Moved Permanently..Location: http://127.0.0.1:9090/test.html..Content-Length: 0..Date: Sun, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1.... whereas the reverse proxy (httpd) seems to be fine again T 127.0.0.1:80 -> 127.0.0.1:45522 [AP] HTTP/1.1 301 Moved Permanently..Date: Sun, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1..Loc ation: http://127.0.0.1:9090/test.html..Content-Length: 0..Keep-Alive: timeout=5, max=100..Connecti on: Keep-Alive..Content-Type: text/html.... This seems to me rather a bug of the load balancer than Yanel and for whatever strange reason we haven't noticed it yet. Will debug some more and hopefully have it fixed soon. Cheers Michi > > Cheers > > Michi > >> >> In order to give access to certain resources one has to change ac >> policies accordingly, e.g. >> >> >> >> >> >> >> >> and that's it :-) >> >> The next step would be that Yanel could act as OpenID provider, but >> first I need to document all of the existing stuff and also do some >> other stuff ;-) >> >> In case somebody would like to give it a try please see >> >> http://code.google.com/p/openid4java/ >> >> or in particular >> >> http://code.google.com/p/openid4java/wiki/SampleServer >> >> which I guess could be implemented as a Yanel resource >> >> Cheers >> >> Michi >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 27 16:47:40 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 27 16:46:15 2008 Subject: LoadBalancer Redirect Bug [WAS: Re: [Yanel-dev] OpenID integration working now] In-Reply-To: <479C9DE2.5080705@wyona.com> References: <479BB88C.3070800@wyona.com> <479C69D1.7020209@wyona.com> <479C9DE2.5080705@wyona.com> Message-ID: <479CA79C.9040209@wyona.com> Michael Wechner wrote: > > It seems that Yanel does everything correctly > > T 127.0.0.1:9190 -> 127.0.0.1:33248 [AP] > HTTP/1.1 301 Moved Permanently..Location: > http://www.ezra.com:80/test.html..Content-Length: 0..Date: S > un, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1.... > > but the load balancer for whatever strange reason is rewriting the > redirect: > > T 127.0.0.1:9090 -> 127.0.0.1:47680 [AP] > HTTP/1.1 301 Moved Permanently..Location: > http://127.0.0.1:9090/test.html..Content-Length: 0..Date: > Sun, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1.... It seems that the load balancer is really rewriting redirects: (src/java/com/wyona/tomcat/cluster/proxy/HttpProxy.java) private void rewriteResponseHeaders(HttpServletResponse servletResponse, HttpMethod method, RequestStatus status) { switch (status.getStatusCode()) { case HttpStatus.SC_MOVED_PERMANENTLY: case HttpStatus.SC_MOVED_TEMPORARILY: rewriteLocation(servletResponse, method); break; } } but it's strange, because it should only rewrite 302 reponses and not 301 ... Also I don't understand why it actually rewrites just one of them ... Will debug some more ;-) Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 27 22:08:53 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 27 22:07:27 2008 Subject: LoadBalancer Redirect Bug [WAS: Re: [Yanel-dev] OpenID integration working now] In-Reply-To: <479CA79C.9040209@wyona.com> References: <479BB88C.3070800@wyona.com> <479C69D1.7020209@wyona.com> <479C9DE2.5080705@wyona.com> <479CA79C.9040209@wyona.com> Message-ID: <479CF2E5.50407@wyona.com> Michael Wechner wrote: > Michael Wechner wrote: > >> >> It seems that Yanel does everything correctly >> >> T 127.0.0.1:9190 -> 127.0.0.1:33248 [AP] >> HTTP/1.1 301 Moved Permanently..Location: >> http://www.ezra.com:80/test.html..Content-Length: 0..Date: S >> un, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1.... >> >> but the load balancer for whatever strange reason is rewriting the >> redirect: >> >> T 127.0.0.1:9090 -> 127.0.0.1:47680 [AP] >> HTTP/1.1 301 Moved Permanently..Location: >> http://127.0.0.1:9090/test.html..Content-Length: 0..Date: >> Sun, 27 Jan 2008 14:56:54 GMT..Server: Apache-Coyote/1.1.... > > > > > It seems that the load balancer is really rewriting redirects: > > (src/java/com/wyona/tomcat/cluster/proxy/HttpProxy.java) > > private void rewriteResponseHeaders(HttpServletResponse > servletResponse, HttpMethod method, RequestStatus status) { > switch (status.getStatusCode()) { > case HttpStatus.SC_MOVED_PERMANENTLY: > case HttpStatus.SC_MOVED_TEMPORARILY: > rewriteLocation(servletResponse, method); > break; > } > } > > > but it's strange, because it should only rewrite 302 reponses and not > 301 ... > > Also I don't understand why it actually rewrites just one of them ... > > Will debug some more ;-) I think I have fixed it now, but I am not sure if this is according to the spec of redirects behind a load balancer (or reverse proxy) or if there is actually a spec for this. Will need to ask Gregor Imboden who developed most of the code initially. Cheers Michi > > Cheers > > Michi > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Sun Jan 27 22:12:24 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Sun Jan 27 22:11:02 2008 Subject: [Yanel-dev] OpenID integration working now In-Reply-To: <479C9DE2.5080705@wyona.com> References: <479BB88C.3070800@wyona.com> <479C69D1.7020209@wyona.com> <479C9DE2.5080705@wyona.com> Message-ID: <479CF3B8.6010507@wyona.com> Michael Wechner wrote: > Michael Wechner wrote: > >> Michael Wechner wrote: >> >>> Hi >>> >>> I have finished the OpenID consumer integration (at least I hope so ;-) >> >> >> >> >> well, I have deployed Yanel behind a reverse proxy now and then the >> redirect somehow is wrong, whereas it is very strange, because the >> log files states the right redirect, but when ngrepping the network >> traffic, it has a bad redirect in it. >> >> Will debug it and try to fix it as soon as possible. > > > > It seems that Yanel does everything correctly after fixing the load balancer there still seems to be a problem re OpenID verification behind a proxy 247375 2008-01-27 22:00:36,641 [http-9190-Processor25] ERROR org.openid4java.consumer.ConsumerManager.verify():1145 - Return_To URL verification failed. but I think this is because the current implementation doesn't take into account the reverse proxy (or load balancer) But need to debug first if it is a Yanel problem or an openid4java problem, whereas I will have to postpone this until I have finished some other tasks. Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 00:18:16 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 00:17:04 2008 Subject: [Yanel-dev] OpenID integration working now In-Reply-To: <479CF3B8.6010507@wyona.com> References: <479BB88C.3070800@wyona.com> <479C69D1.7020209@wyona.com> <479C9DE2.5080705@wyona.com> <479CF3B8.6010507@wyona.com> Message-ID: <479D1138.7040505@wyona.com> Michael Wechner wrote: > > but I think this is because the current implementation doesn't take > into account the reverse proxy (or load balancer) > > But need to debug first if it is a Yanel problem or an openid4java > problem, whereas I will have to postpone this until I have finished > some other tasks. it's fixed now :-) the problem was, that the receiving URL had to be rewritten re the proxy configurations of the realm. Cheers Michi > > Cheers > > Michi > > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 00:31:31 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 00:30:13 2008 Subject: [Yanel-dev] System property org.xml.sax.driver not specified Message-ID: <479D1453.9080502@wyona.com> Hi I have just noted that Yanel throws the following exception for certain requests. 2438794 2008-01-28 01:57:52,581 [http-9290-Processor22] ERROR org.wyona.yanel.impl.resources.BasicXMLResource.getXMLView():283 - org.xml.sax.SAXException: System property org.xml.sax.driver not specified (/, Name: Yanel Website, ID: yanel-website, Mount-Point: /yanel-website/, Reverse Proxy Host Name: yanel.wyona.org, Reverse Proxy Port is set to default 80 (resp. -1), Reverse Proxy SSL Port is set to default 443 (resp. -1), Reverse Proxy Prefix: /ulysses/yanel-website) org.xml.sax.SAXException: System property org.xml.sax.driver not specified at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:90) at org.wyona.yanel.impl.resources.BasicXMLResource.getXMLView(BasicXMLResource.java:227) at org.wyona.yanel.impl.resources.XMLResource.getView(XMLResource.java:108) at org.wyona.yanel.impl.resources.XMLResource.getView(XMLResource.java:98) at org.wyona.yanel.servlet.YanelServlet.getContent(YanelServlet.java:470) at org.wyona.yanel.servlet.YanelServlet.doGet(YanelServlet.java:268) at org.wyona.yanel.servlet.YanelServlet.service(YanelServlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.wyona.yanel.servlet.communication.YanelFilter.doFilter(YanelFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:141) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) 2438796 2008-01-28 01:57:52,583 [http-9290-Processor22] ERROR org.wyona.yanel.servlet.YanelServlet.getContent():579 - org.xml.sax.SAXException: System property org.xml.sax.driver not specified java.lang.Exception: org.xml.sax.SAXException: System property org.xml.sax.driver not specified at org.wyona.yanel.impl.resources.BasicXMLResource.getXMLView(BasicXMLResource.java:284) at org.wyona.yanel.impl.resources.XMLResource.getView(XMLResource.java:108) at org.wyona.yanel.impl.resources.XMLResource.getView(XMLResource.java:98) at org.wyona.yanel.servlet.YanelServlet.getContent(YanelServlet.java:470) at org.wyona.yanel.servlet.YanelServlet.doGet(YanelServlet.java:268) at org.wyona.yanel.servlet.YanelServlet.service(YanelServlet.java:212) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.wyona.yanel.servlet.communication.YanelFilter.doFilter(YanelFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:141) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) Caused by: org.xml.sax.SAXException: System property org.xml.sax.driver not specified at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:90) at org.wyona.yanel.impl.resources.BasicXMLResource.getXMLView(BasicXMLResource.java:227) ... 35 more Any idea what might be actually causing this. Has this anything to do with the recent changes within the BasicXMLResource? Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 09:08:40 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 09:07:08 2008 Subject: [Yanel-dev] System property org.xml.sax.driver not specified In-Reply-To: <479D1453.9080502@wyona.com> References: <479D1453.9080502@wyona.com> Message-ID: <479D8D88.4070604@wyona.com> Michael Wechner wrote: > Hi > > I have just noted that Yanel throws the following exception for > certain requests > > > > Any idea what might be actually causing this. Has this anything to do > with the recent changes within the BasicXMLResource? btw, the last revision which I know worked for sure was yanel.revision=30196 Cheers Michi > > Thanks > > Michi > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 09:26:42 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 09:25:10 2008 Subject: [Yanel-dev] System property org.xml.sax.driver not specified In-Reply-To: <479D1453.9080502@wyona.com> References: <479D1453.9080502@wyona.com> Message-ID: <479D91C2.6000607@wyona.com> Michael Wechner wrote: > Hi > ... 35 more > > > Any idea what might be actually causing this. Has this anything to do > with the recent changes within the BasicXMLResource? I think the problem is that there are multiple xml-apis and xerces libs build/webapps/ulysses/WEB-INF/lib/xml-apis-1.0.b2.jar build/webapps/ulysses/WEB-INF/lib/xml-apis-1.3.02.jar build/webapps/ulysses/WEB-INF/lib/xercesImpl-2.0.2.jar build/webapps/ulysses/WEB-INF/lib/xercesImpl-2.7.1.jar will try to find out where these old dependencies come from and upgrade them or delete them. Cheers Michi > > Thanks > > Michi > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From josias.thoeny at wyona.com Mon Jan 28 11:01:20 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 28 11:01:38 2008 Subject: [Yanel-dev] open id problem Message-ID: <479DA7F0.5060409@wyona.com> Hi, When I try to access yanel I get the following error: java.lang.NoSuchMethodError: org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Lorg/apache/xpath/Expression;)I at org.apache.xml.security.Init.init(Unknown Source) at org.openxri.xml.XRD.(XRD.java:108) at org.openid4java.discovery.Discovery.(Discovery.java:59) at org.openid4java.consumer.ConsumerManager.(ConsumerManager.java:51) at org.wyona.yanel.servlet.security.impl.DefaultWebAuthenticatorImpl.init(DefaultWebAuthenticatorImpl.java:65) at org.wyona.yanel.core.map.Realm.configure(Realm.java:172) at org.wyona.yanel.core.map.Realm.(Realm.java:90) at org.wyona.yanel.core.map.RealmManager.readRealms(RealmManager.java:230) at org.wyona.yanel.core.map.RealmManager.(RealmManager.java:118) at org.wyona.yanel.core.map.RealmManager.(RealmManager.java:76) at org.wyona.yanel.core.Yanel.init(Yanel.java:80) at org.wyona.yanel.servlet.YanelServlet.init(YanelServlet.java:148) It looks like the problem is caused by missing/incompatible jar files. I commented openid in the DefaultWebAuthenticator as a workaround. It means openid is not working ATM, but normal login should work again when you update to r30843. josias -- Josias Th?ny Wyona - Open Source Content Management http://www.wyona.com From etaroza at optaros.com Mon Jan 28 11:10:41 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 28 11:10:37 2008 Subject: [Yanel-dev] data and data-paths Message-ID: <479DAA21.5080200@optaros.com> Hi, I am creating a node inside the repository programatically. I would expect that when I do that, the node with a given name is created, however, what I get is: 1. a 'node' inside data-paths is created 2. inside .yanel-uid this path points to a node with a generated name I understand that this is quite handy when you want to move nodes around (you only have to change the pointer), but when I need to navigate my data it is very difficult to find a specific node. I think that generating an id for a node should only be done only when one tries to insert a node with an existing name. Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Mon Jan 28 11:28:51 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 11:27:17 2008 Subject: [Yanel-dev] data and data-paths In-Reply-To: <479DAA21.5080200@optaros.com> References: <479DAA21.5080200@optaros.com> Message-ID: <479DAE63.1050302@wyona.com> Evaldas Taroza wrote: > Hi, > I am creating a node inside the repository programatically. I would > expect that when I do that, the node with a given name is created, > however, what I get is: > 1. a 'node' inside data-paths is created > 2. inside .yanel-uid this path points to a node with a generated name yes, this is how the org.wyona.yarep.impl.repo.fs.FileSystemRepository is working, but please be aware that this is only specific to this implementation. You might want to check out other implementations, e.g. org.wyona.yarep.impl.repo.vfs.VirtualFileSystemRepository whereas a sample configuration can be found at https://svn.wyona.com/repos/public/yarep/trunk/src/test/repository/new-vfs-example Btw, you can migrate your data from one implementation to the other by using ./build.sh copy-repository -Dcopy.src.repo.id=foo -Dcopy.dest.repo.id=bar whereas see https://svn.wyona.com/repos/public/yarep/trunk/README.txt > > I understand that this is quite handy when you want to move nodes > around (you only have to change the pointer), but when I need to > navigate my data it is very difficult to find a specific node. you mean to debug within the persistent data? > > I think that generating an id for a node should only be done only when > one tries to insert a node with an existing name. I am not sure if I understand. You mean like connections of different data paths with the same data? Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 11:37:09 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 11:35:37 2008 Subject: [Yanel-dev] Re: [Wyona-commits] rev 30845 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources In-Reply-To: <200801280954.m0S9ssii021100@cvs-extra.wyona.com> References: <200801280954.m0S9ssii021100@cvs-extra.wyona.com> Message-ID: <479DB055.8020604@wyona.com> Sorry if might have checked in this wrong. But what is the logic behind this order? Could you add a comment explaing why it has to be this order? ;-) Thanks Michi josias@wyona.com wrote: >Author: josias >Date: 2008-01-28 10:54:54 +0100 (Mon, 28 Jan 2008) >New Revision: 30845 > >Modified: > public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >Log: >serializer: changed order of checks for xhtml-strict and xml. now mime-type application/xhtml+xml uses the xhtml-strict serializer, as it was before. > >Modified: public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >=================================================================== >--- public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java 2008-01-28 09:48:57 UTC (rev 30844) >+++ public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java 2008-01-28 09:54:54 UTC (rev 30845) >@@ -236,7 +236,6 @@ > if (xsltPaths == null || xsltPaths.length == 0) { > xsltPaths = getXSLTPath(getPath()); > } >- > SourceResolver uriResolver = new SourceResolver(this); > > TransformerHandler[] xsltHandlers = new TransformerHandler[xsltPaths.length]; >@@ -305,12 +304,12 @@ > > if (MimeTypeUtil.isHTML(mimeType) && !MimeTypeUtil.isXML(mimeType)) { > serializer = SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); >+ } else if (MimeTypeUtil.isHTML(mimeType) && MimeTypeUtil.isXML(mimeType)){ >+ serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); > } else if (MimeTypeUtil.isXML(mimeType)) { > serializer = SerializerFactory.getSerializer(SerializerFactory.XML); > } else if (MimeTypeUtil.isTextual(mimeType)) { > serializer = SerializerFactory.getSerializer(SerializerFactory.TEXT); >- } else if (MimeTypeUtil.isHTML(mimeType) && MimeTypeUtil.isXML(mimeType)){ >- serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); > } else{ > // For backwards compatibility leave XHTML as default > serializer = SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); > >_______________________________________________ >Wyona-commits mailing list >Wyona-commits@wyona.com >http://lists.wyona.org/cgi-bin/mailman/listinfo/wyona-commits > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Mon Jan 28 11:39:39 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 28 11:39:33 2008 Subject: [Yanel-dev] data and data-paths In-Reply-To: <479DAE63.1050302@wyona.com> References: <479DAA21.5080200@optaros.com> <479DAE63.1050302@wyona.com> Message-ID: <479DB0EB.5090403@optaros.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> Hi, >> I am creating a node inside the repository programatically. I would >> expect that when I do that, the node with a given name is created, >> however, what I get is: >> 1. a 'node' inside data-paths is created >> 2. inside .yanel-uid this path points to a node with a generated name > > > yes, this is how the org.wyona.yarep.impl.repo.fs.FileSystemRepository > is working, but please be aware that this is only specific to this > implementation. > > You might want to check out other implementations, e.g. > > org.wyona.yarep.impl.repo.vfs.VirtualFileSystemRepository > > whereas a sample configuration can be found at > > https://svn.wyona.com/repos/public/yarep/trunk/src/test/repository/new-vfs-example > > > > Btw, you can migrate your data from one implementation to the other by > using > > ./build.sh copy-repository -Dcopy.src.repo.id=foo -Dcopy.dest.repo.id=bar > > whereas see > > https://svn.wyona.com/repos/public/yarep/trunk/README.txt > OK, I'll check these resources >> >> I understand that this is quite handy when you want to move nodes >> around (you only have to change the pointer), but when I need to >> navigate my data it is very difficult to find a specific node. > > > you mean to debug within the persistent data? Yes, mainly for debugging. But I guess it will also have a nice side effect that enables to edit the repository without UI. > >> >> I think that generating an id for a node should only be done only when >> one tries to insert a node with an existing name. > > > I am not sure if I understand. You mean like connections of different > data paths with the same data? No, I mean, when I say do node.addNode("mynode", "collection") I would say that /data/mynode should be created, instead of /data/XXXYYYZZZ + /data-paths/mynode. Unless /data/mynode already exists. Evaldas > > Cheers > > Michi > >> >> Evaldas >> > > -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Mon Jan 28 12:16:03 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 12:14:30 2008 Subject: [Yanel-dev] open id problem In-Reply-To: <479DA7F0.5060409@wyona.com> References: <479DA7F0.5060409@wyona.com> Message-ID: <479DB973.1080407@wyona.com> Josias Th?ny wrote: > Hi, > > When I try to access yanel I get the following error: > > java.lang.NoSuchMethodError: > org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Lorg/apache/xpath/Expression;)I > > at org.apache.xml.security.Init.init(Unknown Source) > at org.openxri.xml.XRD.(XRD.java:108) > at org.openid4java.discovery.Discovery.(Discovery.java:59) > at > org.openid4java.consumer.ConsumerManager.(ConsumerManager.java:51) > at > org.wyona.yanel.servlet.security.impl.DefaultWebAuthenticatorImpl.init(DefaultWebAuthenticatorImpl.java:65) > > at org.wyona.yanel.core.map.Realm.configure(Realm.java:172) > at org.wyona.yanel.core.map.Realm.(Realm.java:90) > at > org.wyona.yanel.core.map.RealmManager.readRealms(RealmManager.java:230) > at > org.wyona.yanel.core.map.RealmManager.(RealmManager.java:118) > at > org.wyona.yanel.core.map.RealmManager.(RealmManager.java:76) > at org.wyona.yanel.core.Yanel.init(Yanel.java:80) > at > org.wyona.yanel.servlet.YanelServlet.init(YanelServlet.java:148) > > > It looks like the problem is caused by missing/incompatible jar files. > I commented openid in the DefaultWebAuthenticator as a workaround. > It means openid is not working ATM, but normal login should work again > when you update to r30843. it's strange though, because I didn't have this problem and have tested it on two different machines. I also think that it is library problem. will try to find out which one. Cheers Michi > > josias > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 12:19:37 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 12:18:04 2008 Subject: [Yanel-dev] System property org.xml.sax.driver not specified In-Reply-To: <479D91C2.6000607@wyona.com> References: <479D1453.9080502@wyona.com> <479D91C2.6000607@wyona.com> Message-ID: <479DBA49.3030307@wyona.com> Michael Wechner wrote: > Michael Wechner wrote: > >> Hi >> ... 35 more >> >> >> Any idea what might be actually causing this. Has this anything to do >> with the recent changes within the BasicXMLResource? > > > > I think the problem is that there are multiple xml-apis and xerces libs > > build/webapps/ulysses/WEB-INF/lib/xml-apis-1.0.b2.jar > build/webapps/ulysses/WEB-INF/lib/xml-apis-1.3.02.jar > > build/webapps/ulysses/WEB-INF/lib/xercesImpl-2.0.2.jar > build/webapps/ulysses/WEB-INF/lib/xercesImpl-2.7.1.jar > > will try to find out where these old dependencies come from and > upgrade them or delete them. it seems like that this was really the problem. I had some custom realm which somehow pulls in these old xerces and xml-api libs and hence the conflict. I know we have discussed this before, but I guess we really have to take the time at some point to fix this. We cannot prevent that different realms and resources have conflicting libs, but Yanel should tell there is a conflict such that one can resolve it quickly. Cheers Michi > > Cheers > > Michi > >> >> Thanks >> >> Michi >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Mon Jan 28 13:59:30 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 28 13:59:24 2008 Subject: [Yanel-dev] BasicXMLResource should not belong to yanel-impl Message-ID: <479DD1B2.9070805@optaros.com> It looks that BasicXMLResource should not really belong to yanel-impl. Now whenever I have a resource that extends the BasicXMLResource, in the dependencies I must add that resource as well as yanel-impl. There is a workaround for this, but it requires to put a hardcoded version of the yanel-impl into the pom file... Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Mon Jan 28 14:09:04 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 14:07:31 2008 Subject: [Yanel-dev] BasicXMLResource should not belong to yanel-impl In-Reply-To: <479DD1B2.9070805@optaros.com> References: <479DD1B2.9070805@optaros.com> Message-ID: <479DD3F0.3000806@wyona.com> Evaldas Taroza wrote: > It looks that BasicXMLResource should not really belong to yanel-impl. > > Now whenever I have a resource that extends the BasicXMLResource, in > the dependencies I must add that resource as well as yanel-impl. There > is a workaround for this, but it requires to put a hardcoded version > of the yanel-impl into the pom file... I agree (whereas Evaldas and discussed that off the list, so it's easy to agree ;-). It seems to me that yanel-impl is the implementation of yanel-core, whereas BasicXMLResource is rather a "utility" class in order to make development of XML oriented resources simpler and I would suggest to either put that into a resource lib itself or create some yanel-util lib. WDOT? Cheers Michi > > Evaldas > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Mon Jan 28 14:51:56 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 28 14:51:51 2008 Subject: [Yanel-dev] System property org.xml.sax.driver not specified In-Reply-To: <479DBA49.3030307@wyona.com> References: <479D1453.9080502@wyona.com> <479D91C2.6000607@wyona.com> <479DBA49.3030307@wyona.com> Message-ID: <479DDDFC.7090002@optaros.com> Michael Wechner wrote: > Michael Wechner wrote: > >> Michael Wechner wrote: >> >>> Hi >>> ... 35 more >>> >>> >>> Any idea what might be actually causing this. Has this anything to do >>> with the recent changes within the BasicXMLResource? >> >> >> >> I think the problem is that there are multiple xml-apis and xerces libs >> >> build/webapps/ulysses/WEB-INF/lib/xml-apis-1.0.b2.jar >> build/webapps/ulysses/WEB-INF/lib/xml-apis-1.3.02.jar >> >> build/webapps/ulysses/WEB-INF/lib/xercesImpl-2.0.2.jar >> build/webapps/ulysses/WEB-INF/lib/xercesImpl-2.7.1.jar >> >> will try to find out where these old dependencies come from and >> upgrade them or delete them. > > > it seems like that this was really the problem. I had some custom realm > which somehow pulls in these old xerces and xml-api libs and hence the > conflict. > > I know we have discussed this before, but I guess we really have to take > the time at some point to fix this. > > We cannot prevent that different realms and resources have conflicting > libs, but Yanel should tell there is a conflict such that one can > resolve it quickly. Since all Yanel architecture resembles a servlet container, maybe ideas from there can be reused. For instance, using a hierarchy of classloaders. How I map two architectures: 1. Yanel - Web server 2. Realm - Web application 3. Resource type - servlet 4. Resource configuration - servlet configuration (in web.xml) 5. Content repository - some repository accessible through JNDI 6. ... With such similarity to a servlet API why Yanel is not an extension of e.g. Tomcat? Doesn't it make sense? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From etaroza at optaros.com Mon Jan 28 15:44:55 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 28 15:44:50 2008 Subject: [Yanel-dev] Node.getPath() semantics Message-ID: <479DEA67.3090704@optaros.com> I suggest to impose that Node.getPath() returns path that ends with '/' when the node is a collection. This should help building string representation of paths. WDYT? Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From etaroza at optaros.com Mon Jan 28 15:56:04 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Mon Jan 28 15:56:25 2008 Subject: [Yanel-dev] Node.getPath() semantics In-Reply-To: <479DEA67.3090704@optaros.com> References: <479DEA67.3090704@optaros.com> Message-ID: <479DED04.2030207@optaros.com> Evaldas Taroza wrote: > I suggest to impose that Node.getPath() returns path that ends with '/' > when the node is a collection. This should help building string > representation of paths. Well it looks that this representation is already used. So maybe it makes sense to make a note in the Node.getPath() javadoc that collection path always ends with '/'. Evaldas > > WDYT? > > Evaldas > -- +41 79 616 53 76 Optaros - www.optaros.com From josias.thoeny at wyona.com Mon Jan 28 22:19:18 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 28 22:19:06 2008 Subject: [Yanel-dev] BasicXMLResource should not belong to yanel-impl In-Reply-To: <479DD3F0.3000806@wyona.com> References: <479DD1B2.9070805@optaros.com> <479DD3F0.3000806@wyona.com> Message-ID: <479E46D6.3030508@wyona.com> Michael Wechner wrote: > Evaldas Taroza wrote: > >> It looks that BasicXMLResource should not really belong to yanel-impl. >> >> Now whenever I have a resource that extends the BasicXMLResource, in >> the dependencies I must add that resource as well as yanel-impl. There >> is a workaround for this, but it requires to put a hardcoded version >> of the yanel-impl into the pom file... > > > I agree (whereas Evaldas and discussed that off the list, so it's easy > to agree ;-). > > It seems to me that yanel-impl is the implementation of yanel-core, > whereas BasicXMLResource is rather a "utility" class in order to make > development of XML oriented resources simpler and I would suggest to > either put that into a resource lib itself or create some yanel-util lib. > > WDOT? i think it should be put into a resource lib. however i'm not sure if that would make the dependency handling any easier. josias > > Cheers > > Michi > >> >> Evaldas >> > > From josias.thoeny at wyona.com Mon Jan 28 22:32:02 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Mon Jan 28 22:31:43 2008 Subject: [Yanel-dev] Re: [Wyona-commits] rev 30845 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources In-Reply-To: <479DB055.8020604@wyona.com> References: <200801280954.m0S9ssii021100@cvs-extra.wyona.com> <479DB055.8020604@wyona.com> Message-ID: <479E49D2.8090102@wyona.com> Michael Wechner wrote: > Sorry if might have checked in this wrong. But what is the logic behind > this order? Could you add a comment explaing why it has to be this > order? ;-) If no serializer is specified for a view, one is chosen according to the mime-type. I slightly changed the order of mime-type checks such that the mime-type "application/xhtml+xml" gets mapped to the XHTML_STRICT serializer. I just added a note to the javadoc about this. josias > > Thanks > > Michi > > josias@wyona.com wrote: > >> Author: josias >> Date: 2008-01-28 10:54:54 +0100 (Mon, 28 Jan 2008) >> New Revision: 30845 >> >> Modified: >> >> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> >> Log: >> serializer: changed order of checks for xhtml-strict and xml. now >> mime-type application/xhtml+xml uses the xhtml-strict serializer, as >> it was before. >> >> Modified: >> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> >> =================================================================== >> --- >> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> 2008-01-28 09:48:57 UTC (rev 30844) >> +++ >> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >> 2008-01-28 09:54:54 UTC (rev 30845) >> @@ -236,7 +236,6 @@ >> if (xsltPaths == null || xsltPaths.length == 0) { >> xsltPaths = getXSLTPath(getPath()); >> } >> - SourceResolver uriResolver = new >> SourceResolver(this); >> TransformerHandler[] xsltHandlers = new >> TransformerHandler[xsltPaths.length]; >> @@ -305,12 +304,12 @@ >> >> if (MimeTypeUtil.isHTML(mimeType) && >> !MimeTypeUtil.isXML(mimeType)) { >> serializer = >> SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); >> + } else if (MimeTypeUtil.isHTML(mimeType) && >> MimeTypeUtil.isXML(mimeType)){ >> + serializer = >> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >> } else if (MimeTypeUtil.isXML(mimeType)) { >> serializer = >> SerializerFactory.getSerializer(SerializerFactory.XML); >> } else if (MimeTypeUtil.isTextual(mimeType)) { >> serializer = >> SerializerFactory.getSerializer(SerializerFactory.TEXT); >> - } else if (MimeTypeUtil.isHTML(mimeType) && >> MimeTypeUtil.isXML(mimeType)){ >> - serializer = >> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >> } else{ >> // For backwards compatibility leave XHTML as default >> serializer = >> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >> >> _______________________________________________ >> Wyona-commits mailing list >> Wyona-commits@wyona.com >> http://lists.wyona.org/cgi-bin/mailman/listinfo/wyona-commits >> >> > > From michael.wechner at wyona.com Mon Jan 28 23:47:24 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 23:49:48 2008 Subject: [Yanel-dev] [Fwd: [openid4java] Re: lib conflict] Message-ID: <479E5B7C.4000103@wyona.com> FYI: -------- Original Message -------- Subject: [openid4java] Re: lib conflict Date: Mon, 28 Jan 2008 13:54:06 -0800 From: Johnny Bufu Reply-To: openid4java@googlegroups.com To: openid4java@googlegroups.com References: <479DD342.8000009@wyona.com> On 28-Jan-08, at 5:06 AM, Michael Wechner wrote: > I have integrated openid4java into Yanel, but in certain cases I > receive > the following error when initializing the ConsumerManager > > java.lang.NoSuchMethodError: > org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/ > String;Lorg/apache/xpath/Expression;)I > > at org.apache.xml.security.Init.init(Unknown Source) > at org.openxri.xml.XRD.(XRD.java:108) > at org.openid4java.discovery.Discovery. > (Discovery.java:59) > at > org.openid4java.consumer.ConsumerManager. > (ConsumerManager.java:51) I see the org.apache.xpath.compiler.FunctionTable class in xalan-2.6.0.jar, so it seems that openxri-1.0.1 depends strictly on xalan-2.6.0 and won't work with 2.7.0. This also answers my question to Will Tan from last week: On 23-Jan-08, at 10:54 AM, Johnny Bufu wrote: > So I'm wondering if we could distribute openid4java with openxri > 1.0.1, xalan 2.6.0 and xmlsec 1.4.1. Not sure how this can be fixed or worked around... Johnny --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenID4Java" group. To post to this group, send email to openid4java@googlegroups.com To unsubscribe from this group, send email to openid4java-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/openid4java?hl=en -~----------~----~----~----~------~----~------~--~--- -- Michael Wechner Wyona - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org michael.wechner@wyona.com michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Mon Jan 28 23:56:50 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Mon Jan 28 23:59:10 2008 Subject: [Yanel-dev] Re: [Wyona-commits] rev 30845 - public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources In-Reply-To: <479E49D2.8090102@wyona.com> References: <200801280954.m0S9ssii021100@cvs-extra.wyona.com> <479DB055.8020604@wyona.com> <479E49D2.8090102@wyona.com> Message-ID: <479E5DB2.5050907@wyona.com> Josias Th?ny wrote: > Michael Wechner wrote: > >> Sorry if might have checked in this wrong. But what is the logic >> behind this order? Could you add a comment explaing why it has to be >> this order? ;-) > > > If no serializer is specified for a view, one is chosen according to > the mime-type. I slightly changed the order of mime-type checks such > that the mime-type "application/xhtml+xml" gets mapped to the > XHTML_STRICT serializer. > I just added a note to the javadoc about this. thanks very much Michi > > josias > >> >> Thanks >> >> Michi >> >> josias@wyona.com wrote: >> >>> Author: josias >>> Date: 2008-01-28 10:54:54 +0100 (Mon, 28 Jan 2008) >>> New Revision: 30845 >>> >>> Modified: >>> >>> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> >>> Log: >>> serializer: changed order of checks for xhtml-strict and xml. now >>> mime-type application/xhtml+xml uses the xhtml-strict serializer, as >>> it was before. >>> >>> Modified: >>> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> >>> =================================================================== >>> --- >>> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> 2008-01-28 09:48:57 UTC (rev 30844) >>> +++ >>> public/yanel/trunk/src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java >>> 2008-01-28 09:54:54 UTC (rev 30845) >>> @@ -236,7 +236,6 @@ >>> if (xsltPaths == null || xsltPaths.length == 0) { >>> xsltPaths = getXSLTPath(getPath()); >>> } >>> - SourceResolver uriResolver = new >>> SourceResolver(this); >>> TransformerHandler[] xsltHandlers = new >>> TransformerHandler[xsltPaths.length]; >>> @@ -305,12 +304,12 @@ >>> >>> if (MimeTypeUtil.isHTML(mimeType) && >>> !MimeTypeUtil.isXML(mimeType)) { >>> serializer = >>> SerializerFactory.getSerializer(SerializerFactory.HTML_TRANSITIONAL); >>> + } else if (MimeTypeUtil.isHTML(mimeType) && >>> MimeTypeUtil.isXML(mimeType)){ >>> + serializer = >>> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >>> } else if (MimeTypeUtil.isXML(mimeType)) { >>> serializer = >>> SerializerFactory.getSerializer(SerializerFactory.XML); >>> } else if (MimeTypeUtil.isTextual(mimeType)) { >>> serializer = >>> SerializerFactory.getSerializer(SerializerFactory.TEXT); >>> - } else if (MimeTypeUtil.isHTML(mimeType) && >>> MimeTypeUtil.isXML(mimeType)){ >>> - serializer = >>> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >>> } else{ >>> // For backwards compatibility leave XHTML as default >>> serializer = >>> SerializerFactory.getSerializer(SerializerFactory.XHTML_STRICT); >>> >>> _______________________________________________ >>> Wyona-commits mailing list >>> Wyona-commits@wyona.com >>> http://lists.wyona.org/cgi-bin/mailman/listinfo/wyona-commits >>> >>> >> >> > > _______________________________________________ > Yanel-development mailing list > Yanel-development@wyona.com > http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development -- Michael Wechner Wyona - Open Source Content Management - Apache Lenya http://www.wyona.com http://lenya.apache.org michael.wechner@wyona.com michi@apache.org +41 44 272 91 61 From etaroza at optaros.com Tue Jan 29 19:47:39 2008 From: etaroza at optaros.com (Evaldas Taroza) Date: Tue Jan 29 19:47:29 2008 Subject: [Yanel-dev] refering to resource type resources Message-ID: <479F74CB.7040801@optaros.com> Hi, I stumbled on a code line like this: Can anyone explain how does it work? I don't understand what goes after /resource-types/.... Thanks, Evaldas -- +41 79 616 53 76 Optaros - www.optaros.com From michael.wechner at wyona.com Tue Jan 29 23:15:05 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Tue Jan 29 23:13:23 2008 Subject: [Yanel-dev] CRUD with Struts 2.x Message-ID: <479FA569.6080100@wyona.com> Hi Maybe something we can learn from http://struts.apache.org/2.x/docs/crud-demo-i.html whereas I am convinced we can make it easier. Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From michael.wechner at wyona.com Tue Jan 29 23:19:24 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Tue Jan 29 23:17:42 2008 Subject: [Yanel-dev] Spring and MVC Message-ID: <479FA66C.6010203@wyona.com> Hi And something else we can learn from http://www.springframework.org/docs/MVC-step-by-step/Spring-MVC-step-by-step.html Cheers Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From josias.thoeny at wyona.com Wed Jan 30 09:07:40 2008 From: josias.thoeny at wyona.com (=?ISO-8859-1?Q?Josias_Th=F6ny?=) Date: Wed Jan 30 09:07:51 2008 Subject: [Yanel-dev] refering to resource type resources In-Reply-To: <479F74CB.7040801@optaros.com> References: <479F74CB.7040801@optaros.com> Message-ID: <47A0304C.7070401@wyona.com> Evaldas Taroza wrote: > Hi, > > I stumbled on a code line like this: > > > > Can anyone explain how does it work? I don't understand what goes after > /resource-types/.... The part after /resource-types/ identifies the resource type and the file as follows: namespace-uri::name/file in this example: namespace-uri: http://www.wyona.org/yanel/resource/1.0 resource-type name: gallery file: prototype.js Yanel will look for this file in the htdocs directory of that resource type. Actually I think it's not very nice to use the namespace-uri as a part of the URL. I'm not even sure if this complies to the RFC. I might lead to problems if someone does string manipulations on the URL. josias > > Thanks, > > Evaldas > -- Josias Th?ny Wyona - Open Source Content Management http://www.wyona.com From michael.wechner at wyona.com Wed Jan 30 09:23:25 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Wed Jan 30 09:21:39 2008 Subject: [Yanel-dev] refering to resource type resources In-Reply-To: <47A0304C.7070401@wyona.com> References: <479F74CB.7040801@optaros.com> <47A0304C.7070401@wyona.com> Message-ID: <47A033FD.4040309@wyona.com> Josias Th?ny wrote: > Evaldas Taroza wrote: > >> Hi, >> >> I stumbled on a code line like this: >> >> >> >> Can anyone explain how does it work? I don't understand what goes >> after /resource-types/.... > > > The part after /resource-types/ identifies the resource type and the > file as follows: > > namespace-uri::name/file > > in this example: > namespace-uri: http://www.wyona.org/yanel/resource/1.0 > resource-type name: gallery > file: prototype.js > > Yanel will look for this file in the htdocs directory of that resource > type. > > Actually I think it's not very nice to use the namespace-uri as a part > of the URL. I'm not even sure if this complies to the RFC. me neither, but we need the namespace in order to differentiate between the various resource types. Cheers Michi > I might lead to problems if someone does string manipulations on the URL. > > josias > >> >> Thanks, >> >> Evaldas >> > > -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61 From simon.litwan at wyona.com Wed Jan 30 12:43:03 2008 From: simon.litwan at wyona.com (simon litwan) Date: Wed Jan 30 12:42:47 2008 Subject: [Yanel-dev] refering to resource type resources In-Reply-To: <479F74CB.7040801@optaros.com> References: <479F74CB.7040801@optaros.com> Message-ID: <47A062C7.3080503@wyona.com> Evaldas Taroza schrieb: > Hi, > > I stumbled on a code line like this: > > > > Can anyone explain how does it work? I don't understand what goes > after /resource-types/.... hi evaldas this path points to the prototype.js which is located in the the htdocs directory of the resource-type gallery. each resource-type can have it's own files which are accesible via ${yanel.back2realm}${yanel.reservedPrefix}/resource-types/{resource-type-namespace}::{resource-type-name}/prototype.js HTH simon > > Thanks, > > Evaldas > From michael.wechner at wyona.com Thu Jan 31 00:36:47 2008 From: michael.wechner at wyona.com (Michael Wechner) Date: Thu Jan 31 00:35:01 2008 Subject: [Yanel-dev] Installation of FOAF realm Message-ID: <47A10A0F.1020503@wyona.com> Hi Thanks to Tonio we now have a much improved instruction list how to install the FOAF realm http://foaf.wyona.org/developers.html Hope this will help to get people started more easily with Yanel and the FOAF realm Thanks Michi -- Michael Wechner Wyona - Open Source Content Management - Yanel, Yulup http://www.wyona.com michael.wechner@wyona.com, michi@apache.org +41 44 272 91 61