How do I use sendmail from jxt?
Hi, I have some xsp code which sends mail to a specified user, and I now want to convert the code to jxt, how do I do it. My code is: sendmail:send-mail> /sendmail:charset> /sendmail:smtphost> sendmail:from>[EMAIL PROTECTED]/sendmail:from> sendmail:to>[EMAIL PROTECTED]/sendmail:to> /sendmail:subject> /xsp:expr>/sendmail:body> /sendmail:send-mail> regards Peter
Re: JXT or XSP?
Christian, as long, as flowscript is ustilised to do nothing more than direct the flow of pages, the sitemap should still retain its powerful features... Peter On 1 May 2004, at 11:21, Christian Rosenberger wrote: Hello! I think in concerns of MVC, the solution Ralph mentioned seems to be the best. You have a clear seperation between prsentation, controller and business logic. The system would look like this: Presentation: Plain XHTML or whatever output format you like Controller Actions Modell:Business Delegate/Business Logic Manager (connected to database in whatever way) All controlled in sitemap. As Ralph mentioned, if you put controlling or logic in flowscript, the sitemap will loose all powerful possibilites it has. Regards, Christian This is just my opinion, but I know others here share it. First, I've never used XSP - I never saw a need to, and I just don't like the idea. Second, while flowscript has its uses it is also very dangerous. One of the key things Cocoon provides is strong separation of concerns. Flowscript provides the opportunity to muddy that all up if you aren't careful. Having said that, we will be using flowscript in a minor way. We will use it to manage page flows where pages must be presented in sequence. We have NO business logic in the flowscript. Business delegates are defined as Avalon components and invoked from a BusinessDelegateAction and the Data Transfer Object they return is serialized using a BetwixtGenerator. This performs very well and keeps the control in the sitemap. Ralph -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 4:43 AM To: [EMAIL PROTECTED] Subject: JXT or XSP? Hi, why use(promote) XSP, when JXT and flowscript is a far more powerful environment to develop in? Peter - 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] - 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: JXT or XSP?
Ralph, is there any particular reason why you don't instantiate business objects from within flowscript, or is purely preference that you don't? Peter On 1 May 2004, at 15:09, Ralph Goers wrote: I didn't mean to imply that there is no place for flowscript. There certainly is. As I said, we are using it. The controller in Cocoon is not the Actions; it used to be the entire sitemap. Now it is the sitemap + flowscript. The problem is that it is easy to have flowscript become part of the model and the view as well. When you look for doc on flowscript one of the first things you will find are pages title Advanced Flow Control. That is really what flowscript is for - managing flows that would be very painful to do in the sitemap. For example, we have cases where the user requests a specific page and in the process of generating it we discover that they must be presented with some legal text that they have to accept or decline. Based on their response we either display the requested page or send them somewhere else. We handle the normal request purely in the sitemap. When the alternate flow is detected the user is sent to another pipeline managed by flowscript. While the alternate can be, and has been, managed directly in the sitemap, this is a case where flowscript makes it a lot easier. What we don't do is instantiate or manipulate any business objects in flowscript. Ralph -Original Message- From: Christian Rosenberger [mailto:[EMAIL PROTECTED] Sent: Saturday, May 01, 2004 3:21 AM To: [EMAIL PROTECTED] Subject: RE: JXT or XSP? Hello! I think in concerns of MVC, the solution Ralph mentioned seems to be the best. You have a clear seperation between prsentation, controller and business logic. The system would look like this: Presentation: Plain XHTML or whatever output format you like Controller Actions Modell:Business Delegate/Business Logic Manager (connected to database in whatever way) All controlled in sitemap. As Ralph mentioned, if you put controlling or logic in flowscript, the sitemap will loose all powerful possibilites it has. Regards, Christian - 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]
JXT or XSP?
Hi, why use(promote) XSP, when JXT and flowscript is a far more powerful environment to develop in? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JXT or XSP?
Derek, I initially, like i'm sure everyone else, started using XSP as that seemed to be all there was. Then I discovered JXT and flowscript! What can I say... I changed all of my XSP over to JXT, which made the code a lot easier and lighter. XSP seems to be very convoluted for example in the way in which you pass parameters into and out of it! The benefits of Flowscript (MVC) are self explanatory, and I would be very surprised if cocoon is not pushed in this direction. All of the components that you mention, generators etc etc..., can all be used with JXT as well as far as I'm aware. I just think it would be a good idea to start standardising on some core technologies within the cocoon framework, instead of stumbling across these various technologies as time goes by! Peter On 30 Apr 2004, at 13:03, Derek Hohls wrote: Peter Do you have experience of using? I am also wondering the same thing (see the other thread on Using JXTemplates\JXForms at the same time). I have used XSP up to now (as it was 'all there was' in earlier Cocoon versions. I think much of the documentation also reflects that history. For example: the user menu on the website also reflects this bias towards XSP: Sitemap Components -Generators -Transformers -Serializers -Matchers -Selectors -Actions -Readers Control Flow -XSP No mention here at all of JXT ;-( Unfortunately the examples on the Cocoon site, show JXT being used in a way that remind óne of JSP - emdedding logic in an HTML web page - this put me off even learning it all! See: http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html#macro PERSONAL OBSERVATION: I think that all the examples on the site, where info is generated, should avoid HTML if at al possible - HTML (or HTML or WML) should only appear as a result of XSLT step [EMAIL PROTECTED] 2004/04/30 01:42:41 PM Hi, why use(promote) XSP, when JXT and flowscript is a far more powerful environment to develop in? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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: JXT or XSP?
Ralph, same goes here. Flowscript used to delegate nothing more than the flow of pages... Hibernate used to handle persistence... Peter On 30 Apr 2004, at 16:05, Ralph Goers wrote: This is just my opinion, but I know others here share it. First, I've never used XSP - I never saw a need to, and I just don't like the idea. Second, while flowscript has its uses it is also very dangerous. One of the key things Cocoon provides is strong separation of concerns. Flowscript provides the opportunity to muddy that all up if you aren't careful. Having said that, we will be using flowscript in a minor way. We will use it to manage page flows where pages must be presented in sequence. We have NO business logic in the flowscript. Business delegates are defined as Avalon components and invoked from a BusinessDelegateAction and the Data Transfer Object they return is serialized using a BetwixtGenerator. This performs very well and keeps the control in the sitemap. Ralph -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 4:43 AM To: [EMAIL PROTECTED] Subject: JXT or XSP? Hi, why use(promote) XSP, when JXT and flowscript is a far more powerful environment to develop in? Peter - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
flowscript iterator JXT
Hi, I have some java iteration code which I wish to convert into flowscript. I have imported the Iterator: importClass(Packages.java.util.Iterator); and the java code I want to convert is: Iterator i = OrderItems.iterator(); while (i.hasNext()) { OrderItem item = (OrderItem) i.next(); } Any help will be most appreciated. Peter
Re: Hibernate logging in cocoon?
Yep, i have log4j-1.2.7.jar in both web-inf/lib and web-inf/classes Peter On 29 Apr 2004, at 23:53, Joel McConaughy wrote: Is there a way to enable hibernate logging within cocoon? I've tried putting log4j.properties in the classpath but get nothing. THanks. joel - 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: Sorry, Cocoon couldn't find the resource you requested.
Ugo, all has been sorted now... I made an alteration to the site pipe, in terms of to what depth files could access parts of the sitemap, and all is fine now. Peter On 27 Apr 2004, at 21:21, Ugo Cei wrote: Il giorno 27/apr/04, alle 16:02, beyaNet Consultancy ha scritto: form method=post action=frame/${cocoon.continuation.id}.kont I think it should be ${continuation.id}. What does the generated HTML look like? Do you see a long string of numbers there? Ugo - 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]
asynchronous flowscript calls??
Hi, is it possible to make asynchronous flowscript function calls?? For example users can make purchase orders on my site, and at the moment my script adds an order item(shopping cart), via my hibernate persistence layer, and then redirects the user back to the page they made the order from. What I want to be able to do is to add an item to a shopping cart without having to leave the page. So, 1. click submit button on page to add an item and the number required, which in turn call the flowscript function which adds the order item to the cart without leaving the page I am currently on. Is this doable??? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sorry, Cocoon couldn't find the resource you requested.
Hi, I am having an issue concerning calling a flowscript continuation from a form within an iframe. The form is being generated from the following sequence: 1. function artistDetails() { var artistID = cocoon.parameters.artistID; var artist = Artist.getArtist(artistID); var artistStk = stk.getStock(artistID); var artist_name = artist.getArtistName(); var artist_info = artist.getArtistInfo(); var track_info = artistStk.getItemTitle(); var track_location = artistStk.getItemDemo(); var stock_code = artistStk.getID(); if (userGlobal != null) { var userID = userGlobal.getID(); } cocoon.sendPageAndWait(userID:userGlobal.getID()}); cocoon.sendPage(addNewStock); cocoon.redirectTo(artistDetails/ + artistID); } 2. map:match pattern=artistDetails1> map:generate type=jxt src=jx/artistDetails.jxt/> map:transform type=xslt src=style/artist-page.xsl/> map:call resource=serialize/> /map:match> form page is generated within iframe and has a continuation id in the form tag 3. on submitting the page, the continuation sequence should follow onto cocoon.sendPage(addNewStock). Instead I am getting the above mentioned error. The sitemap pipe for the continuation is: map:match pattern=**frame/*.kont> map:call continuation={2}/> /map:match> The frame code is: form method=post action=frame/${cocoon.continuation.id}.kont> table> tr> /td> td>input type=text name=quantity value=/>/td> /tr> tr> td colspan=2>input type=submit name=submit/>/td> /tr> input type=hidden name=artistID value=${artistID}/> input type=hidden name=userID value=${userID}/> input type=hidden name=stockID value=${stock_code}/> /table> /form> what am I doing wrong? Peter
Re: Sorry, Cocoon couldn't find the resource you requested.
further to my earlier post, even if I comment out the sitemap pipe for the continuation, instead of getting an error saying that there was no pipe match, I still get the above message when trying to post the form from within the iframe. Peter On 27 Apr 2004, at 15:02, beyaNet Consultancy wrote: Hi, I am having an issue concerning calling a flowscript continuation from a form within an iframe. The form is being generated from the following sequence: 1. function artistDetails() { var artistID = cocoon.parameters.artistID; var artist = Artist.getArtist(artistID); var artistStk = stk.getStock(artistID); var artist_name = artist.getArtistName(); var artist_info = artist.getArtistInfo(); var track_info = artistStk.getItemTitle(); var track_location = artistStk.getItemDemo(); var stock_code = artistStk.getID(); if (userGlobal != null) { var userID = userGlobal.getID(); } cocoon.sendPageAndWait(userID:userGlobal.getID()}); cocoon.sendPage(addNewStock); cocoon.redirectTo(artistDetails/ + artistID); } 2. map:match pattern=artistDetails1> map:generate type=jxt src=jx/artistDetails.jxt/> map:transform type=xslt src=style/artist-page.xsl/> map:call resource=serialize/> /map:match> form page is generated within iframe and has a continuation id in the form tag 3. on submitting the page, the continuation sequence should follow onto cocoon.sendPage(addNewStock). Instead I am getting the above mentioned error. The sitemap pipe for the continuation is: map:match pattern=**frame/*.kont> map:call continuation={2}/> /map:match> The frame code is: form method=post action=frame/${cocoon.continuation.id}.kont> table> tr> /td> td>input type=text name=quantity value=/>/td> /tr> tr> td colspan=2>input type=submit name=submit/>/td> /tr> input type=hidden name=artistID value=${artistID}/> input type=hidden name=userID value=${userID}/> input type=hidden name=stockID value=${stock_code}/> /table> /form> what am I doing wrong? Peter
Problem passing parameter values from sitemap into flowscript..
Hi, I have a sitemap pipe: map:match pattern=**artistImage/*/*/*/*.jpg> map:call function=svg> map:parameter name=imageNum value=1/> map:parameter name=artistID value=45/> map:parameter name=svgWidth value=100/> map:parameter name=svgHeight value=100/> /map:call> /map:match> which, as can be seen, makes a flowscript function call. within the function i read in the values as: function svg() { var svgWidth = cocoon.request.get(svgWidth); var svgHeight = cocoon.request.get(svgHeight); var imageNum = cocoon.request.get(imageNum); var artistID = cocoon.request.get(artistID); . cocoon.sendPage(generateSVG, {svgWidth:parseInt(svgWidth), svgHeight:parseInt(svgHeight), base64:base64, imgWidth:imgWidth, imgHeight:imgHeight}); } The problem I am having is that all the values read into flowscript are null! What am I doing wrong here?? Peter
Re: Problem passing parameter values from sitemap into flowscript..
Thanks guys, but the source of my initial information was from the actual cocoon site on flow!, which is obviously incorrect: http://cocoon.apache.org/2.1/userdocs/flow/sitemap.html Read code specified in the function section... Peter On 25 Apr 2004, at 13:15, Alex Romayev wrote: Peter, I'm not 100% on the flow API, but you are passing sitemap parameters and retrieving request parameters. I don't see how the request parameters would be set. I would think there is another way of getting those. -Alex --- beyaNet Consultancy [EMAIL PROTECTED]> wrote: Hi, I have a sitemap pipe: map:match pattern=**artistImage/*/*/*/*.jpg> map:call function=svg> map:parameter name=imageNum value=1/> map:parameter name=artistID value=45/> map:parameter name=svgWidth value=100/> map:parameter name=svgHeight value=100/> /map:call> /map:match> which, as can be seen, makes a flowscript function call. within the function i read in the values as: function svg() { var svgWidth = cocoon.request.get(svgWidth); var svgHeight = cocoon.request.get(svgHeight); var imageNum = cocoon.request.get(imageNum); var artistID = cocoon.request.get(artistID); . cocoon.sendPage(generateSVG, {svgWidth:parseInt(svgWidth), svgHeight:parseInt(svgHeight), base64:base64, imgWidth:imgWidth, imgHeight:imgHeight}); } The problem I am having is that all the values read into flowscript are null! What am I doing wrong here?? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem passing parameter values from sitemap into flowscript..
Johannes, I do not have a bugzilla account, so feel free to log it. Also, I am now getting an error which says: org.apache.avalon.framework.CascadingRuntimeException: getParameter is not a function. Any reason why this is?? I am using version 2.1.4 of cocoon. Peter On 25 Apr 2004, at 13:39, Johannes Textor wrote: true, the docs seem incorrect (or misleading at least). does it work out when using the parameter object ? if so, can you report the bug in bugzilla ? I can also do it if you don't have a bugzilla account. beyaNet Consultancy wrote: Thanks guys, but the source of my initial information was from the actual cocoon site on flow!, which is obviously incorrect: http://cocoon.apache.org/2.1/userdocs/flow/sitemap.html Read code specified in the *function* section... - 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: Problem passing parameter values from sitemap into flowscript..
Johannes, I have it. The correct syntax is: cocoon.parameters.svgWidth; Peter On 25 Apr 2004, at 13:53, beyaNet Consultancy wrote: Johannes, I do not have a bugzilla account, so feel free to log it. Also, I am now getting an error which says: org.apache.avalon.framework.CascadingRuntimeException: getParameter is not a function. Any reason why this is?? I am using version 2.1.4 of cocoon. Peter On 25 Apr 2004, at 13:39, Johannes Textor wrote: true, the docs seem incorrect (or misleading at least). does it work out when using the parameter object ? if so, can you report the bug in bugzilla ? I can also do it if you don't have a bugzilla account. beyaNet Consultancy wrote: Thanks guys, but the source of my initial information was from the actual cocoon site on flow!, which is obviously incorrect: http://cocoon.apache.org/2.1/userdocs/flow/sitemap.html Read code specified in the *function* section... - 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: Problem passing parameter values from sitemap into flowscript..
Ok, I agree as well. The example you have given is very clear. It may also help if you gave an example of how you would read in parameters from a query string (request) as well. Peter On 25 Apr 2004, at 14:53, Johannes Textor wrote: OK, thats clear enough to be understood by flow-newbies. Thank you :-) The docs are correct, but a little misleading. I have therefore changed the page to say: map:flow language=javascript map:script src=myApplication.js/ /map:flow map:pipelines map:pipeline map:match pattern=index.html map:call function=showIndexPage map:parameter name=paramName value=Value/ /map:call /map:match /map:pipeline /map:pipelines and: function showIndexPage() { var param = cocoon.parameters.paramName; sendPage(private/index.html, {param: param}); } This'll go onto the site next time someone updates it. Speak up if anything above is incorrect. Regards, Upayavira - 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: Flowscript problems with cocoon version 2.1.4
Hi, this issue has now been resolved. I had to rebuild cocoon! Peter On 20 Apr 2004, at 20:01, beyaNet Consultancy wrote: is anybody having problems with flowscript on version 2.1.4 of cocoon? If not, could you send me a copy of your js.jar and rhino1.5r4-continuations-20030906.jar as I continue to get the following error message: x-tad-biggerReferenceError: Continuation is not defined. (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js; line 1) Alternatively if anyone else has had the same problem and managed to resolve it, could you please inform me as to the solution to this problem. I really need to get this issue finished today. Peter/x-tad-bigger On 20 Apr 2004, at 18:28, beyaNet Consultancy wrote: Christopher, the version of Rhino I have installed in my web-inf/lib folder is : rhino1.5r4-continuations-20030906.jar. Is this the correct version for cocoon version 2.1.4? If not, where can I get the correct .jar from? Peter On 20 Apr 2004, at 18:08, Christopher Oliver wrote: Most likely you have another version of Rhino in your classpath. beyaNet Consultancy wrote: Hi, I getting an error while trying to setup my first flowscript code. The error I am getting is: *org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined *Could anyone out there please send me a copy of their sitemap, so as I can see how to properly setup up flowscript within my sitemap. Also I am trying to create a flowscript function which instantiates a User object and passes in 2 parameters, a username and a password. If the user does not exist, the user is redirected back to the login page otherwise they are sent to the secure part of my sitemap. The login function is as follows: var user = null; !-- Do I need to instantiate the object like this ?? > importClass(Packages.test.User); //Note: my package test is situated as: web-inf/classes/test, User being the name of the class in the package test. var User = new User(); function login(){ while (user == null) { sendPageAndWait(login.jx); user = User.getUser(cocoon.request.get(username),cocoon.request.get(password)); if (user != null) { break; } } cocoon.sendPage(registerd_user_area); //Can I redirect a user to an area of my sitemap from flowscript like this?? } I have attached my sitemap as well. Any help with this will be greatly appreciated. Peter - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Read values from sitemap into flowscript
Hi, how do I read values from a sitemap into a flowscript? For example what i want to do is the following: 1. An image request is made: image src=artistImage/${id}/128/102/1.jpg/> which calls the following site map pipe: map:match pattern=**artistImage/*/*/*/*.jpg> map:call function=svg/> /map:match> the result of the function is then passed, sendPage(svg1, {..});, to the following sitemap pipe: map:match pattern=svg1> map:generate type=jxt src=jx/svg.jxt> map:serialize type=svg2jpeg/> /map:match> Thanks in advance for you help. Peter
Re: Read values from sitemap into flowscript
Hi, problem solved. Peter On 24 Apr 2004, at 13:32, beyaNet Consultancy wrote: Hi, how do I read values from a sitemap into a flowscript? For example what i want to do is the following: 1. An image request is made: image src=artistImage/${id}/128/102/1.jpg/> which calls the following site map pipe: map:match pattern=**artistImage/*/*/*/*.jpg> map:call function=svg/> /map:match> the result of the function is then passed, sendPage(svg1, {..});, to the following sitemap pipe: map:match pattern=svg1> map:generate type=jxt src=jx/svg.jxt> map:serialize type=svg2jpeg/> /map:match> Thanks in advance for you help. Peter
Failed to execute pipeline.
Hi, I am getting the following error: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: html). My pipe is: map:match pattern=svg1> map:generate type=jxt src=jx/svg.jxt/> map:serialize type=svg2jpeg/> /map:match> and my svg.jxt code is: ?xml version=1.0?> html xmlns:jx=http://apache.org/cocoon/templates/jx/1.0 xmlns=http://www.w3.org/2000/svg > svg width=${svgWidth} height=${svgHeight} viewBox=0 0 ${svgWidth} ${svgHeight} xmlns:xlink=http://www.w3.org/1999/xlink> image x=0 y=0 border=0 width=${imgWidth} height=${imgHeight} xlink:href=data:image/jpeg;${base64}/> /svg> /html> I know the error is being caused by the html> tags, but is there any solution for this using JXT??? Peter
Re: Failed to execute pipeline.
Chris, I was not aware you could do that. It works fine now. Thanks. Peter On 24 Apr 2004, at 17:31, Christopher Oliver wrote: Try this: ?xml version=1.0? svg xmlns:jx=http://apache.org/cocoon/templates/jx/1.0; xmlns=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/1999/xlink; width=${svgWidth} height=${svgHeight} viewBox=0 0 ${svgWidght} ${svgHeight} image x=0 y=0 border=0 width=${imgWidth} height=${imgHeight} xlink:href=data:image/jpeg;${base64}/ /svg But if you're only doing expression substitution (and not using any jx:xxx tags) then you don't have to declare the jx namespace at all. Chris beyaNet Consultancy wrote: Hi, further to my earlier post. I have attached the output I am getting. Could someone please test this file to see whether an image is being generated? thanks Peter On 24 Apr 2004, at 15:40, beyaNet Consultancy wrote: Hi, I am getting the following error: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: html). My pipe is: map:match pattern=svg1 map:generate type=jxt src=jx/svg.jxt/ map:serialize type=svg2jpeg/ /map:match and my svg.jxt code is: ?xml version=1.0? html xmlns:jx=http://apache.org/cocoon/templates/jx/1.0; xmlns=http://www.w3.org/2000/svg; svg width=${svgWidth} height=${svgHeight} viewBox=0 0 ${svgWidth} ${svgHeight} xmlns:xlink=http://www.w3.org/1999/xlink; image x=0 y=0 border=0 width=${imgWidth} height=${imgHeight} xlink:href=data:image/jpeg;${base64}/ /svg /html I know the error is being caused by the html tags, but is there any solution for this using JXT??? Peter -- -- - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jpath transformer
Jan, the transformer I mentioned is: map:transformer logger=sitemap.transformer.jpath name=jpath src=org.apache.cocoon.transformation.JPathTransformer/> Peter On 23 Apr 2004, at 07:14, Jan Hoskens wrote: I've not yet heard of a jpath transformer, where did you find it? I do know that there's an xsp logicsheet jpath that you may use, especially for use with flow. There's another transformer which does jpath/jexl stuff, but that's the JXTemplateTransformer. http://cocoon.apache.org/2.1/userdocs/flow/jpath.html http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html Kind Regards, Jan x-tad-bigger- Original Message -/x-tad-bigger x-tad-bigger /x-tad-biggerx-tad-biggerFrom:/x-tad-biggerx-tad-bigger /x-tad-biggerx-tad-biggerbeyaNet Consultancy/x-tad-biggerx-tad-bigger /x-tad-bigger x-tad-biggerTo:/x-tad-biggerx-tad-bigger /x-tad-biggerx-tad-bigger[EMAIL PROTECTED]/x-tad-biggerx-tad-bigger /x-tad-bigger x-tad-biggerSent:/x-tad-biggerx-tad-bigger Thursday, April 22, 2004 2:22 PM/x-tad-bigger x-tad-biggerSubject:/x-tad-biggerx-tad-bigger jpath transformer/x-tad-bigger Hi, could someone please inform me as to the correct usage of the jpath transformer. Can I use it as I would an xslt transformer and and declare a *.jpath file, which like its xsl counterpart, would handle styling issues? For example, could I do the following: map:match pattern=frame/*/*/*> map:generate type=serverpages src=xsp/{1}.xsp> map:parameter name=artistID value={3}/> /map:generate> map:transform type=jpath src=style/{2}.jpath/> map:call resource=serialize/> /map:match> If so, does anyone have examples of a jpath transformation file I could have a look at? And if you can declare an jpath transformation file, how can I get objects and variables from my flowscript into it? Peter
Problems retrieving object elements using jpath (flowscript)
Hi, I have a flowscript which does the following: cocoon.sendPage(registered_section1, {userGlobal:userGlobal}); where userGlobal is a user object. I try to retrieve elements within the java object inside my xsp page by saying: jpath:value-of select=userGlobal.getUserName()/> but am getting the following error message: org.apache.commons.jxpath.JXPathException: Cannot invoke extension function userGlobal.getUserName; userGlobal What am I doing wrong? peter
Re: Problems retrieving object elements using jpath (flowscript)
Ugo, in the context o what I am doing within an xsp page which has a jpath xmlns declaration : xmlns:jpath=http://apache.org/xsp/jpath/1.0, how would i use the JXTemplateGenerator you mention? my sitemap pipe is: map:match pattern=unprotected> map:generate type=serverpages src=xsp/home-page.xsp/> map:transform type=cinclude/> map:transform type=jpath/> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> /map:match> Peter On 23 Apr 2004, at 13:20, Ugo Cei wrote: beyaNet Consultancy wrote: jpath:value-of select=userGlobal.getUserName()/> userGlobal.getUserName() does not seem like a valid XPath expression to me. Try userGlobal/userName. I don't know if it works, since I would never do it that way. Why don't you use the JXTemplateGenerator? Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems retrieving object elements using jpath (flowscript)
Ugo, your eralier suggestion, jpath:value-of select=userGlobal/userName/>, worked fine. My only reason for using an xsp page is because I can transform it with an xsl stylesheet. Can I do the same with an JXTG file? On 23 Apr 2004, at 14:55, Ugo Cei wrote: beyaNet Consultancy wrote: Ugo, in the context o what I am doing within an xsp page which has a jpath xmlns declaration : xmlns:jpath=http://apache.org/xsp/jpath/1.0, how would i use the JXTemplateGenerator you mention? I suggested that you should use JXTG _instead_ of XSP. You won't certainly be able to use two generators at once. You could use the JXTemplateTransformer instead, after an XSP generation stage. I wouldn't advise it, though. By the way, was my solution correct or not? Ugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems retrieving object elements using jpath (flowscript)
Ugo, thanks for your help. All is working now ;-) Peter On 23 Apr 2004, at 15:42, Ugo Cei wrote: beyaNet Consultancy wrote: Ugo, your eralier suggestion, jpath:value-of select=userGlobal/userName/, worked fine. My only reason for using an xsp page is because I can transform it with an xsl stylesheet. Can I do the same with an JXTG file? Of course you can! JXTemplateGenerator is a generator, just like the ServerPagesGenerator (XSP). You can put one or more transformations (XSL-T or whatever) in your pipeline after the generation stage, independent on the type of generator. The transformer only expects a stream of SAX events from its upstream sibling in the pipeline. Ugo - 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: Generating XML - Design decisions
On 23 Apr 2004, at 19:58, Alex Romayev wrote: JXTemplateGenerator is not Cacheable. Is any work being done on this??? Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Flowscript - removeSession() is not a function
Hi, I am getting the following error message in my flowscript: org.apache.avalon.framework.CascadingRuntimeException: removeSession is not a function, with the following line of code: cocoon.removeSession(); I know that to create a session in flowscript I do cocoon.createSession(). Could someone tell me what the correct syntax is to destroy a session in flowscript is? Peter
jpath transformer
Hi, could someone please inform me as to the correct usage of the jpath transformer. Can I use it as I would an xslt transformer and and declare a *.jpath file, which like its xsl counterpart, would handle styling issues? For example, could I do the following: map:match pattern=frame/*/*/*> map:generate type=serverpages src=xsp/{1}.xsp> map:parameter name=artistID value={3}/> /map:generate> map:transform type=jpath src=style/{2}.jpath/> map:call resource=serialize/> /map:match> If so, does anyone have examples of a jpath transformation file I could have a look at? And if you can declare an jpath transformation file, how can I get objects and variables from my flowscript into it? Peter
jpath transformer
Hi, could someone please inform me as to the correct usage of the jpath transformer. Can I use it as I would an xslt transformer and and declare a *.jpath file, which like its xsl counterpart, would handle styling issues? For example, could I do the following: map:match pattern=frame/*/*/*> map:generate type=serverpages src=xsp/{1}.xsp> map:parameter name=artistID value={3}/> /map:generate> map:transform type=jpath src=style/{2}.jpath/> map:call resource=serialize/> /map:match> If so, does anyone have examples of a jpath transformation file I could have a look at? And if you can declare an jpath transformation file, how can I get objects and variables from my flowscript into it? Peter
Re: Flowscript and XSLT
Hi, in the following sitemap snippet: map:match pattern=registerd_user_area> !--map:act type=auth-protect> map:parameter name=handler value=beyarecords/>--> map:aggregate element=home> map:part src=cocoon:/support/menu/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> !--/map:act>--> /map:match> the map:part section which make reference to src=cocoon:/ all make process xsp server pages, for example: map:match pattern=support/menu> map:generate type=serverpages src=xsp/menu.xsp/> map:call resource=serialize/> /map:match> The problem that I am experiencing is that when this pattern, registerd_user_area, is called from a flowscript: function login() { while (user == null) { cocoon.sendPageAndWait(login.jx, {msg:msg}); try { user = newUser.getUser(cocoon.request.get(username), cocoon.request.get(password) ); break; }catch(e){ msg = The username password combination you entered does not exist. Please retry.; } } cocoon.redirectTo(registerd_user_area); - HERE THE CALL IS MADE } the parts of the aggregation which process serverpages are not rendered to the screen, i.e. they appear blank. Why? Peter On 21 Apr 2004, at 11:10, Reinhard Poetz wrote: beyaNet Consultancy wrote: Hi, 1. is it possible to apply a stylesheet to a *.jx file like you can to xsp? map:match pattern=*.jx> map:generate type=jx src=jx/{1}.jx/> map:transform type=xslt src=style/main.xsl/> map:serialize type=xhtml/> /map:match> If not, why? Surely not being able to apply a stylesheet to any document runs away from the xml/xslt ethos of cocoon! 2. can you aggregate *.jx files map:match pattern=registerd> map:aggregate element=main> map:part src=context://beyarecords/jx/login.jx/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> /map:match> In the above example, the login.jx file is not rendered to the screen, why? If you use context:/ the physical available file is read and *not* the content of an URI provided by Cocoon. -- Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Flowscript, Actions!?
Hi, ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action: map:match pattern=login> map:act type=auth-login> map:parameter name=handler value=beyarecords/> map:parameter name=parameter_name value={request-param:user}/> map:parameter name=parameter_password value={request-param:pass}/> map:redirect-to uri=registerd_user_area/> /map:act> !-- authentication failed: --> map:redirect-to uri=login.html/> /map:match> I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area: map:match pattern=registerd_user_area> map:act type=auth-protect> map:parameter name=handler value=beyarecords/> map:aggregate element=home> map:part src=cocoon:/support/beya-menu/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> /map:act> /map:match> Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like: map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate??? Peter
org.apache.avalon.framework.configuration.ConfigurationException: No languages defined!
hi, I have added the following lines of code to my sitemap, and am now getting the above mentioned error message: map:flow-interpreters default=JavaScript/> map:selector name=exception src=org.apache.cocoon.selection.XPathExceptionSelector> exception name=invalid-continuation class=org.apache.cocoon.components.flow.InvalidContinuationException/> exception class=java.lang.Throwable unroll=true/> /map:selector> map:flow language=javascript> map:script src=flow/login.js/> /map:flow> map:match pattern=*.jx> map:generate type=jx src=jx/{1}.jx/> map:serialize type=xhtml/> /map:match> map:match pattern=*.kont> map:call continuation={1}/> /map:match> map:match pattern=invalidContinuation> map:generate src=exceptions/invalidContinuation.xml/> map:serialize type=xml/> /map:match> map:handle-errors> map:select type=exception> map:when test=invalid-continuation> map:generate src=exceptions/invalidContinuation.html/> map:serialize type=xhtml/> /map:when> /map:select> /map:handle-errors> What am I missing? Peter On 20 Apr 2004, at 10:45, beyaNet Consultancy wrote: Hi, ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action: map:match pattern=login> map:act type=auth-login> map:parameter name=handler value=beyarecords/> map:parameter name=parameter_name value={request-param:user}/> map:parameter name=parameter_password value={request-param:pass}/> map:redirect-to uri=registerd_user_area/> /map:act> !-- authentication failed: --> map:redirect-to uri=login.html/> /map:match> I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area: map:match pattern=registerd_user_area> map:act type=auth-protect> map:parameter name=handler value=beyarecords/> map:aggregate element=home> map:part src=cocoon:/support/beya-menu/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> /map:act> /map:match> Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like: map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate??? Peter
Re: org.apache.avalon.framework.configuration.ConfigurationException: No languages defined!
Ok, i have discovered that the following line caused my sitemap to bomb out: map:flow-interpreters default=JavaScript/> What does this line do, is it required, will commenting it out prevent flowscript from working properly Peter On 20 Apr 2004, at 11:37, beyaNet Consultancy wrote: Hi, just to add that I am using version 2.1.4 of cocoon. Peter On 20 Apr 2004, at 11:31, beyaNet Consultancy wrote: hi, I have added the following lines of code to my sitemap, and am now getting the above mentioned error message: map:flow-interpreters default=JavaScript/> map:selector name=exception src=org.apache.cocoon.selection.XPathExceptionSelector> exception name=invalid-continuation class=org.apache.cocoon.components.flow.InvalidContinuationException/> exception class=java.lang.Throwable unroll=true/> /map:selector> map:flow language=javascript> map:script src=flow/login.js/> /map:flow> map:match pattern=*.jx> map:generate type=jx src=jx/{1}.jx/> map:serialize type=xhtml/> /map:match> map:match pattern=*.kont> map:call continuation={1}/> /map:match> map:match pattern=invalidContinuation> map:generate src=exceptions/invalidContinuation.xml/> map:serialize type=xml/> /map:match> map:handle-errors> map:select type=exception> map:when test=invalid-continuation> map:generate src=exceptions/invalidContinuation.html/> map:serialize type=xhtml/> /map:when> /map:select> /map:handle-errors> What am I missing? Peter On 20 Apr 2004, at 10:45, beyaNet Consultancy wrote: Hi, ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action: map:match pattern=login> map:act type=auth-login> map:parameter name=handler value=beyarecords/> map:parameter name=parameter_name value={request-param:user}/> map:parameter name=parameter_password value={request-param:pass}/> map:redirect-to uri=registerd_user_area/> /map:act> !-- authentication failed: --> map:redirect-to uri=login.html/> /map:match> I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area: map:match pattern=registerd_user_area> map:act type=auth-protect> map:parameter name=handler value=beyarecords/> map:aggregate element=home> map:part src=cocoon:/support/beya-menu/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> /map:act> /map:match> Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like: map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate??? Peter
org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined
ndardHostValve.invoke(StandardHostValve.java:195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:324) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:395) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:552) What am I missing here? Peter On 20 Apr 2004, at 11:51, beyaNet Consultancy wrote: Ok, i have discovered that the following line caused my sitemap to bomb out: map:flow-interpreters default=JavaScript/> What does this line do, is it required, will commenting it out prevent flowscript from working properly Peter On 20 Apr 2004, at 11:37, beyaNet Consultancy wrote: Hi, just to add that I am using version 2.1.4 of cocoon. Peter On 20 Apr 2004, at 11:31, beyaNet Consultancy wrote: hi, I have added the following lines of code to my sitemap, and am now getting the above mentioned error message: map:flow-interpreters default=JavaScript/> map:selector name=exception src=org.apache.cocoon.selection.XPathExceptionSelector> exception name=invalid-continuation class=org.apache.cocoon.components.flow.InvalidContinuationException/> exception class=java.lang.Throwable unroll=true/> /map:selector> map:flow language=javascript> map:script src=flow/login.js/> /map:flow> map:match pattern=*.jx> map:generate type=jx src=jx/{1}.jx/> map:serialize type=xhtml/> /map:match> map:match pattern=*.kont> map:call continuation={1}/> /map:match> map:match pattern=invalidContinuation> map:generate src=exceptions/invalidContinuation.xml/> map:serialize type=xml/> /map:match> map:handle-errors> map:select type=exception> map:when test=invalid-continuation> map:generate src=exceptions/invalidContinuation.html/> map:serialize type=xhtml/> /map:when> /map:select> /map:handle-errors> What am I missing? Peter On 20 Apr 2004, at 10:45, beyaNet Consultancy wrote: Hi, ok, so I have been using actions thus far to perform things like login, and now discover the beauty and simplicity of flowscript. So why actions? Anyway, I want to convert an action I currently have to check a users login details to flowscript. So my question is, what do I need to do? My user class is of the getter and setter variety and in my sitemap I have the following code to read the user/password details into the action: map:match pattern=login> map:act type=auth-login> map:parameter name=handler value=beyarecords/> map:parameter name=parameter_name value={request-param:user}/> map:parameter name=parameter_password value={request-param:pass}/> map:redirect-to uri=registerd_user_area/> /map:act> !-- authentication failed: --> map:redirect-to uri=login.html/> /map:match> I now want to change this code so that it can read the values into a flowscript, which in turn queries a user object ( User user = User.getUser(userName, userPassword) ). If the user does not exist i want the user to be re-directed back to the login page, otherwise they are re-directed to my protected area: map:match pattern=registerd_user_area> map:act type=auth-protect> map:parameter name=handler value=beyarecords/> map:aggregate element=home> map:part src=cocoon:/support/beya-menu/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> /map:act> /map:match> Of course I appreciate that those parts of my sitemap which used the map:act type=auth-protect would now need to be changed to reflect using a flowscript instead, something like: map:call function=userLoggedIn/>??? In the above instance, how would I still utilise the map:aggregate??? Peter
Flowscript problems with cocoon version 2.1.4
Hi, I getting an error while trying to setup my first flowscript code. The error I am getting is: org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined Could anyone out there please send me a copy of their sitemap, so as I can see how to properly setup up flowscript within my sitemap. Also I am trying to create a flowscript function which instantiates a User object and passes in 2 parameters, a username and a password. If the user does not exist, the user is redirected back to the login page otherwise they are sent to the secure part of my sitemap. The login function is as follows: var user = null; !-- Do I need to instantiate the object like this ?? > importClass(Packages.test.User); //Note: my package test is situated as: web-inf/classes/test, User being the name of the class in the package test. var User = new User(); function login(){ while (user == null) { sendPageAndWait(login.jx); user = User.getUser(cocoon.request.get(password)); if (user != null) { break; } } cocoon.sendPage(registerd_user_area); //Can I redirect a user to an area of my sitemap from flowscript like this?? } I have attached my sitemap as well. Any help with this will be greatly appreciated. Peter sitemap.xmap Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Flowscript problems with cocoon version 2.1.4
Christopher, the version of Rhino I have installed in my web-inf/lib folder is : rhino1.5r4-continuations-20030906.jar. Is this the correct version for cocoon version 2.1.4? If not, where can I get the correct .jar from? Peter On 20 Apr 2004, at 18:08, Christopher Oliver wrote: Most likely you have another version of Rhino in your classpath. beyaNet Consultancy wrote: Hi, I getting an error while trying to setup my first flowscript code. The error I am getting is: *org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined *Could anyone out there please send me a copy of their sitemap, so as I can see how to properly setup up flowscript within my sitemap. Also I am trying to create a flowscript function which instantiates a User object and passes in 2 parameters, a username and a password. If the user does not exist, the user is redirected back to the login page otherwise they are sent to the secure part of my sitemap. The login function is as follows: var user = null; !-- Do I need to instantiate the object like this ?? importClass(Packages.test.User); //Note: my package test is situated as: web-inf/classes/test, User being the name of the class in the package test. var User = new User(); function login(){ while (user == null) { sendPageAndWait(login.jx); user = User.getUser(cocoon.request.get(username),cocoon.request.get(passwo rd)); if (user != null) { break; } } cocoon.sendPage(registerd_user_area); //Can I redirect a user to an area of my sitemap from flowscript like this?? } I have attached my sitemap as well. Any help with this will be greatly appreciated. Peter -- -- - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Flowscript problems with cocoon version 2.1.4
is anybody having problems with flowscript on version 2.1.4 of cocoon? If not, could you send me a copy of your js.jar and rhino1.5r4-continuations-20030906.jar as I continue to get the following error message: x-tad-biggerReferenceError: Continuation is not defined. (resource://org/apache/cocoon/components/flow/javascript/fom/fom_system.js; line 1) Alternatively if anyone else has had the same problem and managed to resolve it, could you please inform me as to the solution to this problem. I really need to get this issue finished today. Peter/x-tad-bigger On 20 Apr 2004, at 18:28, beyaNet Consultancy wrote: Christopher, the version of Rhino I have installed in my web-inf/lib folder is : rhino1.5r4-continuations-20030906.jar. Is this the correct version for cocoon version 2.1.4? If not, where can I get the correct .jar from? Peter On 20 Apr 2004, at 18:08, Christopher Oliver wrote: Most likely you have another version of Rhino in your classpath. beyaNet Consultancy wrote: Hi, I getting an error while trying to setup my first flowscript code. The error I am getting is: *org.apache.avalon.framework.CascadingRuntimeException: Continuation is not defined *Could anyone out there please send me a copy of their sitemap, so as I can see how to properly setup up flowscript within my sitemap. Also I am trying to create a flowscript function which instantiates a User object and passes in 2 parameters, a username and a password. If the user does not exist, the user is redirected back to the login page otherwise they are sent to the secure part of my sitemap. The login function is as follows: var user = null; !-- Do I need to instantiate the object like this ?? > importClass(Packages.test.User); //Note: my package test is situated as: web-inf/classes/test, User being the name of the class in the package test. var User = new User(); function login(){ while (user == null) { sendPageAndWait(login.jx); user = User.getUser(cocoon.request.get(username),cocoon.request.get(password)); if (user != null) { break; } } cocoon.sendPage(registerd_user_area); //Can I redirect a user to an area of my sitemap from flowscript like this?? } I have attached my sitemap as well. Any help with this will be greatly appreciated. Peter - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
redirect problem with flowscript : No pipeline matched request: safe_user_area
Hi, i have a flowscript funtion which does the following: var user = null; importClass(Packages.test.User); var newUser = new User(); var msg = ; function login() { while (user == null) { cocoon.sendPageAndWait(login.jx, {msg:msg}); try { user = newUser.getUser(cocoon.request.get(username), cocoon.request.get(password) ); break; }catch(e){ msg = The username password combination you entered does not exist. Please retry.; } } cocoon.sendPage(safe_user_area); } So, when a user has been accepted at login redirect them to safe_user_area. I have tried cocoon.redirect(uri) but keep getting an error which says that the redirect function does not exist, when it does! When am I being told that a map pattern which exists, doesn't map:match pattern=safe_user_area> map:aggregate element=home> map:part src=cocoon:/support/beya-menu/> map:part src=cocoon:/support/contract-summary/> map:part src=context://beyarecords/content/adv-xyz-01.xml/> map:part src=cocoon:/support/banner/> /map:aggregate> map:transform type=xslt src=style/home-page.xsl/> map:call resource=serialize/> Peter
How to determine if a session object has already been created
Hi, How do I determine, in XSP:LOGIC, whether a session object has already been created? Basically I am trying to persist an object, in this case an Order object, in a session: //1.Determine if an order has been created Order newOrder = (Order)session.getAttribute(ORDER); if (newOrder == null){ newOrder = new Order(); } //2.check that stock exists Stock newStk = InsertOrder.checkStock(d1e22501fbd4255600fbd42559d30001); //3.Add stock item newOrder.addProduct(newStk,32); //4.Update Session object session.setAttribute(ORDER, newOrder); The problem is that the if statement is not working, and as a result a new Order object is being created on each pass of the page. What am I doing wrong? Peter
How to determine if a session object has already been created
Hi, How do I determine, in XSP:LOGIC, whether a session object has already been created? Basically I am trying to persist an object, in this case an Order object, in a session: //1.Determine if an order has been created Order newOrder = (Order)session.getAttribute(ORDER); if (newOrder == null){ newOrder = new Order(); } //2.check that stock exists Stock newStk = InsertOrder.checkStock(d1e22501fbd4255600fbd42559d30001); //3.Add stock item newOrder.addProduct(newStk,32); //4.Update Session object session.setAttribute(ORDER, newOrder); The problem is that the if statement is not working, and as a result a new Order object is being created on each pass of the page. What am I doing wrong? Peter
Re: How to determine if a session object has already been created
Hi, ok, seems I have a handle on this issue now. I was testing the code using Safari 1.25 (Browser) on OS X 10.3.3. By default, the browser is set to accept cookies 'only from sites you navigate to'!. Changing this setting to accept cookies 'always' solved the problem. Correct me if I am wrong here, but isn't a session variable created on the server??? Why are the browsers coolie settings affecting this??? Peter On 14 Apr 2004, at 22:36, beyaNet Consultancy wrote: Hi, How do I determine, in XSP:LOGIC, whether a session object has already been created? Basically I am trying to persist an object, in this case an Order object, in a session: //1.Determine if an order has been created Order newOrder = (Order)session.getAttribute(ORDER); if (newOrder == null){ newOrder = new Order(); } //2.check that stock exists Stock newStk = InsertOrder.checkStock(d1e22501fbd4255600fbd42559d30001); //3.Add stock item newOrder.addProduct(newStk,32); //4.Update Session object session.setAttribute(ORDER, newOrder); The problem is that the if statement is not working, and as a result a new Order object is being created on each pass of the page. What am I doing wrong? Peter
XHTML/XSLT issue
Hi, In my site pages I am having an issue whereby when you view source on a page you can still see some of the xslt tags embedded in some of the html tags, for instance: form xmlns:xsp=http://apache.org/xsp; xmlns:util=http://apache.org/xsp/util/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; action=login method=post How do I prevent this from happening, so that the tag just reads as?: form action= method= All my pages need to be serialized as serverpages. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XHTML/XSLT issue
Ugo, thanks for that ;-) Peter On 2 Apr 2004, at 15:54, Ugo Cei wrote: beyaNet Consultancy wrote: Hi, In my site pages I am having an issue whereby when you view source on a page you can still see some of the xslt tags embedded in some of the html tags, for instance: form xmlns:xsp=http://apache.org/xsp; xmlns:util=http://apache.org/xsp/util/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; action=login method=post How do I prevent this from happening, so that the tag just reads as?: form action= method= All my pages need to be serialized as serverpages. !-- - Namespace removing templates - from http://outerthought.net/wiki/Wiki.jsp?page=RemoveNamespaces -- xsl:template match=* priority=-1 mode=copy xsl:element name={local-name()} xsl:copy-of select=@*/ xsl:apply-templates mode=copy/ /xsl:element /xsl:template xsl:template match=text() mode=copy xsl:value-of select=./ /xsl:template Ugo - 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: XHTML/XSLT issue
Ugo, the code you sent even strips out all of the html and leaves only the values passed into the xslt page! All I want is to be able to strip out the xml code that appears within the html tags ;-) what do I need to do? Peter On 2 Apr 2004, at 15:54, Ugo Cei wrote: xsl:element name={local-name()} xsl:copy-of select=@*/ xsl:apply-templates mode=copy/ /xsl:element - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XHTML/XSLT issue
Christopher, in all intents and purposes, the code you sent works, but there are a few instances where I am left with the following: image xmlns= src=artistImage/32/228/202/1.jpg / i.e. an xmlns= Anything we can do about those? Peter On 2 Apr 2004, at 17:23, Christopher Painter-Wakefield wrote: I think maybe you are missing the context for the code that was supplied. It looks to me as if it was intended to be used within another stylesheet (e.g., priority='-1'). Here is a complete stylesheet that should work if you apply it as a separate transform (I tested it briefly): -cleanup.xsl--- ?xml version=1.0? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0 xsl:template match=* xsl:element name={local-name()} xsl:apply-templates select=@*|node()/ /xsl:element /xsl:template xsl:template match=@*|text() xsl:copy/ /xsl:template /xsl:stylesheet --- If you want to not lose comments and that sort of thing, you may need to add templates, but this will copy everything that counts. -Christopher |-+ | | beyaNet | | | Consultancy | | | [EMAIL PROTECTED]| | | .com| | || | | 04/02/2004 11:08 | | | AM | | | Please respond to| | | users| | || |-+ -- | | | | To: [EMAIL PROTECTED] | | cc: | | Subject: Re: XHTML/XSLT issue | -- | Ugo, the code you sent even strips out all of the html and leaves only the values passed into the xslt page! All I want is to be able to strip out the xml code that appears within the html tags ;-) what do I need to do? Peter On 2 Apr 2004, at 15:54, Ugo Cei wrote: xsl:element name={local-name()} xsl:copy-of select=@*/ xsl:apply-templates mode=copy/ /xsl:element - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XHTML/XSLT issue
Chris, you the man! ;-) Peter On 2 Apr 2004, at 17:23, Christopher Painter-Wakefield wrote: xsl:template match=* xsl:element name={local-name()} xsl:apply-templates select=@*|node()/ /xsl:element /xsl:template xsl:template match=@*|text() xsl:copy/ /xsl:template - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: (* - BIG - *) problem with Postgresql JDBC (related to Cocoon) - WAS Encoding problem on OSX
Hi, for what it's worth, while using the following: OS X 10.3.3 postgreSQL 7.4.1 pg74.1jdbc3.jar (postgreSQL JDBC driver) Cocoon 2.1.4 Hibernate 2.1.1 I have had absolutely no encoding problems with postgreSQL. Maybe this can be attributed to using Hibernate as my persistence layer, and not using esql! Peter On 1 Apr 2004, at 13:40, Stephen Winnall wrote: I'm glad Yves has found a work-around to his problem. However, I would like to point out that I am using the following together under Mac OS X 10.3.3: PostgreSQL 7.4 PG JDBC 7.3 Cocoon 2.1.4 Java 1.4.2 and a database containing French and German diacritics, and I have had no problem at all. I originally used PostgreSQL 7.3.3 and made no change to the database when I upgraded. It may be significant that I used Marc Liyanage's PostgreSQL package (http://www.entropy.ch/software/macosx/) rather than compiling the thing myself. Regards Steve On 1 Apr 2004, at 14:24, Yves Vindevogel wrote: Sure, but ... it's not only OSX related. I had the same problem too on Linux (Slack 9.1) Seems to be a bug in Postgresql 7.4 (maybe) or my compilation of the driver (now checking) Anyway, I think it should be put under a topic Cocoon, file encoding and database (jdbc) encoding I'll create my piece of that document. No problem with that. On 01 Apr 2004, at 14:08, Jorg Heymans wrote: Thank god you finally solved it ! :) Seeing how much time you've spent on this (weeks AFAIK), could you wiki this up maybe? I know the end solution shows that it was never really a cocoon related problem but it could go into a how to get postgres and cocoon to play well together on MacOSX section. Regards Jorg Yves Vindevogel wrote: I mailed with Peter Mount regarding the Encoding problem on OSX. I found out this Peter sent me his .jar from version 7.2. I recompiled my database and did initdb again, this time with --encoding=latin1 I used his jar, and tested with some dburls. The one that works is with ?charSet=UTF8 And then, all of a suddenly, it works !!! I see no real logic in it, but after searching a couple of weeks, I'm happy that it works. I mailed Peter to find out why my jar is not working. Hope to hear from him soon. This may be a bit off topic now, but I'd like to inform Alex and others that I did find a solution. My tests with UTF8 proved vital, maybe they can do that too. Begin forwarded message: *From: *Peter Mount [EMAIL PROTECTED]> *Date: *Thu 1 Apr 2004 11:25:54 CEST *To: *Yves Vindevogel [EMAIL PROTECTED]> *Subject: Re: (* - BIG - *) problem with Postgresql JDBC (related to Cocoon) * Yves Vindevogel wrote: Hi Peter, Thanks for the quick answer. I installed a Java SQL client called SQL4J. It's just a graphical thing around some JDBC drivers to do queries. The problem occurs there too, so it's not Cocoon related. Last night, I recompiled my postgresql with ./configure options: --with-java --with-perl --with-python --with-tcl --without-readline --without-tk and --with-multibyte (I saw this was a configure option in version 7.2 or 7.1, which is no longer used or no longer documented at least) I did my initdb with ./initdb -D mydir --encoding=latin1 and locale=us_en (or en_us) I created my testdb also with the --encoding=latin1 That should help, right ? This is the way I do my encoding of the database ? Yes, although all that was needed was the createdb with --encoding=latin1. Adding that to initdb simply makes it the default for createdb. And for the jdbc url, I can simply use ?charSet=latin1 Try it without ?charSet=latin1 and see what happens. I don't use it here (while my db's are latin1), so that may be part of the problem. The db is sending it ok, but then because of that parameter, the jdbc driver is then trying to translate it again. Could there be a conjunction with the Java VM ? I had this database running in version 7.3 and I had a problem connecting from one machine. That was a machine with all the latest software on it, including JVM 1.4.2_03. Old installations didn't have that problem. I find that the JVM version doesn't really matter. Usually with connection problems, its the version of postgresql and the jdbc driver that causes it most. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Met vriendelijke groeten, Bien à vous, Kind regards, Yves Vindevogel Implements Mail: [EMAIL PROTECTED] - Mobile: +32 (478) 80 82 91 Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76 Markt 18c - 9700 Oudenaarde - Tel: +32 (55) 30 55 76 Web: http://www.implements.be First they ignore you. Then they laugh at you. Then they fight you. Then you win. Mahatma Ghandi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [genuine] Re: MacOSX 10.3.3, Java 1.4.2, JAVA_HOME problem
Hi, glad to see that there are other cocoon OS X users here! I wonder whether you OS X users could check something for me. On the main 'Welcome to Apache Cocoon!' page if you click the samples link, Hello World link (under The Power of XML), JPEG link (under Blocks Hello World!), could you tell me whether you receive a java error when you click this link? Peter On 30 Mar 2004, at 12:29, Jochen Hagenström wrote: export THANK_YOU=Ugo I put did that in my .bashrc. jacques Am 30.03.2004 um 12:47 schrieb Ugo Cei: jacques couzteau wrote: Why wouldn't cocoon accept the value i set for JAVA_HOME in the bash? It's a mystery to me. Any ideas anyone? Because you didn't export the variable. Ugo - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Character encoding...
Hi Marc, I am trying to achieve the following: 1. Determine, in my sitemap, whether a browser is XHTML 1.1 compatible. If it is, the XHTML 1.1 serializer is used, which when view sourced in the browser you see: ?xml version=1.0 encoding=UTF-8?> !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 //EN http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd> Now, as part of the XHTML 1.1 specification you also need to say the following in the html> tag: html xmlns=http://www.w3.org/1999/xhtml> I have not found a way in the serialization process of writing the xmlns line into the html> tag if the browser viewing the site is XHTML 1.1 compatible, so I thought maybe if I specify UTF-8 as the encoding type for XHTML 1.1 browsers and a different encoding type for non 1.1 browsers, I could then dynamically write the xmlns line into the tag if the browser was XHTML 1.1 compatible. Do you know of a more efficient way I could probably do this? Peter p.s. sitemap snippet: map:serializer name=xhtml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/html logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2> doctype-public>-//W3C//DTD XHTML 1.1 //EN/doctype-public> /doctype-system> /encoding> /indent> /map:serializer> map:serializer name=html mime-type=text/html src=org.apache.cocoon.serialization.HTMLSerializer> /indent> encoding>/encoding> /omit-xml-declaration> doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN/doctype-public> /doctype-system> /map:serializer> map:resource name=serialize> map:select type=browser> map:when test=safari> map:serialize type=html/> /map:when> map:otherwise> map:serialize type=xhtml/> /map:otherwise> /map:select> /map:resource> ... map:match pattern=unsupport/menu> map:generate type=serverpages src=xsp/menu2.xsp/> map:call resource=serialize/> /map:match> On 27 Mar 2004, at 07:30, Marc Portier wrote: Peter, sorry for the bad advice then, but you lost me, pls elaborate on where you see what and how your setup is looking and what you try to achieve regards, -marc= beyaNet Consultancy wrote: Marc, I am using Cocoon version 2.1.4. I have made the changes you mentioned, but nothing has really changed. If I now xsp-request:get-character-encoding> and change the encoding in the page so that it now reads ?xml version=1.0 encoding=ISO-8859-1?> i still only get what is specified in the web.xml document and not in the web-page. Any ideas? Peter On 26 Mar 2004, at 23:08, Marc Portier wrote: beyaNet Consultancy wrote: Hi, I am trying to obtain the encoding type as specified in at the top of my site page when you view source the page. At the moment the encoding type is specified as: ?xml version=1.0 encoding=UTF-8?> !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 //EN http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd> html> I was under the impression that if i used xsp-request:get-character-encoding> that it would return UTF-8, in this instance. At the moment it is returning ISO-8859-1 which is the encoding type of the server. How do I get the encoding type as specified within my page? which version of cocoon are you using? pre 2.1.3 there was a possible mismatch between the encoding used in the html-generation (encoding) and the one used in the request-parameter-processing (decoding) this should be fixed per http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=1.6view=markup http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java?rev=1.20view=markup prior to this you can manually assure that both sides are in sync: just make sure the encoding set-up in your serializer> (see it's config in sitemap.xmap) is matching the setting in the web.xml (see init-param 'form-encoding' to the cocoon servlet) HTH, -marc= many thanks in advance Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center Read my weblog at http://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Portierhttp://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center Read my weblog athttp://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Character encoding...
Hi, I am trying to obtain the encoding type as specified in at the top of my site page when you view source the page. At the moment the encoding type is specified as: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 //EN http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd; html I was under the impression that if i used xsp-request:get-character-encoding that it would return UTF-8, in this instance. At the moment it is returning ISO-8859-1 which is the encoding type of the server. How do I get the encoding type as specified within my page? many thanks in advance Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Character encoding...
Marc, I am using Cocoon version 2.1.4. I have made the changes you mentioned, but nothing has really changed. If I now xsp-request:get-character-encoding> and change the encoding in the page so that it now reads ?xml version=1.0 encoding=ISO-8859-1?> i still only get what is specified in the web.xml document and not in the web-page. Any ideas? Peter On 26 Mar 2004, at 23:08, Marc Portier wrote: beyaNet Consultancy wrote: Hi, I am trying to obtain the encoding type as specified in at the top of my site page when you view source the page. At the moment the encoding type is specified as: ?xml version=1.0 encoding=UTF-8?> !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 //EN http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd> html> I was under the impression that if i used xsp-request:get-character-encoding> that it would return UTF-8, in this instance. At the moment it is returning ISO-8859-1 which is the encoding type of the server. How do I get the encoding type as specified within my page? which version of cocoon are you using? pre 2.1.3 there was a possible mismatch between the encoding used in the html-generation (encoding) and the one used in the request-parameter-processing (decoding) this should be fixed per http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=1.6view=markup http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/java/org/apache/cocoon/servlet/CocoonServlet.java?rev=1.20view=markup prior to this you can manually assure that both sides are in sync: just make sure the encoding set-up in your serializer> (see it's config in sitemap.xmap) is matching the setting in the web.xml (see init-param 'form-encoding' to the cocoon servlet) HTH, -marc= many thanks in advance Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Portierhttp://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center Read my weblog athttp://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XHTML 1.1 Declaration
Hi, I have specified the following XHTML declaration in my sitemap: map:serializer name=xhtml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/html logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2> doctype-public>-//W3C//DTD XHTML 1.1 //EN/doctype-public> /doctype-system> /encoding> /indent> /map:serializer> As part of the XHTML declaration it is required that the following is psecified within the opening html tag: html xmlns=http://www.w3.org/1999/xhtml> My question is this, as I have also declared a map:select type=browser/> which depending on the browser determines which serializer to use, is there a global parameter I can specify within my sitemap which when an XHTML 1.1 compatible browser is detected also writes xmlns=http://www.w3.org/1999/xhtml into the opening html tag? I ask this because my site is broken down into frames and I don't want to have to go through each page putting some form of code which determines the browser type, and if XHTML 1.1 writes the xmlns declaration into the html tag. So if browser is XHTML 1.1 compatible: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 //EN http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd> html xmlns=http://www.w3.org/1999/xhtml> x-tad-bigger Peter /x-tad-bigger
Re: XHTML 1.1 Declaration
Hi, has anyone got any ideas to this problem. For example I was thinking of something like: map:serializer name=xhtml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/html logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2> doctype-public>-//W3C//DTD XHTML 1.1 //EN/doctype-public> /doctype-system> /encoding> /indent> html>xmlns=http://www.w3.org/1999/xhtml/html> /map:serializer> make sense? Peter On 25 Mar 2004, at 11:37, beyaNet Consultancy wrote: Hi, I have specified the following XHTML declaration in my sitemap: map:serializer name=xhtml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/html logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2> doctype-public>-//W3C//DTD XHTML 1.1 //EN/doctype-public> /doctype-system> /encoding> /indent> /map:serializer> As part of the XHTML declaration it is required that the following is psecified within the opening html tag: html xmlns=http://www.w3.org/1999/xhtml> My question is this, as I have also declared a map:select type=browser/> which depending on the browser determines which serializer to use, is there a global parameter I can specify within my sitemap which when an XHTML 1.1 compatible browser is detected also writes xmlns=http://www.w3.org/1999/xhtml into the opening html tag? I ask this because my site is broken down into frames and I don't want to have to go through each page putting some form of code which determines the browser type, and if XHTML 1.1 writes the xmlns declaration into the html tag. So if browser is XHTML 1.1 compatible: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 //EN http://www.w3.org/TR/xhtml1/DTD/xhtml1.dtd> html xmlns=http://www.w3.org/1999/xhtml> x-tad-bigger Peter /x-tad-bigger
Re: Serving XHTML with Cocoon (was: Empty elements and the XML Serializer)
Hi, would i be right in thinking that the following sitemap snippet does not actually turn my document into an xhtml document!?: map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer> doctype-public>-//W3C//DTD XHTML 1.0 Transitional/EN/doctype-public> /doctype-system> /map:serializer> Peter On 23 Mar 2004, at 05:47, Jean Pierre LeJacq wrote: On Mon, 22 Mar 2004, Steve Krulewitz wrote: First of all, you need to specify an XHTML doctype and use the XHTML namespace for the xhtml elements in your document. You also need to send the application/xhtml+xml content type with your response. But here is the problem -- Internet Explorer does not like this, and will ... map:serializer name=xhtml-ie mime-type=text/html; charset=utf-8 src=org.apache.cocoon.serialization.XMLSerializer doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN/doctype-public> doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system> encoding>UTF-8/encoding> indent>yes/indent> /map:serializer> ... Is this on par with other people's experience dealing with this problem? I see two problem. * This will not solve the problem in Mozilla. Even with properly declared doctype and a valid document, Mozilla will render textarea/> incorrectly. Its a bug in Mozilla. I didn't check to see if its in Mozilla's bug database. * I've run into a problem with the cocoon serializer not respecting content type UTF-8. I've only been able to get ISO Latin to work. See: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26997 -- JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serving XHTML with Cocoon (was: Empty elements and the XML Serializer)
Hi, I have changed my site map to include the following xhtml serializer: map:serializer name=xhtml src=org.apache.cocoon.serialization.XMLSerializer mime-type=text/html logger=sitemap.serializer.xhtml pool-grow=2 pool-max=64 pool-min=2> doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN/doctype-public> /doctype-system> /encoding> /indent> /map:serializer> Now when i try and load the site in Safari 1.2.1 nothing happens. No error is displayed, and if you view source the page the code is there to be seen, but the page is not being displayed. What is happening here?? The site displays fine in both Netscape 7.1 and Mozilla 1.7a. I am running on OS X 10.3.3, Apache tomcat 5, cocoon 2.1.4 Peter On 23 Mar 2004, at 08:59, Jean Pierre LeJacq wrote: On Tue, 23 Mar 2004, beyaNet Consultancy wrote: would i be right in thinking that the following sitemap snippet does not actually turn my document into an xhtml document!?: map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer> doctype-public>-//W3C//DTD XHTML 1.0 Transitional/EN/doctype-public> doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd/doctype-system> /map:serializer> Assuming you have the paths correct, that should do it. Its simple enough to validate for yourself. Just submit it to the www.w3.org validator. The only change you might want to consider is adding: media-type>application/xhtml+xml/media-type> Unfortunately, IE doesn't recognize this so its not particularly useful. See: http://www.w3.org/TR/2002/NOTE-xhtml-media-types-20020801/ -- JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML Parsing Error: no element found
hi, I am getting the above error message when I try and run the following xsp page. Can I do this? If not how do I?? ?xml version=1.0 encoding=ISO-8859-1?> xsp:page language=java xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0 xmlns:xlink=http://www.w3.org/1999/xlink xmlns=http://www.w3.org/2000/svg> xsp:structure> /xsp:include> /xsp:structure> xsp:element name=svg> xsp:logic> int svgWidth = Integer.parseInt(util:get-sitemap-parameter name=svgWidth/>); int svgHeight = Integer.parseInt(util:get-sitemap-parameter name=svgHeight/>); /xsp:logic> xsp:attribute name=width>xsp:expr>svgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>svgHeight/xsp:expr>/xsp:attribute> xsp:logic> ... Code. /xsp:logic> !-- spit the image back to the browser requester --> xsp:element name=svg> xsp:attribute name=width>xsp:expr>svgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>svgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=viewBox>0 0 /xsp:expr> /xsp:expr>/xsp:attribute> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=border>/xsp:attribute> xsp:attribute name=width>xsp:expr>imgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>imgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> /xsp:element> /xsp:element> /xsp:element> My pipeline is: map:match pattern=**artistImage/*/*/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={5}/> map:parameter name=artistID value={2}/> map:parameter name=svgWidth value={3}/> map:parameter name=svgHeight value={4}/> /map:generate> map:serialize type=svg2jpeg/> /map:match>
Re: XML Parsing Error: no element found
Ok, I have come across a solution which works! It is: svg> xsp:logic> int svgWidth = Integer.parseInt(util:get-sitemap-parameter name=svgWidth/>); int svgHeight = Integer.parseInt(util:get-sitemap-parameter name=svgHeight/>); xsp:attribute name=width>xsp:expr>svgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>svgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=viewBox>0 0 /xsp:expr> /xsp:expr>/xsp:attribute> I was under the impression that you could only use xsp:attribute/> within an xsp:element/> tag. It seems not! very nice.... Peter On 22 Mar 2004, at 10:46, beyaNet Consultancy wrote: hi, I am getting the above error message when I try and run the following xsp page. Can I do this? If not how do I?? ?xml version=1.0 encoding=ISO-8859-1?> xsp:page language=java xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0 xmlns:xlink=http://www.w3.org/1999/xlink xmlns=http://www.w3.org/2000/svg> xsp:structure> /xsp:include> /xsp:structure> xsp:element name=svg> xsp:logic> int svgWidth = Integer.parseInt(util:get-sitemap-parameter name=svgWidth/>); int svgHeight = Integer.parseInt(util:get-sitemap-parameter name=svgHeight/>); /xsp:logic> xsp:attribute name=width>xsp:expr>svgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>svgHeight/xsp:expr>/xsp:attribute> xsp:logic> ... Code. /xsp:logic> !-- spit the image back to the browser requester --> xsp:element name=svg> xsp:attribute name=width>xsp:expr>svgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>svgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=viewBox>0 0 /xsp:expr> /xsp:expr>/xsp:attribute> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=border>/xsp:attribute> xsp:attribute name=width>xsp:expr>imgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>imgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> /xsp:element> /xsp:element> /xsp:element> My pipeline is: map:match pattern=**artistImage/*/*/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={5}/> map:parameter name=artistID value={2}/> map:parameter name=svgWidth value={3}/> map:parameter name=svgHeight value={4}/> /map:generate> map:serialize type=svg2jpeg/> /map:match>
org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be = 0 Batik SVG cocoon bug???
Hi, I think that i may have stumbled on a bug with usage of SVG in cocoon. I have a pipeline which takes in a jpg: map:match pattern=**artistImage/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={3}/> map:parameter name=artistID value={2}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> This in turn causes xsp:/svg.xsp to be processed. The code in svg.xsp is: xsp:structure> /xsp:include> /xsp:structure> svg width=100 height=100> xsp:logic> String base64 = null; String width = 300; String height = 300; try { int imageNum = Integer.parseInt(util:get-sitemap-parameter name=imageNum/>); int artistID = Integer.parseInt(util:get-sitemap-parameter name=artistID/>); !-- request made to static object --> base64 = ArtistImages.getArtistImage(artistID,imageNum); }catch (Exception e) { width = 100; height = 100; !-- request made to static object --> base64 = ArtistImages.getArtistImage(util:get-sitemap-parameter name=imageNum/>); } !-- spit the image back to the browser requester --> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>xsp:expr>width/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>height/xsp:expr>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> /xsp:element> /xsp:logic> /svg> The problem lays with the width and height attributes of the svg tag being specified as percentages. I specified them as so because I wanted the canvas size to same size as the image size. This causes the above mentioned error to be thrown. If I replace the width and height with whole sizes the problem is rectified. What is happening here as I know that Percentages are valid for the width and height of an svg!?? The full exception stack trace is: Original Exception: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be = 0 at org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:246) at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:166) at org.apache.cocoon.www.beyarecords.xsp.svg_xsp.generate(org.apache.cocoon.www.beyarecords.xsp.svg_xsp:283) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:263) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:573) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:196) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:525) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:155) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at
Re: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be = 0 Batik SVG cocoon bug???
Hi, I should have added that my version of cocoon is 2.1.4 running on OS X 10.3.3 with postgresql 7.4.1 many thanks in advance On 21 Mar 2004, at 12:11, beyaNet Consultancy wrote: Hi, I think that i may have stumbled on a bug with usage of SVG in cocoon. I have a pipeline which takes in a jpg: map:match pattern=**artistImage/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={3}/> map:parameter name=artistID value={2}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> This in turn causes xsp:/svg.xsp to be processed. The code in svg.xsp is: xsp:structure> /xsp:include> /xsp:structure> svg width=100 height=100> xsp:logic> String base64 = null; String width = 300; String height = 300; try { int imageNum = Integer.parseInt(util:get-sitemap-parameter name=imageNum/>); int artistID = Integer.parseInt(util:get-sitemap-parameter name=artistID/>); !-- request made to static object --> base64 = ArtistImages.getArtistImage(artistID,imageNum); }catch (Exception e) { width = 100; height = 100; !-- request made to static object --> base64 = ArtistImages.getArtistImage(util:get-sitemap-parameter name=imageNum/>); } !-- spit the image back to the browser requester --> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>xsp:expr>width/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>height/xsp:expr>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> /xsp:element> /xsp:logic> /svg> The problem lays with the width and height attributes of the svg tag being specified as percentages. I specified them as so because I wanted the canvas size to same size as the image size. This causes the above mentioned error to be thrown. If I replace the width and height with whole sizes the problem is rectified. What is happening here as I know that Percentages are valid for the width and height of an svg!?? The full exception stack trace is: Original Exception: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be = 0 at org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:246) at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:166) at org.apache.cocoon.www.beyarecords.xsp.svg_xsp.generate(org.apache.cocoon.www.beyarecords.xsp.svg_xsp:283) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:263) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:573) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:196) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:525) at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:155) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84) at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162) at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107) at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371) at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312) at org.apache.cocoon.Cocoon.process(Cocoon.java:656) at org.apache.cocoon.servle
Dynamic SVG tag...
Hi, I have been trying to resolve an issue with how to make an opening svg tag dynamic, in terms of the width and height, and wondered if you have an suggestions. I have an xsp page which spits out an svg as so: xsp:structure> /xsp:include> /xsp:structure> svg width=x height=x x=0 y=0> xsp:logic> ... Code int svgWidth = Integer.parseInt(util:get-sitemap-parameter name=svgWidth/>); int svgHeight = Integer.parseInt(util:get-sitemap-parameter name=svgHeight/>); /xsp:logic> !-- spit the image back to the browser requester --> xsp:element name=svg> xsp:attribute name=width>xsp:expr>svgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>svgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=viewBox>0 0 /xsp:expr> /xsp:expr>/xsp:attribute> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=border>/xsp:attribute> xsp:attribute name=width>xsp:expr>imgWidth/xsp:expr>/xsp:attribute> xsp:attribute name=height>xsp:expr>imgHeight/xsp:expr>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> /xsp:element> /xsp:element> /svg> What I need to be able to do is to construct the opening svg tag by pulling in the values of svgWidth and svgHeight. So for example: svg width=svgWidth height=svgHeight> How would I go about doing this in this instance? Peter
Entity declaration
Hi, I have an entity in my page, nbsp;, which when passed through cocoon throws an error. How do you handle entities in cocoon? many thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Entity declaration
Hi, could you show me an example of how to do this please. many thanks in advance On 8 Mar 2004, at 12:14, David Leangen wrote: Hi! One way, and perhaps the easiest, is to declare your entities somewhere in your DTD. Hope this helps. Dave -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: March 8, 2004 20:57 To: [EMAIL PROTECTED] Subject: Entity declaration Hi, I have an entity in my page, nbsp;, which when passed through cocoon throws an error. How do you handle entities in cocoon? many thanks in advance - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Entity declaration
Robert, for the short term your last reply is sufficient, but for the long term it would be best if i declare it in an entity tag within my dtd. many thanks Andrew On 8 Mar 2004, at 13:48, [EMAIL PROTECTED] wrote: If you want to use a space character, try #160; -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: 08mm2004 14:41 To: [EMAIL PROTECTED] Subject: Re: Entity declaration Hi, could you show me an example of how to do this please. many thanks in advance On 8 Mar 2004, at 12:14, David Leangen wrote: Hi! One way, and perhaps the easiest, is to declare your entities somewhere in your DTD. Hope this helps. Dave -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: March 8, 2004 20:57 To: [EMAIL PROTECTED] Subject: Entity declaration Hi, I have an entity in my page, nbsp;, which when passed through cocoon throws an error. How do you handle entities in cocoon? many thanks in advance - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Entity declaration
All is fine now. I am using the Catalog DTD. many thanks in advance On 8 Mar 2004, at 13:52, beyaNet Consultancy wrote: Robert, for the short term your last reply is sufficient, but for the long term it would be best if i declare it in an entity tag within my dtd. many thanks Andrew On 8 Mar 2004, at 13:48, [EMAIL PROTECTED] wrote: If you want to use a space character, try #160; -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: 08mm2004 14:41 To: [EMAIL PROTECTED] Subject: Re: Entity declaration Hi, could you show me an example of how to do this please. many thanks in advance On 8 Mar 2004, at 12:14, David Leangen wrote: Hi! One way, and perhaps the easiest, is to declare your entities somewhere in your DTD. Hope this helps. Dave -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: March 8, 2004 20:57 To: [EMAIL PROTECTED] Subject: Entity declaration Hi, I have an entity in my page, nbsp;, which when passed through cocoon throws an error. How do you handle entities in cocoon? many thanks in advance - 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] - 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] - 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]
DTD declaration in html page...
Hi, when viewing the source of my html pages they have an HTML 4 DTD: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtd> I want my page to render with an XHTML DTD being specified at the top of the page when I view the source: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional/EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> How dod I do this? many thanks in advance
Re: DTD declaration in html page...
ok, I found it. I will supersede the definition in the root sitemap.xmap: map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer> doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN/doctype-public> /doctype-system> /map:serializer> with my own definition in my application sitemap.xmap: map:serializer logger=sitemap.serializer.html mime-type=text/html name=html pool-grow=4 pool-max=32 pool-min=4 src=org.apache.cocoon.serialization.HTMLSerializer> -//W3C//DTD XHTML 1.0 Transitional/EN/doctype-public> /doctype-system> /map:serializer> If this is incorrect please advise. many thanks in return On 8 Mar 2004, at 16:54, beyaNet Consultancy wrote: Hi, when viewing the source of my html pages they have an HTML 4 DTD: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//ENhttp://www.w3.org/TR/html4/loose.dtd> I want my page to render with an XHTML DTD being specified at the top of the page when I view the source: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional/EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> How dod I do this? many thanks in advance
xsp:attribute declaration problem.....
Hi, I am having a strange problem defining the declare attribute of the OBJECT tag. My code is so: xsl:template match=artistDetails:currentTrack> xsp:element name=object> xsp:attribute name=data>music/Borderline.mp3/xsp:attribute> xsp:attribute name=type>audio/mpeg/xsp:attribute> xsp:attribute name=declare>declare/xsp:attribute> /xsp:element> /xsl:template> When the page is rendered as HTML, and the source viewed, the object tag reads as: object data=music/Borderline.mp3 type=audio/mpeg declare>/object>. This is incorrect. It should read: object data=music/Borderline.mp3 type=audio/mpeg declare=declare>/object>. Why is the declare attribute being chopped like this? Is this a bug? It seems that if you define an attribute and assign a value which has the same name, the attribute value pair is then not rendered properly Does anyone have a solution for this? What I am expecting to happen here is for the mp3 file to be download but not to start playing until some form of user interaction takes play, i.e. clicking an ahref link for example. This is not happening as the declare attribute is not being properly declared !! many thanks in advance
Re: attribute declaration problem.....
Hi Corin, I changed the code to: xsl:element name=object> xsl:attribute name=data>music/Borderline.mp3/xsl:attribute> xsl:attribute name=type>audio/mpeg/xsl:attribute> xsl:attribute name=declare>declare/xsl:attribute> /xsl:element> and still the object when rendered reads as : object data=music/Borderline.mp3 type=audio/mpeg declare>/object> when it should read as : object data=music/Borderline.mp3 type=audio/mpeg declare=declare>/object>. Any ideas? many thanks in advance Andrew On 8 Mar 2004, at 01:14, Corin Moss wrote: Hi, Out of curiosity more than anything else - why not use the xsl element and attribute? Is there a specific reason not to? Does this behaviour still happen when using xsl:element? Corin -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Monday, 8 March 2004 2:12 p.m. To: [EMAIL PROTECTED] Subject: xsp:attribute declaration problem. Hi, I am having a strange problem defining the declare attribute of the OBJECT tag. My code is so: xsl:template match=artistDetails:currentTrack> xsp:element name=object> xsp:attribute name=data>music/Borderline.mp3/xsp:attribute> xsp:attribute name=type>audio/mpeg/xsp:attribute> xsp:attribute name=declare>declare/xsp:attribute> /xsp:element> /xsl:template> When the page is rendered as HTML, and the source viewed, the object tag reads as: object data=music/Borderline.mp3 type=audio/mpeg declare>/object>. This is incorrect. It should read: object data=music/Borderline.mp3 type=audio/mpeg declare=declare>/object>. Why is the declare attribute being chopped like this? Is this a bug? It seems that if you define an attribute and assign a value which has the same name, the attribute value pair is then not rendered properly Does anyone have a solution for this? What I am expecting to happen here is for the mp3 file to be download but not to start playing until some form of user interaction takes play, i.e. clicking an ahref link for example. This is not happening as the declare attribute is not being properly declared !! many thanks in advance CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz
Re: attribute declaration problem.....
Hi Corin, I have attached my XSP LogicSheet for you to look at. many thanks in advance Andrew p.s. when you say source what exactly are you referring to? artistDetails.xsl Description: Binary data On 8 Mar 2004, at 01:35, Corin Moss wrote: Hi, If you can post a stylesheet and source that I can run from command line Xalan I can have a quick look at it for you. Cool, Corin -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Monday, 8 March 2004 2:29 p.m. To: [EMAIL PROTECTED] Subject: Re: attribute declaration problem. Hi Corin, I changed the code to: xsl:element name=object> xsl:attribute name=data>music/Borderline.mp3/xsl:attribute> xsl:attribute name=type>audio/mpeg/xsl:attribute> xsl:attribute name=declare>declare/xsl:attribute> /xsl:element> and still the object when rendered reads as : object data=music/Borderline.mp3 type=audio/mpeg declare>/object> when it should read as : object data=music/Borderline.mp3 type=audio/mpeg declare=declare>/object>. Any ideas? many thanks in advance Andrew On 8 Mar 2004, at 01:14, Corin Moss wrote: Hi, Out of curiosity more than anything else - why not use the xsl element and attribute? Is there a specific reason not to? Does this behaviour still happen when using xsl:element? Corin -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Monday, 8 March 2004 2:12 p.m. To: [EMAIL PROTECTED] Subject: xsp:attribute declaration problem. Hi, I am having a strange problem defining the declare attribute of the OBJECT tag. My code is so: xsl:template match=artistDetails:currentTrack> xsp:element name=object> xsp:attribute name=data>music/Borderline.mp3/xsp:attribute> xsp:attribute name=type>audio/mpeg/xsp:attribute> xsp:attribute name=declare>declare/xsp:attribute> /xsp:element> /xsl:template> When the page is rendered as HTML, and the source viewed, the object tag reads as: object data=music/Borderline.mp3 type=audio/mpeg declare>/object>. This is incorrect. It should read: object data=music/Borderline.mp3 type=audio/mpeg declare=declare>/object>. Why is the declare attribute being chopped like this? Is this a bug? It seems that if you define an attribute and assign a value which has the same name, the attribute value pair is then not rendered properly Does anyone have a solution for this? What I am expecting to happen here is for the mp3 file to be download but not to start playing until some form of user interaction takes play, i.e. clicking an ahref link for example. This is not happening as the declare attribute is not being properly declared !! many thanks in advance CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: attribute declaration problem.....
Hi, I have attached my XSP page. many thanks Andrew artist-details.xsp Description: Binary data On 8 Mar 2004, at 01:47, Corin Moss wrote: Hi, I was referring to an example of the input xml you're giving your XSL -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Monday, 8 March 2004 2:47 p.m. To: [EMAIL PROTECTED] Subject: Re: attribute declaration problem. Hi Corin, I have attached my XSP LogicSheet for you to look at. many thanks in advance Andrew p.s. when you say source what exactly are you referring to? CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: attribute declaration problem.....
Hi Corin, I have come across a site which documents the attributes related to the object itself, and I quote: x-tad-biggerDECLARE=DECLARE/x-tad-bigger can be written simply as x-tad-biggerDECLARE So it seems I have been chasing my own tail for nothing. Sorry for the inconvenience but many thanks for your help/x-tad-bigger. many thanks Andrew On 8 Mar 2004, at 01:55, beyaNet Consultancy wrote: Hi, I have attached my XSP page. many thanks Andrew artist-details.xsp> On 8 Mar 2004, at 01:47, Corin Moss wrote: Hi, I was referring to an example of the input xml you're giving your XSL -Original Message- From: beyaNet Consultancy [mailto:[EMAIL PROTECTED] Sent: Monday, 8 March 2004 2:47 p.m. To: [EMAIL PROTECTED] Subject: Re: attribute declaration problem. Hi Corin, I have attached my XSP LogicSheet for you to look at. many thanks in advance Andrew p.s. when you say source what exactly are you referring to? CAUTION: This e-mail and any attachment(s) contains information that is intended to be read only by the named recipient(s). It may contain information that is confidential, proprietary or the subject of legal privilege. This information is not to be used by any other person and/or organisation. If you are not the intended recipient, please advise us immediately and delete this e-mail from your system. Do not use any information contained in it. For more information on the Television New Zealand Group, visit us online at http://www.tvnz.co.nz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing values into an XSP logic sheet
Hi, I am trying to pull a value in from my XSP page into an XSP Logicsheet. At the moment no value is being pulled in. What am I doing incorrectly? 1. XSP Page (snippet) ?xml version=1.0?> xsp:page language=java xmlns:xsp=http://apache.org/xsp xmlns:artistDetails=http://www.beyarecords.com/artistDetails/1.0 -- LOGICSHEET REF: xmlns:xlink=http://www.w3.org/1999/xlink xmlns:util=http://apache.org/xsp/util/2.0 > page> xsp:logic> int artistID = Integer.parseInt(util:get-sitemap-parameter name=artistID/>); --VALUE PULLED IN FROM SITEMAP /xsp:logic> artistDetails:id> /xsp:expr> --- VALUE HELD HERE /artistDetails:id> 2. XSP Logic Sheet ?xml version=1.0?> xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xsp=http://apache.org/xsp xmlns:util=http://apache.org/xsp/util/2.0 xmlns:artistDetails=http://www.beyarecords.com/artistDetails/1.0 -- LOGICSHEET REF: version=1.0> xsl:template match=xsp:page> xsp:page> xsl:apply-templates select=@*/> xsp:structure> /xsp:include> /xsp:include> /xsp:structure> xsp:logic> int artistID = Integer.parseInt(xsl:apply-templates select=artistDetails:id/node()/>); -- WANT VALUE PULLED INTO HERE Artist artist = Artist.getArtist(artistID); int id = artist.getID(); String artist_name = artist.getArtistName(); String info = artist.getArtistInfo(); String basePhoto1 = Base64.encodeBytes(artist.getArtistPhoto1()); String basePhoto2 = Base64.encodeBytes(artist.getArtistPhoto2()); /xsp:logic> xsl:apply-templates/> /xsp:page> /xsl:template> many thanks in advance On 3 Mar 2004, at 21:07, beyaNet Consultancy wrote: Christopher, thanks for your reply. I have implemented your solution but am getting an error. I have attached both my XSP page and the XSP Logic sheet. Please let me know what i am doing here... many thanks in advance Andrew artist-details.xsp>artistDetails.xsl> On 3 Mar 2004, at 16:02, Christopher Painter-Wakefield wrote: xsp:logic> int myID = [code to get parameter value here]; /xsp:logic> my-logic:get-data> my-logic:id>xsp:expr>myID/xsp:expr>/my-logic:id> /my-logic:get-data> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing values into an XSP logic sheet
Christopher, thanks for your reply. I have implemented your solution but am getting an error. I have attached both my XSP page and the XSP Logic sheet. Please let me know what i am doing here... many thanks in advance Andrew artist-details.xsp Description: Binary data artistDetails.xsl Description: Binary data On 3 Mar 2004, at 16:02, Christopher Painter-Wakefield wrote: xsp:logic int myID = [code to get parameter value here]; /xsp:logic my-logic:get-data my-logic:idxsp:exprmyID/xsp:expr/my-logic:id /my-logic:get-data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Site with dynamic header, columns and footer
Lamy, use aggregation and xsp for dynamic content. On 26 Feb 2004, at 15:48, franck LAMY wrote: I want to develop a site with severals sections : a header, columns(menus, body) and a footer. Sections like menus, body and header have dynamic content. What is the best way to do it with cocoon (version 2.1.4) ? Can you indicate me an example. THANKS
Batik problem (Bug) on OS X
Ok chaps, there is definitely a problem with batik(svg) on OS X. I am running OS X 10.3.2, Java 1.4.2, Cocoon 2.1.4, Tomcat 5, postgreSQL 7.4.1. If I use batik to produce fancy text or graphic (non jpg, png etc) then everything is fine. As soon as I try and svg a jpg or png I get the following error in the logs: java.awt.color.CMMException: Invalid profile data at sun.awt.color.CMM.checkStatus(CMM.java:127) at sun.awt.color.ICC_Transform.init>(ICC_Transform.java:89) at java.awt.image.ColorConvertOp.updateBITransform(ColorConvertOp.java:386) at java.awt.image.ColorConvertOp.ICCBIFilter(ColorConvertOp.java:308) at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:262) at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Unknown Source) at org.apache.batik.ext.awt.image.rendered.FormatRed.copyData(Unknown Source) at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(Unknown Source) at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(Unknown Source) at org.apache.batik.ext.awt.image.spi.JPEGRegistryEntry$1.run(Unknown Source) The image is still displayed, but not before an org.apache.catalina.startup.Bootstrap error is displayed. I checked the svg examples on the main cocoon example page, and whether clicking the jpg or png link the result was the same each time. Any ideas what is going on here or if there are any possible work arounds? many thanks in advance... Andrew
Re: iframes and cocoon
Beate, I am using an iframe in my application with no problems. what would you like to know? Andrew On 25 Feb 2004, at 15:43, [EMAIL PROTECTED]> wrote: Hi all, we are using cocoon 2.1.1 and are thinking of changing our application in a way to use iframes in cocoon. Does anybody have experience in using iframes with cocoon, something specific to take into account, some useful link or tips? Thanks a lot Beate Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system.
SVG Bug.....
Hi, having worked with SVG generation solidly for over one week now, I am convinced that there is a bug with the process. If your browser makes a request for one image which is svg'd then a java alert is thrown, before the first image is displayed, which says (org.apache.catalina.startup.Bootstrap). The browser then hangs while waiting for the second image which never gets displayed and is shown as a broken image. If you quit the java alert this causes Tomcat to shutdown, and the only way to restart the server after that is to reboot the machine. Any ideas? The process I have been doing is reading a bytea from postgreSQL into a java byte[], and then converting that into base 64. From here the base64 string is used to create an svg. The image sizes of the images read into the postgreSQL table are 252kb and 223kb respectively. The final svg'd rendered image, displayed to the browser is 44kb. How do I get the bug registered? System: Mac OS X 10.3.2 postgreSQL ver 7.4.1 Tomcat ver 5 Cocoon 2.1.4 many thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SVG and OS x 10.3
Hi, are there any OS X/Cocoon/Tomcat 5 uses out there experiencing problems with SVG? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java.awt.color.CMMException: Invalid profile data
Hi, I am getting the above error in my logs when I try and render an svg/jpeg image. Any ideas what is happening here? at sun.awt.color.CMM.checkStatus(CMM.java:127) at sun.awt.color.ICC_Transform.init>(ICC_Transform.java:89) at java.awt.image.ColorConvertOp.updateBITransform(ColorConvertOp.java:386) at java.awt.image.ColorConvertOp.ICCBIFilter(ColorConvertOp.java:308) at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:262) at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Unknown Source) at org.apache.batik.ext.awt.image.rendered.FormatRed.copyData(Unknown Source) at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(Unknown Source) at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(Unknown Source) at org.apache.batik.ext.awt.image.spi.JPEGRegistryEntry$1.run(Unknown Source) ERROR: The JPEG quality has not been specified. Use the default one: no compression many thanks in advancce
Incomplete image requests
Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> The image link is built up in my xsp page as: artists-photo1> xsp:element name=img> xsp:attribute name=src>artistImage//xsp:attribute> /xsp:element> /artists-photo1> So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr> td valign=top align=center>xsl:apply-templates select=//artists-photo1/>/td> /tr> tr> td valign=top>xsl:apply-templates select=//artists-photo2/>/td> /tr> /table> /body> /html> /xsl:template> xsl:template match=artists-photo1> xsl:apply-templates/> /xsl:template> xsl:template match=artists-photo2> xsl:apply-templates/> /xsl:template> many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED]> wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= >-statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= /> and the browser will diplay the size from your image. Best Regards, Simon
Re: Incomplete image requests
forgot to attach the the svg file, here it is svg.xsp Description: Binary data many thanks in advance On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> The image link is built up in my xsp page as: artists-photo1> xsp:element name=img> xsp:attribute name=src>artistImage//xsp:attribute> /xsp:element> /artists-photo1> So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr> td valign=top align=center>xsl:apply-templates select=//artists-photo1/>/td> /tr> tr> td valign=top>xsl:apply-templates select=//artists-photo2/>/td> /tr> /table> /body> /html> /xsl:template> xsl:template match=artists-photo1> xsl:apply-templates/> /xsl:template> xsl:template match=artists-photo2> xsl:apply-templates/> /xsl:template> many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED]> wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= >-statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= /> and the browser will diplay the size from your image. Best Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Incomplete image requests
geoff, my fault, sorry. Copied the wrong pipe. The correct pipe is: map:match pattern=**artistImage/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> many thanks in advance On 21 Feb 2004, at 18:56, Geoff Howard wrote: beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=imageNum value={2}/> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> Huh? You have two wildcard tokens in your pattern and reference only the second and the non-existant third. Did you type wrong? The image link is built up in my xsp page as: artists-photo1> xsp:element name=img> xsp:attribute name=src>artistImage/1/xsp:expr>artistID/xsp:expr>.jpg/xsp:attribute> /xsp:element> /artists-photo1> And here you are referring to an image source which looks like it would be matched by a pattern like artistImage/*/*.jpg in your sitemap, but you don't appear to have such a pattern matcher set up. Is this really what you're using?? So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: The only mysterious thing here is why the first image works at all given the above data. Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Incomplete image requests
Geoff, yes, the reason I am not using an image/database reader is because of the hibernate middle layer used in the system and wanting to keep the system consistent. In terms of whether I am getting back information, yes I am. If i make a single call for either image then the data is returned to the browser, if I try and make multiple image requests then only one image is returned successfully and then the browser sits there waiting for the next one. many thanks in advance... On 21 Feb 2004, at 22:32, Geoff Howard wrote: beyaNet Consultancy wrote: forgot to attach the the svg file, here it is I just looked quickly at your xsp and before we get any further into this, can you explain why you're not using an image/database reader for this? Is it because of the hibernate support? I don't see any purpose for putting this into svg (as base64 jpeg) just to re-serialize as jpg. I've seen about a million messages go by about this general topic so you may just need to quickly summarize the issue. Assuming you have some need to do it this way though, I'd recommend putting some logging (or just System.out.println which should get spit out in your terminal console) to see what is going on internally. Are you sure you're getting data back in each case fo example? Geoff many thanks in advance On 21 Feb 2004, at 18:36, beyaNet Consultancy wrote: Hi, I have constructed a pipe which handles image requests and spits out an svg. On the page in question there are 3 images. The pipe is: map:match pattern=unframe/*/*.jpg map:generate type=serverpages src=xsp/svg.xsp map:parameter name=imageNum value={2}/ map:parameter name=artistID value={3}/ /map:generate map:serialize type=svg2jpeg/ /map:match The image link is built up in my xsp page as: artists-photo1 xsp:element name=img xsp:attribute name=srcartistImage/1/xsp:exprartistID/xsp:expr.jpg/xsp: attribute /xsp:element /artists-photo1 So I have 3 images on one page which are built up in that format. What is happening is that the first image call is made no problem, and the image is displayed on the page. The second image is now requested but the image is never loaded and the browser just sits there waiting for an image to load. What is causing this, and what can I do to resolve it? My svg page is attached. The html format of the calling xsl page is: . snippet . tr td valign=top align=centerxsl:apply-templates select=//artists-photo1//td /tr tr td valign=topxsl:apply-templates select=//artists-photo2//td /tr /table /body /html /xsl:template xsl:template match=artists-photo1 xsl:apply-templates/ /xsl:template xsl:template match=artists-photo2 xsl:apply-templates/ /xsl:template many thanks in advance On 19 Feb 2004, at 12:31, Simon Mieth wrote: On Thu, 19 Feb 2004 12:19:13 + beyaNet Consultancy [EMAIL PROTECTED] wrote: Hi Simon, I think I am coming closer to the answer I have been having with the svg canvas size not changing. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/4 6.jpg), then the image changes according to the sizes I give it. If i try and call the image so that it loads within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Hi Andrew, maybe you have inside your html-source image width= height= -statements, then the browser scale the image allways to this size. If the image is larger or smaller, the browser scale ever to this size. If so, remove the width= and height= and have allready img src= / and the browser will diplay the size from your image. Best Regards, Simon -- -- - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Initialization Problem
Hi, went to fire up my app this morning and was greeted with the following message: Message: null Description: No details available. Sender: org.apache.cocoon.servlet.CocoonServlet Source: Cocoon Servlet cause: Cannot load properties file resource://org/apache/cocoon/cocoon.properties request-uri: /cocoon/beyarecords/login.html Any ideas as to what may be causing this and how to resolve it? Re-build? many thanks in advance
Build 2.1.4
hi guys, I have a build related question if I may. Just installed 2.1.4 of cocoon and tried to run my app as per usual and nothing happens, no links work nothing the site just seems dead. Also, I ran the hello world example in the main cocoon home page area (http://www.mysite.com/cocoon), and from the block`s Hello world section I clicked the jpeg link. When I do this i get an (org.apache.catalina.startup.Bootstrap) message box appear on my desktop, which would seem to suggest that another instance of tomcat/cocoon is being launched!!!??? In the local.blocks.properties file, how do I makes sure that i block is activated? Do I change as follows: un-comment the line #exclude.block.batik=true and: 1. leave as is - exclude.block.batik=true (block is not included in build)? or 2. exclude.block.batik=false (block is included in build)? many thanks in advance
An if statement breaks my SVG!!!!
Hi, I have a simple xsp:logic section which performs a simple instantiation. I then decided to add some conditional code and wham!, my code breaks. What am I doing wrong here!!! xsp:logic> int imageNum = 1; byte[] photo; Artist artist = Artist.getArtist(46); if (imageNum == 1) { String test = hello; } !-- read image into a byte [] --> byte[] photo_1 = artist.getArtistPhoto1(); //byte[] photo_2 = artist.getArtistPhoto2(); !-- base64 encode byte array --> String Photo1 = Base64.encodeBytes(photo_1); //String Photo2 = Base64.encodeBytes(photo_2); /xsp:logic> svg:svg width=300 height=300 y=0 x=0 viewBox=0 35 200 200> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=id>artist1/xsp:attribute> /xsp:element> /svg:svg> many thanks in advance
SVG bug!!!
Hi, I have, for the last few days now, tried unsuccessfully to change the canvas size of generated svg images. Is there a bug in SVG or is there something very simple I am failing to grasp here? svg:svg width=300 height=300 y=0 x=0 viewBox=0 35 200 200> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=id>artist1/xsp:attribute> /xsp:element> /svg:svg> many thanks in advance
Logic sheet capture
Hi, I have a map definition which captures svg images on image requests: map:match pattern=**artistImage/*/*.jpg> map:generate type=serverpages src=xsp/svg{2}.xsp> map:parameter name=artistID value={3}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> On each artist page there will be a number of images displayed which are specific to the artist. So in instead of creating specific xsp pages for each image request, svg1.xsp xsvg2.xsp etc, could i define one single xsp logic sheet which will allow me to determine which image to be processed based on a parameter passed to the logic sheet? If so, how do I do it? For example my svg page is currently constructed as so: svg:svg width=300 height=300 y=0 x=0 viewBox=0 35 200 200> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=id>artist1/xsp:attribute> /xsp:element> /svg:svg> but what I want to do is, if image1.jpg is requested process image1 and return results: capture:fragment-variable name=image1> svg:svg width=300 height=300 y=0 x=0 viewBox=0 35 200 200> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=id>artist1/xsp:attribute> /xsp:element> /svg:svg> /capture:fragment-request-attr> capture:fragment-request-attr name=image2> svg:svg width=300 height=300 y=0 x=0 viewBox=0 35 200 200> xsp:element name=image> xsp:attribute name=x>/xsp:attribute> xsp:attribute name=y>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=id>artist1/xsp:attribute> /xsp:element> /svg:svg> /capture:fragment-request-attr>
Re: SVG bug!!!
Linc, I think I am coming closer to the answer. If I make a request for the image outside of the iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/46.jpg), then the image changes according to the sizes I give it. If i try and call the image so that the document which it is called into sits within the iframe, then no matter what values you give the height and width of the svg tag no change to the canvas size takes place. Any ideas? Andrew On 19 Feb 2004, at 11:54, Linc wrote: Try just creating the SVG on its own ie. svg width=100 height=100 viewBox=0 0 50 50> rect width=50 height=50/> /svg> Let me know if this works for you! Linc x-tad-bigger- Original Message -/x-tad-bigger x-tad-bigger /x-tad-biggerx-tad-biggerFrom:/x-tad-biggerx-tad-bigger /x-tad-biggerx-tad-biggerbeyaNet Consultancy/x-tad-biggerx-tad-bigger /x-tad-bigger x-tad-biggerTo:/x-tad-biggerx-tad-bigger /x-tad-biggerx-tad-bigger[EMAIL PROTECTED]/x-tad-biggerx-tad-bigger /x-tad-bigger x-tad-biggerSent:/x-tad-biggerx-tad-bigger Thursday, February 19, 2004 5:05 PM/x-tad-bigger x-tad-biggerSubject:/x-tad-biggerx-tad-bigger SVG bug!!!/x-tad-bigger Hi, I have, for the last few days now, tried unsuccessfully to change the canvas size of generated svg images. Is there a bug in SVG or is there something very simple I am failing to grasp here? svg:svg width=300 height=300 y=0 x=0 viewBox=0 35 200 200> xsp:element name=image> xsp:attribute name=x>0/xsp:attribute> xsp:attribute name=y>0/xsp:attribute> xsp:attribute name=width>300/xsp:attribute> xsp:attribute name=height>300/xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,xsp:expr>Photo1/xsp:expr>/xsp:attribute> xsp:attribute name=id>artist1/xsp:attribute> /xsp:element> /svg:svg> many thanks in advance
org.apache.catalina.startup.Bootstrap
Hi, when make a call to generate an svg i get the following error and then the server (Tomcat 5) dies completely. Has anybody else experienced this kind of error and the best way to resolve it? I have attached the problem file. many thanks in advance svg.xsp Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IFRAME behaviour
Hi, I have a page structure that works on the following principal: tr> !-- Menu Bar --> td>menu items go here/td> !-- Iframe - dynamic content --> td>iframe>/td> /tr> In the iframe a document is loaded which makes image calls like so: image src=frame/myname.jpg /> which should match a map in my sitemap defined as: map:match pattern=frame/*.jpg> map:generate type=serverpages src=xsp/svg.xsp> map:parameter name=artistID value={1}/> /map:generate> map:serialize type=svg2jpeg/> /map:match> For hours I could not get any images to load until I referenced the image calls as image src=../../frame/myname.jpg />. My question is, as every document loaded in a cocoon environment has to pass through the sitemap before it does anything, why doesn't image src=frame/myname.jpg /> work? many thanks in advance
Re: IFRAME behavior
David, thanks very much for that advice. cheers Andrew On 18 Feb 2004, at 14:09, [EMAIL PROTECTED] wrote: Hi, What's happening is that your pattern is not doing what it looks like. While the src attribute is the same as the pattern (frame/*.jpg), it won't match because your src attribute actually expands out to blah/blah/frame/myname.jpg. In order to get it to match, you'll need to change your pattern to **frame/*.jpg. That will match any URL within your context that has 'frame' in the path and is asking for a jpg file. Your adjusted sitemap should be: map:match pattern=**frame/*.jpg map:generate type=serverpages src=xsp/svg.xsp map:parameter name=artistID value={2}/ /map:generate map:serialize type=svg2jpeg/ /map:match Note the {1} has also been changed to {2}. BTW, this really has nothing to do with the IFRAME itself. HTH! Thanks! David Day beyaNet Consultancy [EMAIL PROTECTED] 02/18/2004 04:24 AM Please respond to users T To: [EMAIL PROTECTED] cc: bcc: Subject:IFRAME behaviour Hi, I have a page structure that works on the following principal: tr !-- Menu Bar -- tdmenu items go here/td !-- Iframe - dynamic content -- tdiframe/td /tr In the iframe a document is loaded which makes image calls like so: image src=frame/myname.jpg / which should match a map in my sitemap defined as: map:match pattern=frame/*.jpg map:generate type=serverpages src=xsp/svg.xsp map:parameter name=artistID value={1}/ /map:generate map:serialize type=svg2jpeg/ /map:match For hours I could not get any images to load until I referenced the image calls as image src=../../frame/myname.jpg /. My question is, as every document loaded in a cocoon environment has to pass through the sitemap before it does anything, why doesn't image src=frame/myname.jpg / work? many thanks in advance - 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: Referencing inline images - How to?
Simon, I am doing something wrong here. explain to me exactly what attributes should be made available in the image tag? I think it would be better if you just show me the code you are using to generate the image tag. Do you mean xsp:attribute name=xlink>http://www.w3.org/1999/xlink xsp:attribute name=href>data:image/jpeg;base64 or xsp:attribute name=xmlns:xlink>http://www.w3.org/1999/xlink xsp:attribute name=xlink:href>data:image/jpeg;base64 I have changed the src attribute to href as you stated in your email, and now nothing works. href is not a supported attribute of the img tag!!?? Can you show me the code you are using to generate the image in your xsp page. I do the following: xsp:attribute name=xmlns:xlink>http://www.w3.org//xsp:attribute> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> but I am now getting an xml error on xlink many thanks in advance On 17 Feb 2004, at 09:38, Simon Mieth wrote: On Mon, 16 Feb 2004 22:54:09 + beyaNet Consultancy [EMAIL PROTECTED]> wrote: Simon, could you just confirm to me that i am using the correct syntax sitemap: map:serializers default=html> map:serializer name=svg2jpeg src=org.apache.cocoon.serialization.SVGSerializer mime-type=image/jpeg logger=sitemap.serializer.svg2jpeg/> /map:serializers> Hi, it looks ok. You can try to use the svg2png serializer (you must only change the type= in the serializer section). Try our svg with an static image from filesystem (href:xlink=file:///my/image/here/test.jpg). Argh, i see now you use the src-attribute in image-element, use image xmlns:xlink=http://www.w3.org/1999/xlink xlink:href=data: image/jpeg;base64,.. width />. Regards, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SVG broken images.....HELP!!
Hi, I have been having a problem serialized svg embedded images which are broken when displayed to the screen. Can anybody tell me what I am doing wrong? 1. Sitemap def: map:serializers default=html> map:serializer name=svg2jpeg src=org.apache.cocoon.serialization.SVGSerializer mime-type=image/jpeg logger=sitemap.serializer.svg2jpeg/> /map:serializers> .. map:match pattern=frame/*.jpg> map:generate type=serverpages src=xsp/artist-details.xsp /> map:serialize type=svg2jpeg/> /map:match> 2. XSL def: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xlink=http://www.w3.org/1999/xlink > . xsl:template match=artists-photo1> svg width=300 height=300> xsl:apply-templates /> /svg> /xsl:template> 3. XSP def: (artist-details.xsp) ... artists-photo1> xsp:element name=image> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> /xsp:element> /artists-photo1> many thanks in advance
Re: SVG broken images.....HELP!!
Steve, not having used svg technology before today, could you elaborate further on what you mean? I searched the net for an svg viewPort attribute but only managed to come up with viewBox. Is that what you were making reference to: svg width=300 height=300 viewBox=0 0 300 310> ? If so, the images are still broken! many thanks in advance On 17 Feb 2004, at 15:52, Steve Schwarz wrote: Hi Don't you need to specify a viewPort attribute in your outermost svg> element? Steve xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xlink=http://www.w3.org/1999/xlink > . xsl:template match=artists-photo1> svg width=300 height=300> xsl:apply-templates /> /svg> /xsl:template> _ Say good-bye to spam, viruses and pop-ups with MSN Premium -- free trial offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVG broken images.....HELP!!
Hi Linc, On 17 Feb 2004, at 16:27, Linc wrote: output method to xml. How and where do I set this attribute, is it an svg attribute?? many thanks in advance
Re: SVG broken images.....HELP!!
Guys, as per my original post plus the changes you recommended, my svg process is now. Still the images are broken and I don't get any errors in the logs either! I think I have 2 more handfuls of hair, tops, to pull out before I am completely bald!!! ;-) 1. Sitemap def: map:serializers default=html> map:serializer name=svg2jpeg src=org.apache.cocoon.serialization.SVGSerializer mime-type=image/jpeg logger=sitemap.serializer.svg2jpeg/> /map:serializers> .. map:match pattern=frame/*.jpg> map:generate type=serverpages src=xsp/artist-details.xsp /> map:serialize type=svg2jpeg/> /map:match> 2. XSL def: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xlink=http://www.w3.org/1999/xlink > xsl:output method=xml indent=yes media-type=image/svg+xml/> xsl:template match=/> . xsl:template match=artists-photo1> svg xmlns:svg=http://www.w3.org/2000/svg width=300 height=300> g transform=scale({300} {300})> xsl:apply-templates /> /g> /svg> /xsl:template> 3. XSP def: (artist-details.xsp) ... artists-photo1> xsp:element name=image> xsp:attribute name=xlink:href>data:image/jpeg;base64,/xsp:expr>/xsp:attribute> xsp:attribute name=width>/xsp:attribute> xsp:attribute name=height>/xsp:attribute> /xsp:element> /artists-photo1> many thanks in advance On 17 Feb 2004, at 16:42, [EMAIL PROTECTED] wrote: try adding the namespace Example xsl:stylesheet xmlns:xlink=http://www.w3.org/1999/xlink xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0> xsl:template match=/> svg xmlns:svg=http://www.w3.org/2000/svg width=520 heigth=300> g transform=scale({$scalex} {$scaley})> xsl:apply-templates select=chart/> /g> /svg> /xsl:template> /xsl:stylesheet> -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Jorg Heymans Sent: 17mm2004 17:31 To: [EMAIL PROTECTED] Subject: Re: SVG broken images.HELP!! Do they render correctly in Batik ? Batik comes with an svg image viewer, squiggle or something. If they aren't rendering there then chances are slim cocoon will render them (because it uses those libraries). There can be a million other things otherwise, check error.log or core.log for more specific svg rendering error messages. hth Jorg beyaNet Consultancy wrote: Steve, not having used svg technology before today, could you elaborate further on what you mean? I searched the net for an svg viewPort attribute but only managed to come up with viewBox. Is that what you were making reference to: svg width=300 height=300 viewBox=0 0 300 310> ? If so, the images are still broken! many thanks in advance On 17 Feb 2004, at 15:52, Steve Schwarz wrote: Hi Don't you need to specify a viewPort attribute in your outermost svg> element? Steve xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xlink=http://www.w3.org/1999/xlink . xsl:template match=artists-photo1> svg width=300 height=300> xsl:apply-templates /> /svg> /xsl:template> _ Say good-bye to spam, viruses and pop-ups with MSN Premium -- free trial offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/ - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVG broken images.....HELP!!
Ok guys, my brains have nearly turned to tapioca over this svg issue!! ;-). I have attached the generated xml document, if you could have a look at the doc and see what is going on it will be a great help to me. many thanks in advance myPage.xml Description: Binary data On 17 Feb 2004, at 17:26, Steve Schwarz wrote: Hi Sorry if I lead you astray before... How's about a divide and conquer strategy? Seems like it isn't clear if the SVG being delivered to the svg2png serializer is correct or not. I think someone else mentioned this already, but the way I debugged a similar problem was to: - install the Adobe plugin for IE on a windows machine. - change the map:match pattern=frame/*.jpg to use the standard xml serializer (or make a new match that does the same thing with pattern=frame/*.xml if you think you might need to do this again in the future :^) - request the page from the browser then you can either see what is wrong directly in the XML or save the page as source and load the page from the filesystem as SVG using the plugin and look for the error. I'd start with a single filled rectangle as my image to further simplify the task... HTH, Steve _ Store more e-mails with MSN Hotmail Extra Storage 4 plans to choose from! http://click.atdmt.com/AVE/go/onm00200362ave/direct/01/ - 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]