You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by "Jason E. Stewart" <ja...@openinformatics.com> on 2001/03/16 00:24:11 UTC
actual_cast()
Hey All,
After working with Xerces.pm for a little while, I noticed how
actual_cast() is needed to rebless DOM_Node instances into the proper
subclass. It's great that the function exists, and I wanted it to
always be applied.
So I've modified postModule.pl so that every function that returns a
DOM_Node calls actual_cast() before it's returned.
The only problem is that I'm not clear on what this might break. Are
there any cases in which we *don't* want to down-cast automatically?
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: actual_cast()
Posted by "Harmon S. Nine" <hn...@netarx.com>.
Jason E. Stewart wrote:
> Hey All,
>
> After working with Xerces.pm for a little while, I noticed how
> actual_cast() is needed to rebless DOM_Node instances into the proper
> subclass. It's great that the function exists, and I wanted it to
> always be applied.
>
> So I've modified postModule.pl so that every function that returns a
> DOM_Node calls actual_cast() before it's returned.
>
> The only problem is that I'm not clear on what this might break. Are
> there any cases in which we *don't* want to down-cast automatically?
>
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
I can't think of any. By inheritance from DOM_Node, there should be no
loss of API. :-)
-- Harmon
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org