You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeremy Quinn <je...@media.demon.co.uk> on 2000/09/09 15:04:06 UTC

planning FP TagLib for C2

Dear All,

I have been slowly working on the FP TagLib, mostly on the DOM manipulation
side, and then, only on the weekends :)

I would like what I am doing for C1 to be forward compatible with C2.

As I understand the situation ....

I must not pass xspCurrentNode, document, or contentHandler to my methods.
Any manipulation of parent elements must be done using XSL in my logicsheet.
My methods should return XObjects.


I think this is all possible for this TagLib but it will require quite
large changes to the DTD. Should I restart this as a new TagLib or expect
people who may have started using it to adapt?


Also, what is the preferred pattern for TagLib parameters now?

C1 and C2 both use this form:

		<fp:read as"node" from="blah" />
	or
		<fp:read>
			<fp:as>node</fp:as>
			<fp:from>blah</fp:to>
		</fp:read>

C2 has introduced this new form (and a very handy template to extract it):

		<fp:read as"node" from="blah" />
	or
		<fp:read>
			<fp:param name="as">node</fp:param>
			<fp:param name="from">blah</fp:param>
		</fp:read>


Which of these is the best to use?


thanks for any help

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>

Re: planning FP TagLib for C2

Posted by Nicola Ken Barozzi <ni...@supereva.it>.
----- Original Message ----- 
From: "Jeremy Quinn" <je...@media.demon.co.uk>

> At 14:04 +0100 09/09/00, Jeremy Quinn wrote:
> >I would like what I am doing for C1 to be forward compatible with C2.
> >
> >As I understand the situation ....
> >
> >I must not pass xspCurrentNode, document, or contentHandler to my methods.
> >Any manipulation of parent elements must be done using XSL in my logicsheet.
> >My methods should return XObjects.
> 
> Hang on, I think I am confusing this ...
> 
> There are two XObjects ....
> 
> An interface org.apache.cocoon.framework.XObject
> 
> A class org.apache.xalan.xpath.XObject (that I have been getting aquainted
> with)
 
> I must return an object that implements org.apache.cocoon.framework.XObject ??
> ie. that has both toDOM(Node) and toSax(DocumentHandler) methods?

You can do all the validation in Sax but there's a problem...
all errors are trapped by the sitemap and throws "brutally".
Then they're caught by my error handling.
The problem is that you don't know what went wrong and
cannot continue... but ok, so you re-validate only what you want
separately, so you hook-in your error handler...ok.
If you need help and changes on errors, I'm here :-) .

nicola_ken


Re: planning FP TagLib for C2

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 14:04 +0100 09/09/00, Jeremy Quinn wrote:
>I would like what I am doing for C1 to be forward compatible with C2.
>
>As I understand the situation ....
>
>I must not pass xspCurrentNode, document, or contentHandler to my methods.
>Any manipulation of parent elements must be done using XSL in my logicsheet.
>My methods should return XObjects.

Hang on, I think I am confusing this ...

There are two XObjects ....

An interface org.apache.cocoon.framework.XObject

A class org.apache.xalan.xpath.XObject (that I have been getting aquainted
with)


I must return an object that implements org.apache.cocoon.framework.XObject ??
ie. that has both toDOM(Node) and toSax(DocumentHandler) methods?


thanks for any help

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>