Re: HSSF Cocoon Serializer ( XML to XLS )
Look at {cocoon_home}\src\blocks\poi\samples for the sitemap behind these samples. And this question really should be asked on the cocoon-user list. Regards, Rogier On 6/27/07, Chan Mei Theng [EMAIL PROTECTED] wrote: Hi, I can only see hello.xls file. Any sample java program ? I need it urgently as the deadline is around the corner. Thanks Regards Chan Mei Theng Technical Developer m: +6012 488 4484 t: +603 2163 7233 f: +603 2163 8233 [EMAIL PROTECTED] www.pocketgroup.co.uk skype ID: mtchan48 Experts in mobile content and services -Original Message- From: Jeroen Reijn [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 27, 2007 5:03 PM To: dev@cocoon.apache.org; dev@cocoon.apache.org Subject: RE: HSSF Cocoon Serializer ( XML to XLS ) Hi Chan Mei, yes you can find it in the samples of Cocoon. See an example at http://cocoon.zones.apache.org/demos/release/samples/blocks/poi/welcome Cocoon uses POI for this. Kind regards, Jeroen Reijn -Original Message- From: Chan Mei Theng [mailto:[EMAIL PROTECTED] Sent: Wed 27-6-2007 10:00 To: dev@cocoon.apache.org Cc: Subject:HSSF Cocoon Serializer ( XML to XLS ) Hi, Any sample code on how to use HSSF Cocoon Serializer to convert XML to XLS ? Thanks Regards Chan Mei Theng Technical Developer m: +6012 488 4484 t: +603 2163 7233 f: +603 2163 8233 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.pocketgroup.co.uk/ www.pocketgroup.co.uk skype ID: mtchan48 Experts in mobile content and services
Re: HSSF Cocoon Serializer ( XML to XLS )
or go to http://poi.apache.org/ for the project behind the code used in the serializer On 6/27/07, Rogier Peters [EMAIL PROTECTED] wrote: Look at {cocoon_home}\src\blocks\poi\samples for the sitemap behind these samples. And this question really should be asked on the cocoon-user list. Regards, Rogier On 6/27/07, Chan Mei Theng [EMAIL PROTECTED] wrote: Hi, I can only see hello.xls file. Any sample java program ? I need it urgently as the deadline is around the corner. Thanks Regards Chan Mei Theng Technical Developer m: +6012 488 4484 t: +603 2163 7233 f: +603 2163 8233 [EMAIL PROTECTED] www.pocketgroup.co.uk skype ID: mtchan48 Experts in mobile content and services -Original Message- From: Jeroen Reijn [mailto:[EMAIL PROTECTED] ] Sent: Wednesday, June 27, 2007 5:03 PM To: dev@cocoon.apache.org; dev@cocoon.apache.org Subject: RE: HSSF Cocoon Serializer ( XML to XLS ) Hi Chan Mei, yes you can find it in the samples of Cocoon. See an example at http://cocoon.zones.apache.org/demos/release/samples/blocks/poi/welcome Cocoon uses POI for this. Kind regards, Jeroen Reijn -Original Message- From: Chan Mei Theng [mailto:[EMAIL PROTECTED] ] Sent: Wed 27-6-2007 10:00 To: dev@cocoon.apache.org Cc: Subject:HSSF Cocoon Serializer ( XML to XLS ) Hi, Any sample code on how to use HSSF Cocoon Serializer to convert XML to XLS ? Thanks Regards Chan Mei Theng Technical Developer m: +6012 488 4484 t: +603 2163 7233 f: +603 2163 8233 mailto: [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.pocketgroup.co.uk/ www.pocketgroup.co.uk skype ID: mtchan48 Experts in mobile content and services
Re: FYI: Ohloh.net is evolving
couldn't resist: on google maps there's a link to this page which has: http://maps.google.com/?ie=UTF8ll=52.37518,4.907455spn=0.28379,0.508118z=11om=1 an ll parameter containing lat long On 6/27/07, Peter Hunsberger [EMAIL PROTECTED] wrote: On 6/27/07, Torsten Curdt [EMAIL PROTECTED] wrote: On 27.06.2007, at 16:03, Peter Hunsberger wrote: On 6/27/07, Ralph Goers [EMAIL PROTECTED] wrote: Click on Managing your details. Basically, you need to create a file in committers/info as apacheid.rdf where apacheid is your apache userid. You can look at other people's files there or you can use the tool at http://people.apache.org/foaf/foafamatic.html. I do have a FOAF file that has been committed. The more challenging part seems to be how to determine longitude and latitude for a location... Ehm? Google Maps/Earth? ;) Google Maps doesn't seem to do it. OTOH, http://www.lat-long.com/ get's me close enough; new info comitted :-) Didn't think of Google Earth (and I do have it installed)... -- Peter Hunsberger
Re: FYI: Ohloh.net is evolving
I'm sorry, that wasn't very clear. I meant to say: on google maps, first go to the location you want, then click on the link that says link to this page (above the map on the right), and it will show you a link like the one below. On 6/27/07, Peter Hunsberger [EMAIL PROTECTED] wrote: On 6/27/07, Rogier Peters [EMAIL PROTECTED] wrote: couldn't resist: on google maps there's a link to this page which has: http://maps.google.com/?ie=UTF8ll=52.37518,4.907455spn=0.28379,0.508118z=11om=1 an ll parameter containing lat long So if you already know the latitude and longitude you can display it? How do you get to show the latitude and longitude if you don't already know it? -- Peter Hunsberger
Re: Failed to run webapp
Gustavo, This error was reported before, see http://article.gmane.org/gmane.text.xml.cocoon.devel/73632 . It happens because cocoon.xconf includes other xml files and the xml parser barfs when it encounters a doctype. I had the same problem running with Java 6, but not with Java 5. The exact cause probably has to do with different (default versions of) xml parsers in the different jdks, but I haven't had time to look at it. For now the work-around seems to delete the doctype definition ![DOCTYPE ... ] from both cocoon.roles and sitemap-language.xml (and possibly other configuration files) Rogier On 6/23/07, Gustavo N. Fernandes [EMAIL PROTECTED] wrote: Forgot to mention the error: -- Caused by: org.apache.avalon.framework.configuration.ConfigurationException: Cannot load 'jar:file[...]/cocoon-core-2.2.0-RC2 SNAPSHOT.jar!/org/apache/cocoon/cocoon.roles [...] Caused by: org.gjt.xpp.XmlPullParserException: ![DOCTYPE declarations not supported at line 32 and column 3 seen ...TA #REQUIRED\r\n class CDATA #REQUIRED\r\n\r\n]... (parser state UNKNONW_EVENT (-1)) -- The following patch allows to runs the webapp: Index: core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles === --- core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles (revision 549992) +++ core/cocoon-core/src/main/resources/org/apache/cocoon/cocoon.roles (working copy) @@ -23,7 +23,8 @@ !ATTLIST role-list cocoon-version CDATA #IMPLIED !ATTLIST role name CDATA #REQUIRED - shorthand CDATA #REQUIRED + shorthand CDATA #IMPLIED + model CDATA #IMPLIED default-class CDATA #IMPLIED !ATTLIST hint shorthand CDATA #REQUIRED It seems core/cocoon- core/src/main/resources/org/apache/cocoon/cocoon.roles is not valid according to the DTD that is declared in the header. This gives an error when trying to run cocoon webapp: []s Gustavo No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.9.4/860 - Release Date: 21/6/2007 17:53
Filesource questions
Hi, I think org.apache.excalibur.source.impl.FileSource is acting strange when handling temp files: - instead of using File.createTempFile(), it creates a temp file like this: // Create a temp file. It will replace the right one when writing terminates, // and serve as a lock to prevent concurrent writes. File tmpFile = new File(getFile().getPath() + .tmp); - furthermore, presumably because of the lock function mentioned in the comment above, it checks for an existing temp file, and throws a concurrent modification exception when it exists. The problem I'm having is that sometimes a .tmp file won't be removed after use. The next time it tries to create a file by the same name, FileSource will throw a concurrent modification exception, and refuses to write. Of course, at that point there is no other process writing the file. There is one other thread[1] where this behaviour is mentioned - when Gianugo was working on flow/webdav - it doesn't seem to have been resolved however . Finally - as an aside - is it really necessary to have Excalibur provide FileSource and factory? A quick browse through cocoon.xconf shows that there are only a few ( albeit very essential ) components that live in excalibur. From my point of view it hinders the transparency of Cocoon - I can't see straight away what filesource does and where it goes wrong. Imho it would be better to have Impl's in cocoon packages, even if the interface lives somewhere else. WDYT? Rogier [1] http://marc.theaimsgroup.com/?l=xml-cocoon-devm=105966223522106w=2
[OT]MoonEdit collaborative editor
Some time ago there was a discussion about collaborative editors other than SubEthaEdit which is OSX only. It seems that MoonEdit ( http://moonedit.com/ ) is a multiplatform SubEthaClone that does just that. No Rendezvous autodiscovery, but it does have a server-mode to share a whole directory at once. Not open source but free for non-commercial use. Rogier
Re: Copying files with a transformer?
Hoi Geert, Copying as a side effect of a transformation is somewhat of an antipattern - iirc. OK, now that i'm reading more closely I see what you want - use the xml in the pipeline as a kind of script that does the copying. I don't think there's a transformer like that yet. Maybe you could even make an AntTransformer, so you can reuse Ant's copy/move/zip/etc. functionality. Of course you're still in the side effect transformation trap. Another way would be calling helper classes from flowscript. Again you can use Ant classes: I did something similar with an array of files returned by the Ant DirectoryScanner, which gives you a lot of filtering and wildcards-operations for free. Groet Rogier Geert Josten wrote: Hi all, I'm new to this list, so forgive me if I'm blunt or off-topic.. On the Cocoon users mailing list, there were some questions about copying files. We came up with solutions like using the copy-source actor, flowscript or perform an include and write it again using sourcewritingtransformer. I personally like the transformer alternative, sounds more dynamic to me than the others. But including and serializing requires generating SAX out of the source and streaming it again. One might be able to do this even with binary files, but wouldn't it be nicer to for instance allow the sourcewritingtransformer take a 'src' feature? (as an alternative to the 'fragment' feature, or as an attribute of the fragment element?) Or have I simply overlooked a transformer that already provide this kind of functionality? Cheers, Geert
[OT]Re: [RT] How scripting made me hate java
quoting Stefano Mazzocchi [EMAIL PROTECTED]: Greg Weinger wrote: This may be way off course, but have you thought about a Cocoon in Squeak? The thought must have crossed a lot of minds - but I don't actually know of success-stories of the project-X-based-on-project-Y-but-in-a-different-language No and I'm *NOT* rewriting 4 million lines of code (cocoon + all the libraries it depends on!) in another language, thanks. But maybe an interesting question would be: how would cocoon be different when written in another language. Would you need an XML sitemap if you could just write your sitemap in a dynamic language? Not completely relevant link, by way of Bruce Eckel: http://osteele.com/archives/2003/08/test-versus-type
Cocoon based CMS
Hi, I just noticed that on the page http://www.mail-archive.com/users@cocoon.apache.org/msg23042.html the topmost Google ad says: Apache Cocoon-Based CMS XML content management system based on Apache Cocoon. Try it now. www.HannonHill.com Since I didn't know the company I went to their site and though they have a product called ContentXML there's no mention of Cocoon anywhere. My questions: - does anyone know who's behind HannonHill / any experience with the product - to me this isn't really playing nice - is it legal? regards, Rogier
Re: jx:attribute
Quote Leszek Gawron [EMAIL PROTECTED]: Jorg Heymans wrote: Have you tried using Castor ? You mean replace the XMLBeans implementation with a castor based one? I don't see how this would solve my initial problem though, is there some castor specific functionality you had in mind? (i've never used Castor) Me too but my understanding is that Castor is able to map any bean to XML (based on a mapping configuration file). There's a castor transformer in the scratchpad. What it does is either marshalling a bean to an xml-fragment in your pipeline, or unmarshalling by taking sax-events and creating a bean from that. I only needed the unmarshalling part, and it was really buggy, but I suspect that's because only the marshalling was tested. Don't know for sure though, it's scratchpad after all ;). The mapping file is reasonably simple, and it should also work without a mapping, especially for marshalling. I don't know zip about XMLBeans. From the name I would assume it is possible to use the custom transformer approach the way CastorTransformer does. Rogier
[OT]Article on AOP/Spring
OnJava.com has a (quite relevant) article on Spring: http://www.onjava.com/pub/a/onjava/2004/10/20/springaop2.html
Re: VMWare host for us @apache.org
Bertrand Delacretaz wrote: Le 22 oct. 04, à 12:23, David Crossley a écrit : snip/ What's needed IMHO is the big bag of docs with powerful search functions that we talked about before (http://marc.theaimsgroup.com/?l=xml-cocoon-devm=106586497031048w=2 for example). If we agree on this, the next step would be to evaluate Forrest against our needs and find out the simplest thing that would work. Maybe Forrest using a live SVN repository, live Lucene indexing and mod_cache in front would be all what we need? Although I agree completely that it's the accessability, not the quality of the documentation that is lacking, i can't help but hearing echoes of the GT cms-shootout ( bag of docs; heavy on search ). Why use forrest and not daisy or hippo? Rogier
Re: VMWare host for us @apache.org
Bertrand Delacretaz wrote: Le 22 oct. 04, à 13:29, Rogier Peters a écrit : ...Although I agree completely that it's the accessability, not the quality of the documentation that is lacking, i can't help but hearing echoes of the GT cms-shootout ( bag of docs; heavy on search ). Why use forrest and not daisy or hippo? I wanted to put Forrest as the first option for loyalty reasons, as the Forrest team has helped us a lot until now. But there are many options of course. But at this point we should be careful not to fall into the trap of discussing tools before agreing on the problem. -Bertrand You're right, actually I replied before reading
Re: VMWare host for us @apache.org
Rogier Peters wrote: Bertrand Delacretaz wrote: Le 22 oct. 04, à 13:29, Rogier Peters a écrit : ...Although I agree completely that it's the accessability, not the quality of the documentation that is lacking, i can't help but hearing echoes of the GT cms-shootout ( bag of docs; heavy on search ). Why use forrest and not daisy or hippo? I wanted to put Forrest as the first option for loyalty reasons, as the Forrest team has helped us a lot until now. But there are many options of course. But at this point we should be careful not to fall into the trap of discussing tools before agreing on the problem. -Bertrand You're right, actually I replied before reading oops, and then I pressed send before completing. before reading the whole discussion that is. Rogier
Invalid content length, revisited
Guys, On 18/5 Joerg asked a question about invalid content length errors[1] due to readers. There is also a bug that is somewhat related[2], but it seems to be WONTFIX. I have the following case : generatorreader | | validator .. dtd | serializer In this case the reader sets the content-length, and the serializer doesn't. So if the length of the serializer's output is greater than that of the dtd, output is incomplete. Althoug a quick fix is not to get the dtd through a reader, I'm sure there are cases where that isn't a solution. I didn't post this as a bug, yet, because I am not sure whether this is just unintended use of the reader. Also, I can't quite get my mind around what's the best way to solve this. Joerg suggested in his original mail[1] to build some awareness in to the reader to see if it is called as a cocoon-source or not. Another possible solution would be setting content-length from all serializers, although Carsten suggests in the closing of the bug that content-length can not be set repeatedly. OTOH I tried to reproduce this behaviour by getting an XSL through a reader, like so: map:match pattern=read.xsl map:read src=tiny.xsl/ /map:match map:match pattern=readtest.xml map:generate src=sitemap.xmap/ map:transform type=xslt src=cocoon:/read.xsl/ map:serialize type=xml/ /map:match But apparently the xsl-transformer doesn't like that. Any thoughts? Rogier [1] http://marc.theaimsgroup.com/?l=xml-cocoon-devm=108491735914313w=2 [2] http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17370
Re: rich clients in Flash with Cocoon?
Forgive me for promoting the non-free solution, but I've always thought that Macromedia's own flex[1] is a very nice solution, being java-based and all. For those who don't know, the short is that it takes an xml dialect and renders it to a Flash UI. It should make a nice frontend for cocoon-generated xml. So I'll offer a cigar to the first person who makes a cocoon-forms to macromedia flex serializer. [1]http://www.macromedia.com/software/flex/solutions/developers/ Sylvain Wallez wrote: This has been blogged here and there: Laszlo [1], a servlet-based platform to produce rich clients in Flash from XML+javascript descriptions has gone opensource yesterday. I invite you to have a look at the demos, and try out the one called XML editor where you can put your hands on what looks like a really nice thing. As Bertrand says [2] the first person to write a Cocoon serializer and samples for Laszlo gets a very large glass of their favorite drink. Hurry up! Sylvain [1] http://www.openlaszlo.org/ [2] http://codeconsult.ch/bertrand/archives/000380.html
1060 NetKernel: virtual Internet operating system, XML runtime
Take a look at http://www.1060.org/ I really don't know what to make of this - lots of hot air - and a lot of similarities to Cocoon ( i vaguely remember a discussion about Cocoon as an operating system, which was quickly discarded :) ) They do compare themselves to cocoon: http://www.1060.org/netkernel/features/#analogy The serverside has a blurb: http://www.theserverside.com/home/thread.jsp?thread_id=21796 With kind regards / Met vriendelijke groeten, Rogier Peters - Content Management Department Hippo Webworks Rogier(at)hippo(dot)nl / www.hippo.nl
RE: Related Documents, MapTransformer and Topic Maps
-Original Message- From: Upayavira [mailto:[EMAIL PROTECTED] Conal Tuohy wrote: Rogier Peters wrote: snip/ I've done some experimental work with Topic Maps in Cocoon - using XSLT to harvest TMs from other data sources, merge them, and then to render them as web pages with related links. See for example http://www.nzetc.org:8080/tm/corpora.html for a TM-based view of some of our website that shows some of these relations but virtually no actual content (warning: it's very slow). I think the technology holds a lot of promise, and could be particulaly useful in things like Forrest, but we will need some extra components before they will be readily used in Cocoon, particularly a TopicMapMergeTransformer, and some kind of TM-oriented templating transformer for rendering. I haven't had a chance yet to deal with it, but it's on my list of things to do :-) By the way, did you realise that the tm4j project actually already includes some Cocoon components? No, I didn't - thanks for the info. Forgive me if the following is a little hazy ;) I've seen some sites useing topicmaps as site structure - and I recall reading about some basic topicmap implementation for websites. But I was thinking more of topicmaps as a general repository of topics and relations, queryable by sitemap components - hence the TopicMapTransformer. Maybe it would even be possible to create on-the-fly queries. Something like, when looking at a webpage about a book, you can say: I want to see webpage on other books in the same genre but not by the same author and published after 2002. TopicMapTransformer then queries topic map and shows results. Some may say: if you want to express relations why not use a relational database, but I like the abstraction (tm4j runs on a hibernate backend, too), plus it's xml. Cheers Con The chap leading a project (probably that one) on topic maps was active on the Forrest-dev list recently. Regards, Upayavira OK, I'll browse through the archives there
Related Documents, MapTransformer and Topic Maps
Hi all, We have a client who required a website with a related document function. This means that each document in a collection contains keywords, and when the document is displayed, it also shows a list of other documents that contain one or more of the same keywords. There are a lot of documents in this collection, and although they are stored in an XML database, I didn't really feel like querying them in real-time. I really wanted something lean and mean. So in XP fashion, I picked the simplest datatype to express relations, java.util.Map, and went from there. The keys in the map are the keywords from the document collection, the values it returns are URLs pointing to the documents that contain this keyword. So I ended up with two components: - MapManager - initializes one or more maps from a ( cocoon ) xml-source, which is constructed according to a specific DTD. The datatype stored in the map can currently be one of String, Set or SortedSet ( in case results are sorted by relevance ). - MapTransformer - looks for key elements in a specific namespace, and transforms the value(s) returned by the map into the key element. The names are a little confusing because the use of 'map' in cocoon usually refers to the sitemap, but a change is just a simple refactoring away. If anyone is interested in this functionality I'd be happy to donate it. If you think this is not the right way, or there are other ways to do this in Cocoon, let me know. --- [RT] I tried to make this mapping very generic. It could be keyword related document, keyword explanation, document related document, or url metadata. A first extension would be keys with wildcards or RE's although that would force me to loose the map model. Googleing xml and relations quickly brought me another subject that I haven't seen discussed much here - XML topic maps. On of the big advantages of topic maps over my simple mapping is the amount of semantics that topic maps allow. Topic maps allow one thing to be related to another, and also describe what the one thing is, what the other thing is, and what kind of relation they have. So the next step would be to implement a topic map transformer. There is a apache-license topic map project at http://sourceforge.net/projects/tm4j. I'm definitely going to look into it myself, but need to do some reading first, and I would like to discuss it. By the way, if you don't like topic maps, I would like to know too - I wasn't able to find any criticism on the matter (googleing 'why topic maps are bad' or 'topic maps suck' didn't help) With kind regards / Met vriendelijke groeten, Rogier Peters - Content Management Department Hippo Webworks Rogier(at)hippo(dot)nl / www.hippo.nl