Re: Browser's Back button problem in Portal Engine

2004-06-21 Thread Simon Hutchinson
Mariusz Wjcik wrote:
Hi
I'm using portal engine, and I have problem with BACK browser button. 
When I try to do navigation by using links, which are generated by 
Portal Engine, everything is OK. When user uses BACK button, Portal 
Engine reacts in very strange way. I think, that site, which is being 
got from history, should be reloaded, but I am not sure.
Do you have any solution for this?

regards
mario
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hi Mario,
I believe that this is by design when using the portal-event-link 
transformer. When the user clicks back, there is no way of knowing 
whether the events are still valid and hence the strange behaviour.

You might find this thread useful
http://www.mail-archive.com/[EMAIL PROTECTED]/msg11371.html
Some possible solutions are.
1. Remove back button functionality from your portal.
2. Depending on your requirements it might be possible that you are
using the portal block simply as a framework ie for layout etc ...
In this case it is possible to bypass the event-link-transformer and to 
use bookmarks instead.

Si


--
Merlin Information Systems Limited, 

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN
Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112

http://www.misgl.com
Provider of IT Services and Online Portal Support Services. 


Confidentiality:
The information contained in this email (including any attachments) is confidential 
and is intended solely for the use of the named addressee. Access, copying or re-use 
of the information in it by any other person is not authorised. If you are not the 
intended recipient, please notify us immediately by telephone or by e-mail to [EMAIL 
PROTECTED]


*** This mail has been scanned for viruses ***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validate an XML document in a flowscript

2004-06-16 Thread Simon Hutchinson
Vilya Harvey wrote:
 What I'd like to be able to do is insert some code after the
 form.save(...) line which validates the form, and loops back to the
 form.load(...) line if validation fails. Any suggestions?
Sounds like a simple while loop might do the trick.
var isValid = false;
function enterForecasts(form)
{
  // parse the document to a DOM-tree
  var documentObj = loadDocument(sampledata.xml);
  // bind the document data to the form
  while(!isValid) {
form.load(documentObj);
 // show the form to the user until it is validated successfully
form.showForm(form-display-pipeline);
// bind the form's data back to the document
form.save(documentObj);
validateForm(form);
  }
  // save the DOM-tree back to an XML file, the makeTargetURI
  // function makes a modified filename so that the
  // original document is not overwritten
  saveDocument(documentObj, makeTargetURI(documentURI));
  cocoon.sendPage(form-success-pipeline);
}
function validateForm(form) {
//pseudo code

//do validation stuff
if(validates) {
   isValid=true;
}

return;
}
Cheers
Si


--
Merlin Information Systems Limited, 

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN
Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112

http://www.misgl.com
Provider of IT Services and Online Portal Support Services. 


Confidentiality:
The information contained in this email (including any attachments) is confidential 
and is intended solely for the use of the named addressee. Access, copying or re-use 
of the information in it by any other person is not authorised. If you are not the 
intended recipient, please notify us immediately by telephone or by e-mail to [EMAIL 
PROTECTED]


*** This mail has been scanned for viruses ***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Cant handle errors from Portal framework

2004-06-10 Thread Simon Hutchinson
Hi,
I have written a pipeline with the following error handler
map:handle-errors
map:select type=exception   
map:when test=processing
map:generate src=root.xml/
map:transform src=xsl/error.xsl
map:parameter name=err value=processing/
/map:transform
map:transform type=i18n/
map:serialize/
/map:when
map:otherwise
map:generate src=root.xml/
map:transform src=xsl/error.xsl
map:parameter name=err  value=other/ 
   
/map:transform
map:transform type=i18n/
map:serialize/
/map:otherwise  
/map:select
/map:handle-errors
ie If an exception thrown and it is a processing exception then the 
output will read processing otherwise the output will read other

When I navigate to this pipeline (designed to throw an exception) then 
the handle-errors section is invoked and my error message is returned.

However I have a coplet whose URI is this same pipeline, when the coplet 
call the pipeline the error is thrown but the handle-errors section is 
never entered and my error message is never thrown,

Could anyone shed any light on why the error handler is not entered when
the pipeline is called by a coplet and if possible how to correctly 
handle exceptions within the portal framework

Kind regards
Si


--
Merlin Information Systems Limited, 

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN
Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112

