Re: Getting started again...
Ok, I got cocoon-trunk running. Just had to run mvn install about 10 times (I hope end users won't have to use Maven). Most things work, but quite a few of the samples I'm interested in are broken (CForms: Bindings, SQL access, Cocoon suggests; User Preferences). Now, I'm trying to go through the tutorial at [1] and I'm getting an error when trying to use maven to create a block skeleton: Failed to resolve artifact. GroupId: org.apache.cocoon ArtifactId: cocoon-archetype-block Version: 1.0-SNAPSHOT Reason: Unable to download the artifact from any repository I can't really find anything in the list archives yet about this. I'm not sure if the docs are out of date and the command given is wrong or what. Any idea? All this new stuff, especially Maven is going to take some time to learn. My first thought after getting the build working was "great, it works, but now what?". I obviously can't just go in and hack away at sitemaps and toss in files like I was used to because this version will get overwritten next time I build with Maven. It looks like I want to create a block, and that's my site/app right? I guess the docs are behind development... can anyone give me some guidance here? Thanks, Justin On Jul 7, 2006, at 3:09 PM, Grzegorz Kossakowski wrote: Justin Fagnani-Bell napisał(a): I suppose that's a 2.2 block? I see no docs mentioning it. Yes, it's 2.2 block, docs can be found here: http:// cocoon.zones.apache.org/daisy/documentation/864/751.html It is now the place where docs are baked up. Feel free to improve them as there is much room to shine ;) That's fine with me, it's a better separation of V and MC, I just always hated having to really struggle to get XSL to give me the output I wanted when I could do it much easier in Java. Things like tables, ordering, color-coding, grouping, etc. Jeni Tennison's XSL pages helped a lot, but that experience made me appreciate have a full programming model at my disposal, not a chosen subset implemented by the template language. And XSL's very powerful compared to most template languages out there. I guess I'll see with JXTemplate... I see your point and agree with that. JX enable you to pull your data from model into XML in very convenient yet powerful way. There are loops for iteration, ifs and chooses. But JX doesn't try to pull data from e.g. database, it demands flowscript/javaflow to prepare POJOs (or even simple one array) which became source of the data to be pulled. I think it is good design and as you said better separation. I've been following the dev mailing list for a little while, trying to get a handle on where Cocoon is heading. I had to get started though, and seeing how some of the devs had a hard time getting 2.2 up and running I thought I'd go with 2.1.9. It may sound quite weird but for me it seems that C2.2 is much easier to run for newcomer than for developer. See my [1] and Patrick's [2] mails. Developers have hard time getting 2.2 because maven has some issues with getting updates into account. The best is to try for your own! More people testing, fixing some urgent issues means greater chance for M1 released soon. I found myself running most of the CForms samples running fine. This is a proof that 2.2 is not in chaos as CForms is quite complicated beasts and exploits many parts of Cocoon. PS. Yes, I'm making some buzz about 2.2 but only because I think it's worth it. [1] http://thread.gmane.org/gmane.text.xml.cocoon.devel/65196/ focus=65225 [2] http://thread.gmane.org/gmane.text.xml.cocoon.user/57038/ focus=57052 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting started again...
Sweet, I didn't really know about Daisy. That helps a lot. I'm installing Maven and 2.2, and we'll see how that goes. Thanks, Justin On Jul 7, 2006, at 3:09 PM, Grzegorz Kossakowski wrote: Justin Fagnani-Bell napisał(a): I suppose that's a 2.2 block? I see no docs mentioning it. Yes, it's 2.2 block, docs can be found here: http:// cocoon.zones.apache.org/daisy/documentation/864/751.html It is now the place where docs are baked up. Feel free to improve them as there is much room to shine ;) That's fine with me, it's a better separation of V and MC, I just always hated having to really struggle to get XSL to give me the output I wanted when I could do it much easier in Java. Things like tables, ordering, color-coding, grouping, etc. Jeni Tennison's XSL pages helped a lot, but that experience made me appreciate have a full programming model at my disposal, not a chosen subset implemented by the template language. And XSL's very powerful compared to most template languages out there. I guess I'll see with JXTemplate... I see your point and agree with that. JX enable you to pull your data from model into XML in very convenient yet powerful way. There are loops for iteration, ifs and chooses. But JX doesn't try to pull data from e.g. database, it demands flowscript/javaflow to prepare POJOs (or even simple one array) which became source of the data to be pulled. I think it is good design and as you said better separation. I've been following the dev mailing list for a little while, trying to get a handle on where Cocoon is heading. I had to get started though, and seeing how some of the devs had a hard time getting 2.2 up and running I thought I'd go with 2.1.9. It may sound quite weird but for me it seems that C2.2 is much easier to run for newcomer than for developer. See my [1] and Patrick's [2] mails. Developers have hard time getting 2.2 because maven has some issues with getting updates into account. The best is to try for your own! More people testing, fixing some urgent issues means greater chance for M1 released soon. I found myself running most of the CForms samples running fine. This is a proof that 2.2 is not in chaos as CForms is quite complicated beasts and exploits many parts of Cocoon. PS. Yes, I'm making some buzz about 2.2 but only because I think it's worth it. [1] http://thread.gmane.org/gmane.text.xml.cocoon.devel/65196/ focus=65225 [2] http://thread.gmane.org/gmane.text.xml.cocoon.user/57038/ focus=57052 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting started again...
Thanks for the reply Grzegorz, Have you seen BricksCMS? [1] It is basically showcase for CRUD operations done quite easily in Cocoon. I'm checking that out right now. XSP is being replaced by Template block. I suppose that's a 2.2 block? I see no docs mentioning it. It is refactored and extended version of JX templates (syntax is pretty the same) which was back-ported into 2.1.x branch in 2.1.9 AFAIR. Speaking more precisely, Template cannot do everything XSP did. For example there is no ESQLequivalent in Template. Thus this responsibility has been carried to Flowscript/Javaflow. So flowscript have to prepare model for a view. That's fine with me, it's a better separation of V and MC, I just always hated having to really struggle to get XSL to give me the output I wanted when I could do it much easier in Java. Things like tables, ordering, color-coding, grouping, etc. Jeni Tennison's XSL pages helped a lot, but that experience made me appreciate have a full programming model at my disposal, not a chosen subset implemented by the template language. And XSL's very powerful compared to most template languages out there. I guess I'll see with JXTemplate... As there is the desire of devs to release first milestone of the most fundamental parts[2] of Cocoon 2.2 it seems reasonable to consider 2.2 not 2.1x branch. Also... I've been looking into Spring and Tuscany to help with data access and exposing web services. Should I try to get started with Cocoon 2.2? Spring... Spring + Hibernate alternative way of handling data to that showed in BricksCMS. It demands more time for learning but it's more powerful. Also you should know that Spring became default component container in 2.2 so integration is pretty good and tight. So yes, Spring is the way to go for the future. I've been following the dev mailing list for a little while, trying to get a handle on where Cocoon is heading. I had to get started though, and seeing how some of the devs had a hard time getting 2.2 up and running I thought I'd go with 2.1.9. If 2.2M1 really is coming out soon, and is somewhat usable, I'd rather go with that. Spring is a big plus and I think the only functionality I need is flow, templates, and maybe forms. Ok, well thanks for the advice. -Justin PS. Arrgh. I sent this first from the wrong email and I hoped the moderator would catch it. Sorry for the double email. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: Getting started again...
Hi, I just sent a message form the wrong account, and resent from the correct one. Please disregard the first message. Thanks Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting started again....
Hi, This is probably my 3rd email on the same subject in the past few years, and I'm sure you get these all the time, but it seem things haven't gotten much easier, so please excuse me... I used Cocoon quite a bit in the 1.x days, and was quite comfortable with XSP, Actions, Generators, etc... Cocoon's changed a lot since then, and I can't seem to find a clear starting path with the new technologies. I'm starting a completely new site/application from scratch. So I'm looking to start right and with the methods that will carry forward into Cocoon 2.2/3.0. At first I'm trying to do some very basic CRUD operations on my database. Before I would use POJOs for the model, Actions for the controller, and XSP for the view, all using an abstracted database access layer (that used JDBC). It all seemed pretty simple and made a lot of sense to me. These days XSP is deprecated, Actions might be too, and there's a plethora of data access frameworks. I know Flow replaces Actions, but what replaces XSP? XSP is still all over the user documentation and tutorials. I'm assuming it's some sort of combination of CForms, JX templates, and maybe Velocity? There's a ton a samples and obviously many ways to do things, but is there one set of "sanctioned" components/methods to use when starting a new Cocoon app? I guess my biggest question is about views really. I see only two pages in the docs talking about JX. The flow docs still talk about possibly using XSP with the JXPath logicsheet. Is XSP still fine to use since I'm used to it? Is JX the way to go? Is Velocity better because it's used in other projects? I tend to do some pretty complicated logic on the view side of things (not messing with the model or controller side) and like the expressiveness of having all of Java at my fingertips, so I'm a little wary of a restricted template for the view. Also... I've been looking into Spring and Tuscany to help with data access and exposing web services. Should I try to get started with Cocoon 2.2? Thanks a lot for any help Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting started again...
Hi, This is probably my 3rd email on the same subject in the past few years, and I'm sure you get these all the time, but it seem things haven't gotten much easier, so please excuse me... I used Cocoon quite a bit in the 1.x days, and was quite comfortable with XSP, Actions, Generators, etc... Cocoon's changed a lot since then, and I can't seem to find a clear starting path with the new technologies. I'm starting a completely new site/application from scratch. So I'm looking to start right and with the methods that will carry forward into Cocoon 2.2/3.0. At first I'm trying to do some very basic CRUD operations on my database. Before I would use POJOs for the model, Actions for the controller, and XSP for the view, all using an abstracted database access layer (that used JDBC). It all seemed pretty simple and made a lot of sense to me. These days XSP is deprecated, Actions might be too, and there's a plethora of data access frameworks. I know Flow replaces Actions, but what replaces XSP? XSP is still all over the user documentation and tutorials. I'm assuming it's some sort of combination of CForms, JX templates, and maybe Velocity? There's a ton a samples and obviously many ways to do things, but is there one set of "sanctioned" components/methods to use when starting a new Cocoon app? I guess my biggest question is about views really. I see only two pages in the docs talking about JX. The flow docs still talk about possibly using XSP with the JXPath logicsheet. Is XSP still fine to use since I'm used to it? Is JX the way to go? Is Velocity better because it's used in other projects? I tend to do some pretty complicated logic on the view side of things (not messing with the model or controller side) and like the expressiveness of having all of Java at my fingertips, so I'm a little wary of a restricted template for the view. Also... I've been looking into Spring and Tuscany to help with data access and exposing web services. Should I try to get started with Cocoon 2.2? Thanks a lot for any help Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to convert a hierarchical structure to xml in java?
Helma, I don't know that there's anything you can do about that, unless you want your helper class to also generate SAX events. Even if you created a DOM structure it would have to be traversed to generate a SAX stream. How big is this structure? Is traversing it twice that bad? Justin On Dec 18, 2003, at 7:43 AM, [EMAIL PROTECTED] wrote: Hi, I'm in the middle of building an XSP page that can retrieve information from my CORBA-based server. I'm now writing a helper class in Java that can take the output of the server and transform it into something I can easily manage in the XSP page. However, I'm stuck. The results are in a hierarchical structure based on Vector and String or String[]. I want to manipulate this before returning it to the XSP page, but I don't want to traverse the structure for the manipulation and then once more in the XSP page to build the XML. Can anyone help? Bye, Helma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: How do you use CVS?
Yeah I saw that. There's a lot to learn as a newbie to CVS. What I did for now was use the -kb option so that CVS didn't tranlate line breaks or do any keyword substitution. After reading about keyword substitution though I'm thinking that it could be used with XSP to give you version numbers. The point made about using disc space on binaries since CVS can't store the diffs is a good one. I think I'll reorganize my directories so I don't have binary files and text file mixed in the same dir. Thanks, Justin On Dec 17, 2003, at 6:00 PM, Ryan Hoegg wrote: CVSROOT/cvswarappers http://www.cvshome.org/docs/manual/cvs-1.11.10/cvs_18.html#SEC164 Morley Howell wrote: Regarding CVS, you should be able to check in a directory with mixed binary and text files. There's a file you can edit in the CVSROOT (can't remember which file) that lets you configure CVS to recognize which files are binary by their extension. Morley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: How do you use CVS?
On Dec 16, 2003, at 4:37 PM, Geoff Howard wrote: I don't understand the question. Just check everything into cvs. If a file is binary, just make sure you check it in as such. WinCVS and other gui clients give easy ways to do that without really knowing too much about cvs. I guess I'm asking if it's a bad idea to store all 30+ MBs of JAR files in CVS. I don't really have control over their revisions, but I guess making a release with certain JARs is the point, right? And in some directories I have a mixture of text files and binaries, so I won't be able to check in the whole directory, I'll have to check in each file individually. -Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: How do you use CVS?
I'm just now starting to setup CVS for my Cocoon based projects and I'm wondering how other Cocoon users use CVS. My project directory structure is probably similar to others using Cocoon and Ant. It's something like this: Project - build.sh - build.xml - etc - - cocoon.xconf (and others) - lib - src - web - - (various files and directories, some text and some binary) I'd need to put at least src/ and two dirs under web/ (stylesheets and xsp's) into CVS, but I'd actually like to just import the whole project. I'm not so sure what to do about the JAR's in lib/ and the graphics under web/ What are others doing out there? And are you integrating CVS with Ant? Thanks a bunch, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cocoon 2.1.3 crashes Tomcat
Derek, I've always had many problems getting new versions of Cocoon and Tomcat to cooperate because of .jar file incompatabilities. Usually this will just cause Cocoon to not start, not Tomcat, so I don't know if this is the same type of problem that you're having. First of all check out the wiki. There's a page there detailing problems with installing Cocoon on various servlet containers. Unfortunately I can't find it right now, maybe someone else can point it out. Basically Tomcat comes with xalan and the xml apis and so does Cocoon. Cocoon 2.1.3 has newer, and possibly incompatible, versions of these, so you need to replace the tomcat .jars with the Cocoon ones. I would try to upgrade to the latest release of Tomcat also. HTH, Justin On Dec 3, 2003, at 10:02 PM, Derek Hohls wrote: I am running Windows XP, using JDK1.3 and Tomcat 4.0.4 I have just managed my first build of Cocoon 2.1.3 (thanks Geoff and Stavros!). However, when I deploy the Cocoon war to the Tomcat webapps directory, Tomcat will no longer start up properly. The files appear to be expanded properly, creating the Cocoon WEB-INF and all the other folders. However, when I make the first call to http://localhost:8080/ the error message that I get is in the form of a dialog box which tells me: Runtime Error! Program: c:\tomcat\bin\tomcat.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. As soon as I remove the war file and the new directory structure, the problem goes away and Tomcat starts and runs normally. There is no obvious message in the Tomcat log files and it seems the fault occurs without any log entry for it. (There is also no 'logs' directory in the WEB-INF folder for Cocoon.) Any help appreciated with this! Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XMLizing your business obejcts
Obviously, the petstore.item class does not know where its data is coming from or going. So in short I think you are looking for flow :) JD Well, I can't use flow for other reasons, but the idea is applicable: a bean->xml class where you specify the attributes to be printed. I think I'll check out the XML binding tools that Marco pointed to first. -Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: XMLizing your business obejcts
No, but I will. thanks. On Nov 14, 2003, at 5:55 PM, Marco Rolappe wrote: hi justin, did you have a look at XML binding tools, like Castor, Betwixt, ..? As I'm rethinking the object-persistence persistence for my web app, I'm also looking for a better way to output XML from my java objects. Can't really find much on the wiki. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XMLizing your business obejcts
As I'm rethinking the object-persistence persistence for my web app, I'm also looking for a better way to output XML from my java objects. Can't really find much on the wiki. Currently the XML is output in my presentation layer (something like XSPs), but this is leading to too much copy-and-paste and not enough reuse right now. Let's use a shopping cart system as an example. We'll have classes like Customer, Order, Product, and pages or views like ViewProduct, ListProducts, EditProduct. For each of the views I need basically the same XML representation of the product (though I may want a stripped down version for the list). Right now I have code in each view that's something like: product.getID() product.getCode() I'd rather just say something like product.printXML(contentHandler), or MyUtilityClass.printXML(product) but I have issues with every way, so I'm wondering what the Official Cocoon Best Practices are... I see a few basic methods and variations to accomplish this: 1) The class outputs the XML to a ContentHandler This method is nice and clean, but I have a problem with the class outputing the XML. I just don't think the application object should be concerned with the presentation layer. In the next few months I'll be working on a project where the business objects are already implemented (i'm just creating a new front end) and I want to apply my method there. 1a) A subclass handles the XML output. This seems cleaner to me than 1) since the base class doesn't have to know about XML, but it seems like some problems could crop up. First you won't always know that you're getting an XML enabled class from certain methods. If my persistance layer knows to instantiate the XML capable classes then things are fine, but if one of the business obejcts constructs another business object using the base class then things break. I think this method would require a contract that all business objects be created through a factory. The main advantage of 1) is that if I add a new class to the system, I implement the XML output with he class and drop it in. I don't have to modify a utility class. 2) A third class handles the output 2a) A single utility class handles output for all application classes with methods like printProduct(Product p, ContentHandler ch) Seperates the XML layer from the business objects 2b) A seperate class for each business class handles the output. Potentially lots of classes. Adding a new class requires updating of the utility class. 2c) Every business object is a Bean and you have one method that will print the properties of a bean to XML Nice and general, works for classes that aren't created with XML in mind. Could be innefficient, not every property needs to be output. Can't specify the element and attribute names. Can't specify how to handle collections. Ok, this email is getting long... so I'll wrap it up :) I know Cocoon makes use of XMLizers in some of the generators. Is this the best way to go for business objects too? I haven't fond too much information on it yet. Does it require a lookup method for finding the right XMLizer to use? Thanks ahead of time, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Anyone using OJB w/ Cocoon?
Thanks Joerg & JD, I found the wiki page seconds after I sent the email... -Justin On Nov 14, 2003, at 3:32 PM, Joerg Heinicke wrote: Recent Cocoon 2.1.3 has even an OJB block, but Antonio can you tell more about it. There is also a bit documentation available: http://wiki.cocoondev.org/Wiki.jsp?page=OJBBlock. Joerg On 15.11.2003 00:25, Justin Fagnani-Bell wrote: I'm getting tired of maintaining my own database storage code and I'm looking at O-R bridges. Apache has what seems to be a well developed project in OJB. I'm looking to see if anyone here has experience using it. I started by looking for OS JDO solutions, and found OJB that way, however the JDO implementation doesn't seem complete yet, so I was going to use their API. Don't know if that's a bad idea or not. I'm wondering how easy it is to integrate w/ cocoon. It doesn't look like it's an Avalon component. Also it uses XML relational/object mapping files. If anyone's dynamically generating those that'd be cool. Thanks, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Anyone using OJB w/ Cocoon?
I'm getting tired of maintaining my own database storage code and I'm looking at O-R bridges. Apache has what seems to be a well developed project in OJB. I'm looking to see if anyone here has experience using it. I started by looking for OS JDO solutions, and found OJB that way, however the JDO implementation doesn't seem complete yet, so I was going to use their API. Don't know if that's a bad idea or not. I'm wondering how easy it is to integrate w/ cocoon. It doesn't look like it's an Avalon component. Also it uses XML relational/object mapping files. If anyone's dynamically generating those that'd be cool. Thanks, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trying to generate the SRC attribute of eleme nt b ased on XML returned by generator.
On Thursday, November 6, 2003, at 03:51 PM, Ralph Goers wrote: You can write an input module to dynamically pass date to a transformer. How would this work? I'm using Cocoon 2.1, but still mostly use 1.x techniques. Could the input module actually access the SAX stream? -Justin Only actions can set sitemap parameters, which is how you would set the src attribute. If you can write a simple action that will create your URL and place it in the sitemap parameters then you should try that. I don't know another way to do it. I've never used flowscript, but maybe it's possible that way as well. -Justin On Thursday, November 6, 2003, at 09:15 AM, Igor Galperin wrote: Hi! I am trying to dynamically create the URL which will be set as a value of "SRC" attribute of element. The dynamic parts of the URL are some of the elements of XML returned by generator. May be somebody knows the way how to retrieve the elements of XML returned by generator and then use them to generate URL for transformer. Help me please. Thank you. Igor. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trying to generate the SRC attribute of element b ased on XML returned by generator.
Only actions can set sitemap parameters, which is how you would set the src attribute. If you can write a simple action that will create your URL and place it in the sitemap parameters then you should try that. I don't know another way to do it. I've never used flowscript, but maybe it's possible that way as well. -Justin On Thursday, November 6, 2003, at 09:15 AM, Igor Galperin wrote: Hi! I am trying to dynamically create the URL which will be set as a value of "SRC" attribute of element. The dynamic parts of the URL are some of the elements of XML returned by generator. May be somebody knows the way how to retrieve the elements of XML returned by generator and then use them to generate URL for transformer. Help me please. Thank you. Igor.
Re: How to access the ObjectModel-Map within a component?
I do this with some of my components, and as far as I know the only way to do it is to pass the ObjectModel from an Action, Transformer, or Generator. The way the component manager works though, your component will only be valid within the scope of the component you request it from (i could be wrong, but this has been my experience). So if you load your component from an action, and pass it the request, and plan on using that component in your generator as well, you'll have to set it up all over again. This is assuming you have some custom action or generator in your pipeline. If you're using off the shelf actions and generators then I don't see how you could access your component. Justin On Thursday, November 6, 2003, at 09:45 AM, Stephan Coboos wrote: Hello, I have developed a Avalon-Component (No Transformer, generator, aso.) which is accessible with the Component Manager. Within this Avalon-Component I need access to the ObjectModel to extract the Cocoon request object. But how do I get this object? Thank you! Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with identity transformations and namespaces
then I get an error saying: Namespace for prefix 'http://paraliansoftware.com/kompas/idf-1.0' has not been declared. It looks like it's mistaking the namespace for the prefix. Weird. I specified xalan as the transformer type, thinking it was XSLTC or something, but it's not. This used to work fine in 2.0.4. If I don't use an identity transformer everything is fine. any ideas? Hmm. What does your source XML look like? Is it possible that the error comes from the prefix declaration there? If not, I'd try looking at the XML between the two stylesheets (i.e. the output of the first stylesheet). You can do this using a view (URL?cocoon-view=raw, for example). HTH, Lars Thanks Lars. You're first thought was correct. It turns out I forgot about a hack I did to work around an old xalan bug. my startElement calls in my generator were like this: contentHandler.startElement(IDF_URI, "head", IDF_URI + ":head", attributes); changing the second IDF_URI to IDF_PREFIX solved the problem. I guess the bug was fixed, but this never caused a problem until yesterday when I upgraded. -Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with identity transformations and namespaces
ugh... more problems since upgrading to 2.1 Some of my source xml uses a namespace (it's mixed). The prefix is "idf" and my namespace declaration is like this: http://www.w3.org/1999/XSL/Transform"; xmlns:idf="http://paraliansoftware.com/kompas/idf-1.0";> I'm using two stylesheets in a row in my pipeline. If my first style sheet has an identity transformation like: then I get an error saying: Namespace for prefix 'http://paraliansoftware.com/kompas/idf-1.0' has not been declared. It looks like it's mistaking the namespace for the prefix. Weird. I specified xalan as the transformer type, thinking it was XSLTC or something, but it's not. This used to work fine in 2.0.4. If I don't use an identity transformer everything is fine. any ideas? thanks again, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Component getting recycled too early!
Hey list, What causes a component to be recycled? I have a pipeline with an Action and Generator that are tightly integrated. I'm trying to get them to share a DB access component. The idea is that the Action will load it from the component manager, initialize it (mainly setting the user to use to access the database), use it to to some DB stuff, then put it in the object model so that the Generator can use it. The problem is that when act() is done the component is recycled, and I loose all the initialization. Is there anyway I can ensure that my Action and Generator use the same instance and that it isn't recycled until the Generator is done? I thought the component manager would act like a garbage collector and not recycle the if it's reference count was > 0. I guess not. Can I tell the CM to not release the component and then manually release it? Thanks a lot, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic transformer chains in sitemap?
Hello, I have a situation where I want to assemble a chain of XSL style sheets dynamically. An action in my pipeline knows which stylesheets to chain, but I can't figure out how to assemble the chain, short of trying to write something like the CocoonTransformerChainBuilderFilter. All I really need is to chain XSL stylesheets, but I guess it'd be nice and more general to Cocoon if I could build a chain of any type of transformers. --Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xsp calling function
Reuben, I can't think of why this XSP would be calling other() twice, but maybe I can give you pointers on tracking down the problem. First your section is outside of the root element for your XML, the element. This will be inserted as class level code by the XSP logicsheet, it won't be placed inside the generate() method. You may already know this, but I thought I'd point it out since the code there doesn't look like it needs to be class-level. (I personally think this is a confusing part of XSP and that class level code should be placed in an element called or something). The easy and direct way to figure out what's going on is to look at the generated source code. It's usually someplace like TOMCAT_HOME/work/Standalone/localhost/_/cocoon-files/org/apache/cocoon/ www/ My only guess as to why this might actually be happening is that somehow the code in your element is being placed at the class level, _and_ inside generate(). Looking at the source shoud tell you what's up though. -Justin On Monday, October 27, 2003, at 06:15 AM, Reuben Christie wrote: hi all, I am really stuck with XSP calling a function of a java class. here is my problem. This is the xsp code, http://apache.org/xsp";> PACK.Test t=new PACK.Test(); String st=t.other(); st and this is the Test.java code. import com.decisiontech.framework.test.*; public class Test { public Test() { } public String other() { System.out.println("helloworld"); return hello; } } now the problem is this, xsp calls this fucntion two times, i dont know why..but i checked the stdout.log file under tomcat log directory and it prints helloworld two times. and there for i m stuck here. the abouve is the example so it returns back hello but in my actual code the situation is different and therefor i m not been able to return the correct value. please somebody help me out with this. thanks alot in advance reuben - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Starting a conversation: OO, CMS's, Zope, open source
Andrzej, Thanks for the reply, it's been a busy week, therefore the delay in getting back to you. I'd like to start a discussion on design principles in web apps. Maybe someone will talk me out of the way I'm doing things. Maybe some people will like it. I've also been wondering if I should open source it or not. The issue I see is that design never lives in a vaccum. To really comment on a design you have to know what problems it is trying to address. So, with that, what problems is your software trying to solve, Ideally I want a system where a non-programmer can assemble a fairly complex web app by graphically assembling pre-built components. I know this doesn't really describe a particular problem. A lot of this design has come from my experience when I was developing web based training. WBT is mostly content, with some interactivity like quizes or a simulation. The content breaks down into a nice object model (ie. course -> section -> lesson - > page) and each type of content is displayed differently. Somehow writing course.jsp, section.jsp, etc... so that you could have urls like "something.com/course.jsp?id=1" never seemed right. It actually becomes a problem when you're reusing your code for a project where they have a different course layout. A customer might use course -> module or test -> section -> chapter. Being able to arrange the content in arbitrary ways seems better. and what unique features does it provide (compared with other solutions based on Cocoon, Zope, etc)? I truthfully need to look more into Zope. I don't know much about it beyond that it's based on an OO concept and that objects are authored in python. I know it has a standard graphical editor for assembling site, which is pretty similar in some ways to mine. The feature I like most over Cocoon is that the XML is generated by traversing the object tree and reflects the structure. each object only need to generate it's own XML. If you change an object definition it's reflected everywhere that uses that object. Some features (current and planned)... graphical editor object definition files can be dropped in and used in the editor without any configuration object-level permissions with users and groups, like UNIX filesystems easy content reuse by linking to objects in a library I feel like I should describe how I'm building my current project, but I don't have the time now. It also seems that you are mixing up different strata of "design". Application architecture, with is moving towards SOA principles, and code- level design which can be based on OO. I don't see how using an OO architecture keeps you from using SOA. The project I'm working on now is going to use SOAP to interact with a authorization server. An object in my system will be responsible for the communication between my app and the web service. In this way SOAP is just message passing between objects. A normal HTTP request is a message passed to an object; a request for it's content. I'm looking at everything as messages passed to objects. It also preserves SoC. Programmers author objects. Site administrators or programmers can build the web site with the editor, and graphic artists can handle the XSL/HTML/CSS end. Since XSL isn't very well know out there (in my experience) I often use a two tiered XSL transformation. The first one transforms to a very generic XHTML files that's suitable for transforming again to the final HTML or sending to the browser with CSS. It's usually a mistake to try to use OO at the overall architecture level. Why is this? I do see that it doesn't have some of the flexibility of the sitemap, which acts like a declarative programming language in many ways, but it's very consistent and easier to understand. I'm thinking of it as OO at the content level. Most sites are mostly hierarchal content. Sections of a site, articles with in sections, etc. I think a files system is a actually great way to layout a site because it's easy to see that folders and files actually relate to the URL. Of course abstracting the URL space is a nice feature of Cocoon. Just some initial thoughts to kick of your discussion. Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Starting a conversation: OO, CMS's, Zope, open source
Hello everyone, I have been working in Cocoon for a couple of years now and have built up my own web-app framework over time. It uses Cocoon, but like Cocoon in many ways replaces Servlets by handling all incoming requests, my web app in some ways replaces Cocoon by handling all requests into a single pipeline. It's based very much on OO principles and uses a SQL backend to store objects. Here's the ting though; since I've created this in a vacuum, I don't know if it's good design or not. It's been a lot of work, and sometimes I feel like I might be wasting my time by not just doing things the standard cocoon way (I know there's many ways to do things in Cocoon, but I mean with XSPs, aggregators, multiple pipelines, etc). On the other hand it makes sense to me and feels right. I'd like to start a discussion on design principles in web apps. Maybe someone will talk me out of the way I'm doing things. Maybe some people will like it. I've also been wondering if I should open source it or not. Here's the basic concepts: The web application is based on an object tree. All objects have a name, and URLs point to a particular object, though the hierarchy of the tree. For example http://mysite.com/section1/chapter2/page1/ refers to the object named page1 that is a child of the object chapter2, etc... The closest I've seen another web app come to this is Zope. The database has an objects table that stores the type and the name and links for building the object tree. it's basically just a hierarchical db built on a relational db. (I question this setup a lot, but I don't have any experience with OO databases). Each object in the database is represented by a java object, which is kind of like a lightweight Cocoon Generator and Action rolled into one. The java classes have a method to generate their XML representation and call that method on their children. So the above URL, with real simple java implementations would generate XML that looks a little like this: that's leaving a lot out, but it gives an idea that the XML is nested and represents the actual nesting of the objects. Objects can have attributes as well, and the IDs are printed too. This is the output of my generator. The transformers are the standard Cocoon ones, but I always use an XSLT transformer and have wired it so that an object can choose what stylesheet to use. There's all kinds of other stuff that makes it a usable system, objects can control what other objects are printed by including them, they can have actions, they can generate different xml based on extension, or a concept of a view. The java classes are generated from xml files that are a lot like XSP. These files are sort of a combination of Model, View, and Controller. There's a schema section describing the attributes and content, there's a views section which is similar to XSP, and there's an actions section with is like a XSPAction. When you drop one of these files in the new type becomes available to the web-app editor. The editor is the graphical front end to the system where you can assemble the object tree and edit the object properties. I'm working on editing the styles too. Well, that's an overview. I have to think that other people, besides the Zope guys, have thought about or tried something like this, but I can't really find anything out there even though Java seems very well suited to this. That's why I wonder if my concept is flawed in some way. I've used it in some live sites, but small ones, so I don't know if it scales. I had performance issues at first, but implemented some caching that helped. So if anyone has any comments or opinions on this stuff I'd love to hear it. I know there's a lot of CMS systems based on Cocoon already. Is there interest in another one? Thanks, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Precompile XSP with Ant?
Is there an Ant task to compile XSP pages. Actually, I need to compile my own XSP like language, so I'd have to change the task, but an XSP compiler would be a good place to start. I've done some googling and haven't found anything yet. Thanks, Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]