Re: XIncludeTransformer still not working
At 12:09 PM +0700 28/9/01, Andrew Answer wrote: xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xinclude=http://www.w3.org/2001/XInclude; page xinclude:include href=menu.xml/ /page /xsp:page As your page is an XSP, you _could_ use the xinclude tag of the util taglib. However, if you want to use the XInclude Transformer, I believe you need to provide an xml:base attribute. ie. something like this: xsp:page xmlns:xsp=http://apache.org/xsp; xmlns:xinclude=http://www.w3.org/2001/XInclude; page xinclude:include href=menu.xml xml:base=context://your-context/docs/ / /page /xsp:page Hope this helps regards Jeremy -- ___ Jeremy Quinn Karma Divers webSpace Design HyperMedia Research Centre mailto:[EMAIL PROTECTED]http://www.media.demon.co.uk phone:+44.[0].20.7737.6831 pager:[EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
taglibs for stylesheets
Hi, I just love the logicsheet mechanism. Now, I wondered wether it'd be possible to implement a similar mechanism for stylesheets. I'm writing an article on HTML table formatting (for twigs), and I realize that it could be very cool to have a, say, formatting:table ... tag that you could embed in your stylesheets. The tag could have attributes like number_of_columns cell_background, border_width, etc... On the web site I'm working on, there are lots of xsl generated tables, and cocoon2 today only allows me to edit an xsl file for each and every table I need to generate, and forces me to maintain as many xsl table formatting stylesheets as I have pages. How could this shortcoming be addressed ? Aurélien - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: taglibs for stylesheets
-Original Message- From: Aurelien [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 30, 2001 8:46 AM To: [EMAIL PROTECTED] Subject: taglibs for stylesheets Hi, I just love the logicsheet mechanism. Now, I wondered wether it'd be possible to implement a similar mechanism for stylesheets. I'm writing an article on HTML table formatting (for twigs), and I realize that it could be very cool to have a, say, formatting:table ... tag that you could embed in your stylesheets. The tag could have attributes like number_of_columns cell_background, border_width, etc... On the web site I'm working on, there are lots of xsl generated tables, and cocoon2 today only allows me to edit an xsl file for each and every table I need to generate, and forces me to maintain as many xsl table formatting stylesheets as I have pages. How could this shortcoming be addressed ? I do see several ways of solving your issue: 1. Use CSS2 It will allow you to keep table, tr, td tags with just one attribute - class, or even less :) 2. Come up with common DTD for all your documents (e.g., introduce tag formatting:table ...), and use this DTD in all of your documents. Then, as the last transformation stage (right before serializer), apply stylesheet which will transform your tags into HTML tables. 3. If you love XSP, you should love this third way :) You could generate XSLs using XSP mechanism. Just look at sub-sitemap examples. But do not forget that it's in your interests to make XSL-generation pipelines cacheable, otherwise performance will suffer. Does this help? Regards, Vadim Aurélien - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More ESQL problems
Title: More ESQL problems Sorry to bother everyone again, but I've got another problem with the ESQL logicsheet. Here's the code: esql:execute-query esql:queryselect ID from counters where link = esql:parameter type=stringxsp:exprrequest.getParameter(file) /xsp:expr/esql:parameter/esql:query esql:results xsp:logic java.lang.String useragent; java.lang.String fileid; fileid = esql:get-string column=ID/; /xsp:logic I'm trying to grab the ID column value and assign it to a Java string object for use in a further object; my site is littered with this methodology, and it usually works. However this code gives me the following error: java.lang.Exception: XSP Java Compiler: Compilation failed for _download.java 373: Incompatible type for =. Can't convert org.w3c.dom.Node to java.lang.String. fileid = ^ 1 error at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java:146) at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:522) at org.apache.cocoon.Engine.handle(Engine.java:384) at org.apache.cocoon.Cocoon.service(Cocoon.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:317) at org.apache.jserv.JServConnection.run(JServConnection.java:188) at java.lang.Thread.run(Thread.java:498) Instead of grabbing the value of the column as a string, it looks like the ESQL sheet is grabbing a Node object. The code that's generated by Cocoon is: java.lang.String fileid; fileid = xspParentNode = xspCurrentNode; xspNodeStack.push(xspParentNode); xspCurrentNode = document.createElement(esql:get-string); xspParentNode.appendChild(xspCurrentNode); Anyone know why the ESQL taglib is so confused? Thanks! Luke Reeves, Director of Development Oceanlake Commerce Inc. [EMAIL PROTECTED]
RE: More ESQL problems
Title: Message Yes, it's a reply to my own post. Found the problem. I moved the xsp:logic tags to inside a esql:row-results like so: esql:row-results xsp:logic java.lang.String useragent; java.lang.String fileid; fileid = esql:get-string column="ID"/; /xsp:logic /esql:row-resultsAnd it worked just fine. Luke -Original Message-From: Luke Reeves [mailto:[EMAIL PROTECTED]] Sent: October 1, 2001 1:25 AMTo: '[EMAIL PROTECTED]'Subject: More ESQL problems Sorry to bother everyone again, but I've got another problem with the ESQL logicsheet. Here's the code: esql:execute-query esql:queryselect ID from counters where link = esql:parameter type="string"xsp:exprrequest.getParameter("file") /xsp:expr/esql:parameter/esql:query esql:results xsp:logic java.lang.String useragent; java.lang.String fileid; fileid = esql:get-string column="ID"/; /xsp:logic I'm trying to grab the ID column value and assign it to a Java string object for use in a further object; my site is littered with this methodology, and it usually works. However this code gives me the following error: java.lang.Exception: XSP Java Compiler: Compilation failed for _download.java 373: Incompatible type for =. Can't convert org.w3c.dom.Node to java.lang.String. fileid = ^ 1 error at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java:146) at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:522) at org.apache.cocoon.Engine.handle(Engine.java:384) at org.apache.cocoon.Cocoon.service(Cocoon.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at org.apache.jserv.JServConnection.processRequest(JServConnection.java:317) at org.apache.jserv.JServConnection.run(JServConnection.java:188) at java.lang.Thread.run(Thread.java:498) Instead of grabbing the value of the column as a string, it looks like the ESQL sheet is grabbing a Node object. The code that's generated by Cocoon is: java.lang.String fileid; fileid = xspParentNode = xspCurrentNode; xspNodeStack.push(xspParentNode); xspCurrentNode = document.createElement("esql:get-string"); xspParentNode.appendChild(xspCurrentNode); Anyone know why the ESQL taglib is so confused? Thanks! Luke Reeves, Director of Development Oceanlake Commerce Inc. [EMAIL PROTECTED]
constructing transformers in Cocoon 2
Here's the model I've been using for Cocoon 2: Default generator. 2 transformers: 1 transformer that we've wrote that picks up on certain elements and serves information from the database (via JDBC) depending on which elements it is, and also the standard XSLT transformer. Then, standard serializer. Is that the kind of thing that other people are doing as well? We're not doing anything with XSP or JSP or ESQL or other taglibs... and as the docs are still alpha for Cocoon 2, I wanted to check and make sure I'm not reinventing the wheel. Liam Morley attachment: winmail.dat - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]