http://www.misgl.com
Provider of IT Services and Online Portal Support Services. 


Confidentiality:
The information contained in this email (including any attachments) is confidential 
and is intended solely for the use of the named addressee. Access, copying or re-use 
of the information in it by any other person is not authorised. If you are not the 
intended recipient, please notify us immediately by telephone or by e-mail to [EMAIL 
PROTECTED]


*** This mail has been scanned for viruses ***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [flowscript] continuation_id

2004-06-10 Thread Simon Hutchinson
Lionel Crine wrote:
Hi all,
I 'd like to use the continuation id between 2 xsp.
Is it possible ?
how can I get the continuation from the flowscript to the xsp ?
Lionel
Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hi Lionel
The cocoon docs, http://cocoon.apache.org/2.1/userdocs/flow/jpath.html
suggest using the following:
continuation
The continuation tag returns the id of the current web continuation of 
your Flowscript. You can refer to previous continuations by supplying 
the optional level attribute. Zero is the current level, -1 refers to 
the previous continuation, and so on.

continuation [level=Number]/
Example:
xsp:attribute 
name=actionxsp:exprjpath:continuation/+.form/xsp:expr/xsp:attribute

Give that a try first
Si


--
Merlin Information Systems Limited, 

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN
Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112

http://www.misgl.com
Provider of IT Services and Online Portal Support Services. 


Confidentiality:
The information contained in this email (including any attachments) is confidential 
and is intended solely for the use of the named addressee. Access, copying or re-use 
of the information in it by any other person is not authorised. If you are not the 
intended recipient, please notify us immediately by telephone or by e-mail to [EMAIL 
PROTECTED]


*** This mail has been scanned for viruses ***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Issue with portal-html-eventlink and navigation.

2004-05-06 Thread Simon Hutchinson
Hi,

As part of a portal we are working on I have written a coplet, whose 
initial uri invokes a flow script using the following matcher

map:match pattern=coplet
 map:call function=handleForm
   map:parameter name=function value=assistance/
   map:parameter name=form-definition
  value=resources/form/assistance.xml/
   map:parameter name=form-definition-2
   value=resources/form/choosepriority.xml/
  /map:call
  map:serialize type=xml/
/map:match
The first stage of my flowscript displays a cform until it is valid 
(including some custom validation) before displaying a second form, page2

while (true) {
form.showForm(assistance-display-pipeline); 
if (validatePage1(form)) {
break;
}
}   

form2 = new Form(page2);

using the portal-html-eventlink transformer the form action for my 
initial cform assistance-display-pipeline is transformed from the 
#{$continuation/id to the correct event link info.

This all works perfectly and the flowscript is re-entered at the correct 
point upon submission, however if I navigate away from the page and then 
go back the events are no longer valid and submission of my form does 
nothing.

Such navigation must be allowed for our implementation.

My approach has been to not use the portal-html-eventlink transformer, 
instead having the form submit for my initial form include the 
continuation id as follows

action=http://localhost:/assistance-1c79274d633b7230648d232d4a2c771b16305c6c;

This is then matched in my root sitemap as follows.

map:match pattern=assistance-*
  !-- tell assistance to resume from the continuation --
  map:act type=portal-object-model
map:parameter name=copletId value=Assistance-1/
map:parameter name=portalName value=portal/
  /map:act
  map:act type=portal-set-data
  	map:parameter name=attributes/touch value=0/   	
map:parameter name=temporaryAttributes/application-uri 

value=cocoon:{global:root}/coplets/assistance/{1}.continue?{request:queryString}/
  /map:act
  map:redirect-to uri=cocoon://portal/

/map:match
This tells my coplet to get its data by setting its uri to eventually 
re-enter my flowscript with the correct continuation id.
Please note that I am having to include the queryString from my initial 
form submit as otherwise the request data never makes it back into the flow.

At this point (although not very elegantly) my issue with navigating 
away and invalidating portal events is resolved.

Sorry if all this seems like too much background but I am coming to my 
point.

The problem is that everything works well providing that my form submits 
using a http GET method, as the data from the query string can be 
obtained and appended to the coplet uri ie

cocoon:{global:root}/coplets/assistance/{1}.continue?{request:queryString}

