Ovidiu Predescu wrote:
> Sylvain,
> 
> On Thu, 16 Aug 2001 10:52:25 +0200, Sylvain Wallez <[EMAIL PROTECTED]> 
>wrote:
> 
> 
>>>public interface XMLFragment
>>>{
>>>  void toSAX(ContentHandler handler) throws SAXException;
>>>  void toSAX(XMLConsumer consumer) throws SAXException;
>>>  void toDOM(Node node) throws Exception;
>>>}
>>>
>>Be careful with XMLFragment : it's the only class that is common to both
>>Cocoon1 and Cocoon2. This was meant to facilitate the transition by
>>allowing people to represent their application objects with an
>>XMLFragment that would be handled equally by C1 and C2.
>>
> 
> Do you think is OK if I add the toSAX(XMLConsumer) method to
> XMLFragment?
> 
> Greetings,
> 

Well, I think we should avoid this : if XMLFragment is modified, this 
means "legacy" XMLFragment implementations coming from C1 apps won't run 
in C2.

What about a new interface that extends XMLFragment with 
toSAX(XMLConsumer) ? Suggested names : ExtendedXMLFragment, XMLizable.

Or we could consider XMLFragment as purely legacy (i.e. support it but 
deprecate it), and have the new interface be independent with only 
toSAX(XMLConsumer), since toDOM() is useless for C2 :

public interface XMLizable {
   void toSAX(XMLConsumer consumer) throws SAXException;
}

Thoughts ?

Sylvain.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


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

Reply via email to