cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: xsp.xsl
Date Sun, 22 Jul 2001 12:23:26 GMT


Torsten Curdt a écrit :
> 
> Are there reasons or objections not to change
> the access to the contenthandler in the xsp.xsl
> from "this.contentHandler" to only "contentHandler"?
> 
> Then we could do a local redirect of SAX events:
> 
>   ...
>   contentHandler.startElement("", "item", "item", xspAttr);
>   {
>     AttributesImpl xspAttr = new AttributesImpl();
>     XMLConsumer contentHandler = ...;
> 
>     contentHandler.startElement("", "item", "item", xspAttr);
>   }
> 
> It gives us the feature of redirecting SAX events
> to other XMLConsumers. (This would be a real seamless
> integration for the XForm and DOMObject implementation)
> 
> There should be no undesired side effects...

Yes, there are side effects with logicsheets that use
this.contentHandler.

I use the following construct to change the contentHandler :
<xsp:logic>
  ContentHandler oldHandler = this.contentHandler;
  try {
    this.contentHandler = otherHandler;
    ...
  } finally {
    this.contentHandler = oldHandler;
  }
</xsp:logic>

> --
> Torsten
> 
Sylvain.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message