However due to the amount of data that might need to be sent to the 
server I need to use the POST method.
This is where my hack fails as I cant seem to find away to make all this
request data available when my new coplet uri is loaded.
The result has been that although the flowcript is re-entered at the 
correct point,  none of the initial request data (ie the values of my 
cform widgets) is available and therefore

form.showForm(assistance-display-pipeline)

simply displays the empty form with validation errors.

Therefore my problem can be summarised as follows;

I need a way to allow a user to navigate away from page X but
in such a way that when page X is returned to, a form can be submitted
via a POST method such that a flow continuation can be rentered with all 
the POST data available.

does anybody have any suggestions ?

Thanks

SI





--

Merlin Information Systems Limited, 

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN

Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112



http://www.misgl.com

Provider of IT Services and Online Portal Support Services. 



Confidentiality:

The information contained in this email (including any attachments) is confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the information in it by any other person is not authorised. If you are not the intended recipient, please notify us immediately by telephone or by e-mail to [EMAIL PROTECTED]





*** This mail has been scanned for viruses ***



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Issue with portal-html-eventlink and navigation

2004-05-06 Thread Simon Hutchinson
Hi,

As part of a portal we are working on I have written a coplet, whose 
initial uri invokes a flow script using the following matcher

map:match pattern=coplet
 map:call function=handleForm
   map:parameter name=function value=assistance/
   map:parameter name=form-definition
  value=resources/form/assistance.xml/
   map:parameter name=form-definition-2
   value=resources/form/choosepriority.xml/
  /map:call
  map:serialize type=xml/
/map:match
The first stage of my flowscript displays a cform until it is valid 
(including some custom validation) before displaying a second form, page2

while (true) {
form.showForm(assistance-display-pipeline);
if (validatePage1(form)) {
break;
}
}
form2 = new Form(page2);

using the portal-html-eventlink transformer the form action for my 
initial cform assistance-display-pipeline is transformed from the 
#{$continuation/id to the correct event link info.

This all works perfectly and the flowscript is re-entered at the correct 
point upon submission, however if I navigate away from the page and then 
go back the events are no longer valid and submission of my form does 
nothing.

Such navigation must be allowed for our implementation.

My approach has been to not use the portal-html-eventlink transformer, 
instead having the form submit for my initial form include the 
continuation id as follows

action=http://localhost:/assistance-1c79274d633b7230648d232d4a2c771b16305c6c;

This is then matched in my root sitemap as follows.

map:match pattern=assistance-*
  !-- tell assistance to resume from the continuation --
  map:act type=portal-object-model
map:parameter name=copletId value=Assistance-1/
map:parameter name=portalName value=portal/
  /map:act
  map:act type=portal-set-data
  map:parameter name=attributes/touch value=0/
map:parameter name=temporaryAttributes/application-uri
value=cocoon:{global:root}/coplets/assistance/{1}.continue?{request:queryString}/
  /map:act
  map:redirect-to uri=cocoon://portal/
/map:match

This tells my coplet to get its data by setting its uri to eventually 
re-enter my flowscript with the correct continuation id.
Please note that I am having to include the queryString from my initial 
form submit as otherwise the request data never makes it back into the flow.

At this point (although not very elegantly) my issue with navigating 
away and invalidating portal events is resolved.

Sorry if all this seems like too much background but I am coming to my 
point.

The problem is that everything works well providing that my form submits 
using a http GET method, as the data from the query string can be 
obtained and appended to the coplet uri ie

cocoon:{global:root}/coplets/assistance/{1}.continue?{request:queryString}

However due to the amount of data that might need to be sent to the 
server I need to use the POST method.
This is where my hack fails as I cant seem to find away to make all this
request data available when my new coplet uri is loaded.
The result has been that although the flowcript is re-entered at the 
correct point,  none of the initial request data (ie the values of my 
cform widgets) is available and therefore

form.showForm(assistance-display-pipeline)

simply displays the empty form with validation errors.

Therefore my problem can be summarised as follows;

I need a way to allow a user to navigate away from page X but
in such a way that when page X is returned to, a form can be submitted
via a POST method such that a flow continuation can be rentered with all 
the POST data available.

does anybody have any suggestions ?

Thanks

SI





--

Merlin Information Systems Limited, 

Merlin House, Gawcott Road, Buckingham, United Kingdom. MK18 1TN

