cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <esa...@canuck.com>
Subject Re: Forms proposal
Date Sat, 08 Jul 2000 00:22:53 GMT
on 7/7/00 8:45 pm, Stefano Mazzocchi at stefano@apache.org wrote:

> Mark Washeim wrote:
>> 
>> on 7/7/00 12:42 pm, Stefano Mazzocchi at stefano@apache.org wrote:
>> 
>>> Giacomo Pati wrote:
>>>> 
>>>> --- Jeremy Quinn <jeremy@media.demon.co.uk> wrote:
>>>>> At 20:18 +0200 05/07/00, Giacomo Pati wrote:
>>>>>>> Will such TagLibs work in C2?
>>>>>>> 
>>>>>>> Or will they all have to be re-coded for SAX?
>>>>>> 
>>>>>> If you use XSP internal stuff like
>>>>>> 
>>>>>> xspParentNode = xspCurrentNode;
>>>>>> xspNodeStack.push(xspParentNode);
>>>>>> xspCurrentNode = document.createElement("tr");
>>>>>> xspParentNode.appendChild(xspCurrentNode);
>>>>>> 
>>>>>> then I think yes it must be recoded.
>>>>> 
>>>>> Oh dear! :)
>>>>> Jeez, it's taken me long enough to get my head around doing this in DOM
:)
>>>> 
>>>> I don't know if you must use DOM. With SAX I feel it's like doing
>>>> 
>>>> this.contentHandler.startElement("", "title", "title", xspAttr);
>>>> xspAttr.clear();
>>>> this.characters("A Simple XSP Page");
>>>> this.contentHandler.endElement("", "title", "title");
>>> 
>>> How many times to I have to tell you people? If you are coding something
>>> about SAX or DOM _by_hand_ you'll have troubles.
>>> 
>>> Gee, XSP was created to allow you guys to _avoid_ learning SAX or DOM.
>>> Tell me: why is it so hard to use?
>> 
>> Well, I agree in principle. However, there are cases where, though I NEVER
>> use the nodestack directly, I DO need to create elements (that is, use the
>> document as a factory to create child elements, etc). In fact, it's an
>> obvious requirement for many things the tag-lib author needs to do all the
>> time (ie, consistant reporting of errors, for which I use a util class to
>> append a child node with an explicit, content derived, error message....) .
>> . .
> 
> Give me an example of this.
> 
> If the XSP is limited, we have a design bug, otherwise, we just have to
> write more documents.
> 

XSPCookieLibrary.java

is an example of this. :)

I simply meant to say that, though the pages themselves (xsp or tag-lib
xlt)may not require direct manipulation, I certainly do want to be able to
do somethings (for instance, iterate through the nodes of a
util:include-file included document) and be able to treat those nodes (ie,
append values). To do so, I need to manipulate the DOM (eventually sax event
stream), directly. Or? I mean, I'm attempting to isolate end-users by
writing tag-libs (for instance, producing filterd views of the file system)
but often need to manipulate the results . . .


> 

-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Mime
View raw message