cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject RE: XObject
Date Mon, 04 Dec 2000 18:14:07 GMT
> >> Sorry, I would -1 XObject2, just don't like names like that :<
> >>
> >> How about something like XInterface, XHandler, XSPObject?
> >
> >+1 for XSPObject (or XSPExprObject ?) because it clearly outlines its
> >intended usage.
> 
> So I suggest this interface:
> 
> package org.apache.cocoon.xml;
> 
> import org.w3c.dom.Node;
> import org.xml.sax.ContentHandler;
> 
> 
> public interface XSPObject {
>   /**
>    * Generates SAX events representing the object's state
>    * for the given content handler
>    */
>   public void toSAX(ContentHandler handler);
> 
>   /**
>    * Appends children representing the object's state to
>    * the given node
>    */
>   public void toDOM(Node node);
> 
>   /**
>    * Returns a String representing the object's state
>    * Used when the output of one TagLib is sent to the input of another,
> 	 * that does not handle XSPObject, or for setting Attributes, etc.
>    */
>   public String toString();
> }

+1 for the XSPObject

I think the toString() is usefull - but should it really be in
the interface for XSPObject?? Should toString() really be required?
Sorry for the (maybe) stupid question - but when would the output
be sent to the input of another taglib this way??
--
Torsten

Mime
View raw message