Tel: +44 (0) 1280 824331  Fax: +44 (0) 1280 824112



http://www.misgl.com

Provider of IT Services and Online Portal Support Services. 



Confidentiality:

The information contained in this email (including any attachments) is confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the information in it by any other person is not authorised. If you are not the intended recipient, please notify us immediately by telephone or by e-mail to [EMAIL PROTECTED]





*** This mail has been scanned for viruses ***



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


SOAP Transformer

2004-04-15 Thread Simon Hutchinson
Hi,

Our current project needs to make a SOAP call and then make a subsequent
SOAP call utilising some of the response from the first call.
I can successfully call the web services having copied the Currency.xsp
example from the soap samples section.
Ideally however I would like to use a SOAP transformer if such a thing 
exists as this would allow me to easily transform the response from the 
first call into the required format for the second call all in the same 
pipeline.

Having googled the subject of a SOAP Transformer I have found various 
threads suggesting that such a components might be valuable but I have 
been unable to find a working solution.

Could anyone let me know if my issue has a current solution ie a SOAP 
Transformer instead of a SOAP generator. Alternatively can anyone more 
experienced than I am with SOAP (I am not very experinced) suggest any 
possible pitfalls in writing something myself

Kind regards

Si

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problem with the SessionContext InputModule when using portal-fw

2004-03-10 Thread Simon Hutchinson
Hi all,

It is a little difficult for me to post a decent test case as it would 
involve a pretty big chunk of the portal-fw stuff so I am hoping that 
someone might recognise my simplified view of the problem.

Test Pipeline 1. This pipeline reads in a root element.
The first transformation creates a new context in the session
which is transformed afterwords by the session transformer.
The readfromsession.xsl transformer then reads this info back from the
session.
(writetosession.xsl)
xsl:template match=/
session:createcontext name=test/
session:setxml context=test path=teststring12345/session:setxml
/xsl:template
(readfromsession.xsl)
xsl:template match=/
div
p here is the session info /p
session:getxml context=test path=teststring/
/div
/xsl:template
(sitemap.xmap)
map:match pattern=testsession
map:generate type=file src=root.xml/
map:transform src=writetosession.xsl/
map:transform type=session/
map:transform src=readfromsession.xsl/
map:transform type=session/
map:serialize type=xml/
/map:match
My coplet submits to this pipeline and displays the expected response

here is the session info
12345
My issue however is that I need to pass the information from the session
using the SessionContext input module.
Test Pipeline 2 This pipeline reads in a root element.
The first transformation creates a new context in the session
which is transformed afterwords by the session transformer.
The pipline then attempts to pass the data from the session using the 
SessionContext input module as a parameter to an xslt transformer

The snippet below illustrates the principle.

(writetosession.xsl) as above

xsl:param name=sessionid/xsl:param

(readfromsession2.xsl)
xsl:template match=/
div
	p here is the session info xsl:value-of 
select=$sessionid/xsl:value-of/p	
/div
/xsl:template

(sitemap.xmap)
map:match pattern=testsession
map:generate type=file src=root.xml/
map:transform src=writetosession.xsl/
map:transform type=session/
map:transform src=readfromsession2.xsl
	map:parameter name=sessionid 
value={session-context:test/teststring}/	
/map:transform
map:serialize type=xml/
/map:match



When called directly this pipeline returns as expected ie
here is the session info 12345
Howver when called from a coplet the session data is not returned.

No errors are being logged.

Has anybody experiences similar issues whilst using the SessionContext 
input module with a coplet ?

I would appreciate any assistance with this.
In the mean time I shall look at the differences in the source between 
accessing the sesison from the transformer and from the failing input 
module.

Kind regards

Si

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Make an item selected in woody selection-list

2004-02-04 Thread Simon Hutchinson
Tim Larson wrote:
On Tue, Feb 03, 2004 at 05:50:03PM +, Simon Hutchinson wrote:

I am populating a woody selection-list dynamically but have been unable 
to find a way of making a particular item in the list the initial 
selected item . Could someone please point a beginner in the right 
direction ?


Set the value of the widget from your flowscript.
See cocoon-2.1\src\blocks\woody\samples\flow\woody_flow_example.js
for an example of how this is done for the form1 example.
If you are not using flowscript, this can also be done from Java code:
cocoon-2.1\src\blocks\woody\java\org\apache\cocoon\woody\samples\InitForm1Action.java
--Tim Larson

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Thanks for your help Tim.
Setting a default value in flow worked a treat.
form.getWidget(mySelectlist).setValue(myDefaultValue);

Cheers

Si

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Authentication context and modular database action.

2003-12-11 Thread Simon Hutchinson
Hi,

I am using a ModularDatabaseAction to insert a row into a database.
Everything is working fine as most of the field values are available
as request parameters.However I also need to store a value that is
stored in the authentication context.
I am sure that writing my own InputModule for this is overkill as the
information is available already.
Either of the following types of solution would be cool if anyone could
point me in the right direction.(of course I am completely open to a 
better solution :))

1). Is it possible to access the authentication context using the 
session-context InputModule in the database descriptor ?

ie

value name=fieldname  type=int
	mode name=session-context	 
parameterauthentication/authentication/ID/parameter
 /mode
/value

note: I tried this and it didn't work.The IDs value is available in the 
sitemap using the same input module

ie

{session-context:authentication/authentication/ID}

So maybe I am writing the mode incorrectly ?

2). Is it possible to pass values as parameters to the action directly 
from sitemap.

ie

map:act type=mod-db-add
  map:parameter name=table-set value=mySet/ 

  map:parameter name=myparam 
value={session-context:authentication/authentication/ID}/
/map:act

If the answer is yes than a code snippet showing how to access the 
parameter from within the database descriptor would be great.

Any assistance to a new cocoon user would be wonderful.

Thanks

Si

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Handling SAX Exceptions in sitemap

2003-11-25 Thread Simon Hutchinson
Joerg Heinicke wrote:
On 24.11.2003 12:06, Simon Hutchinson wrote:

Hi,

Does anyone know if it is possible to handle SAX exceptions thrown by 
a transformer using a error handler defined in a sitemap.


Yes.

Here is a brief test to explain what I am trying to achieve.

map:pipeline
 map:match pattern=test
map:generate src=fragments/test.xml/  
map:transform src=xsl/testtrans.xsl/
map:serialize type=xml/
 /map:match
 map:handle-errors
 map:generate src=fragments/error.xml/
map:serialize//map:handle-errors
/map:pipeline

If I rename the file test.xml to force a filenotfound exception in 
the generator then the pipeline level error handler is correctly invoked.

However if the generator stage succeeds but then a SAX exception occurs
in the transformer my error handler is not invoked and an
XML Parsing Error: no element found 
is sent to my browser.


Really sound like a problem with the file. Can you open it with a 
browser understanding XML as Mozilla, NS 6/7 or IE 5/6?

It may be that I am approaching this in the wrong way but is there
any way of defining an error handler that will be invoked despite
where in the pipeline the error occurs. ie can transform errors be 
caught in the sitemap.

Any help would be much appreciated.


http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html

Joerg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Thanks for the reply Joerg

It was actually my mistake.
What I thought was a SAX parsing exception was actually Mozilla failing 
to parse badly formed xml.
No exception was being thrown therefore the handler was never initiated.
I have re-wrtten my transformer to rectify the issue.

Thanks again for the assistance all

Si





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Handling SAX Exceptions in sitemap

2003-11-24 Thread Simon Hutchinson
Hi,

Does anyone know if it is possible to handle SAX exceptions thrown by a 
transformer using a error handler defined in a sitemap.

Here is a brief test to explain what I am trying to achieve.

map:pipeline
 map:match pattern=test
	map:generate src=fragments/test.xml/  		   		 
map:transform src=xsl/testtrans.xsl/	   		 
map:serialize type=xml/
 /map:match
 map:handle-errors
 	map:generate src=fragments/error.xml/
	map:serialize/
 /map:handle-errors
/map:pipeline

If I rename the file test.xml to force a filenotfound exception in the 
generator then the pipeline level error handler is correctly invoked.

However if the generator stage succeeds but then a SAX exception occurs
in the transformer my error handler is not invoked and an
XML Parsing Error: no element found 
is sent to my browser.
It may be that I am approaching this in the wrong way but is there
any way of defining an error handler that will be invoked despite
where in the pipeline the error occurs. ie can transform errors be 
caught in the sitemap.

Any help would be much appreciated.

Thanks

Si

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Handling SAX Exceptions in sitemap

2003-11-24 Thread Simon Hutchinson
Lionel Crine wrote:
hi,

If you're using the common xslt transformer, you should look at the source.
If the methods don't throw any exception, so you can't catch the 
exception with the handle-errors.
If you're using Cocoon 2.1, you can customize the exception.Search the 
archive.

Lionel

At 11:06 24/11/2003 +, you wrote:

Hi,

Does anyone know if it is possible to handle SAX exceptions thrown by 
a transformer using a error handler defined in a sitemap.

Here is a brief test to explain what I am trying to achieve.

map:pipeline
 map:match pattern=test
map:generate 
src=fragments/test.xml/
map:transform 
src=xsl/testtrans.xsl/
map:serialize type=xml/
 /map:match
 map:handle-errors
map:generate src=fragments/error.xml/
map:serialize/
 /map:handle-errors
/map:pipeline

If I rename the file test.xml to force a filenotfound exception in 
the generator then the pipeline level error handler is correctly invoked.

However if the generator stage succeeds but then a SAX exception occurs
in the transformer my error handler is not invoked and an
XML Parsing Error: no element found 
is sent to my browser.
It may be that I am approaching this in the wrong way but is there
any way of defining an error handler that will be invoked despite
where in the pipeline the error occurs. ie can transform errors be 
caught in the sitemap.

Any help would be much appreciated.

Thanks

Si

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Thanks for the reply,

I am using cocoon 2.1 could you please be a little more specific about 
what you mean by customising the exception. I have searched the archives
without any real success.



Kind regards



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


URL Encoding (Coccon 2.1 cvs as of about 2 weeks ago)

2003-11-19 Thread Simon Hutchinson
   Hi,
  
   I am very new to coccon so please excuse any glaring errors in my 
question.
   I have written a transformer whose job in part is to extrat a uri 
from a knowledge article returned from our knowledgebase.

   swsolution
cinclude:include select=*|text()
  xsl:attribute 
name=srccocoon:/soldoc?url=xsl:value-of 
select=normalize-space(LongDescLink)/ 
  
 /xsl:attribute
/cinclude:include
   /swsolution

   The snippet above indicates my attempt. -
   The cinclude transformer then transforms the xml and finds the 
correct matcher in my sitemap.

   I want to use the html generator to return the file. see below

   map:pipeline
   map:match pattern=soldoc
   map:generate src={request-param:url} type=html/
   map:serialize/   
  /map:match
/map:pipeline

   This solution works until I try to generate a uri with an illegal 
character ie a space.
   It appears that the request-param is (correctly) decoding the 
parameter I am passing it but unfortunately this is not the behaviour I 
require.

   Is there any way that I can re-code the parameter before generating it ?
   Or can anyone suggest an alternative means of achieving the same 
end. ie generating html from a remote server.

   Any help would be appreciated.

   Cheers

   Si
  

  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: URL Encoding (Coccon 2.1 cvs as of about 2 weeks ago)

2003-11-19 Thread Simon Hutchinson
Tony Collen wrote:
Simon Hutchinson wrote:


   This solution works until I try to generate a uri with an illegal 
character ie a space.
   It appears that the request-param is (correctly) decoding the 
parameter I am passing it but unfortunately this is not the behaviour 
I require.

   Is there any way that I can re-code the parameter before generating 
it ?
   Or can anyone suggest an alternative means of achieving the same 
end. ie generating html from a remote server.


I think what you need is the RawRequestParameterModule.

See http://wiki.cocoondev.org/Wiki.jsp?page=InputModules
Thanks for the suggestion. From the documentation this seems like the 
correct input module for my issue.
It does allow me to reduce my probelm to a simpler case however.

With the following sitemap match

map:match pattern=soldoc
  map:generate src={raw-request-param:url} type=html/
  map:serialize/
/map:match
If I request

http://localhost:8080/cocoon/soldoc?url=http://example.com/foo.html

the html is returned

However even with the raw-request-param module specified if I request

http://localhost:8080/cocoon/soldoc?url=http://example.com/fo%20o.html

I get a file not found exception (the file fo o.html does exist and I 
can get it with the plain url http://example.com/fo%20o.html)

Can anyone advise me as to why this might be ?

Thanks

Si



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]