You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Shane Curcuru/CAM/Lotus <sh...@us.ibm.com> on 2003/02/06 19:59:02 UTC

Re: Factory questions: proposal: use factory.createTypedNode(id) instead

Here's a proposal for the nodeFactory: why not have it have a set of 
createTypeXNode(id) for the common node types?  This would eliminate the 
casts needed and make the create methods simpler. 

Since we have a reasonably bounded set of AST nodes we're actually going 
to be using (the max number driven from the spec's grammar), why not just 
define the factory to have creation methods for each type, plus one 
'fallback' createNode(id) method for future expansion or less-frequently 
used node types.

A minor point, but it could be a little bit faster and seems like it would 
make implementing the Xalan factory impl a little bit easier as well.  Or 
am I missing something fundamental here?

- Shane


Re: Factory questions: proposal: use factory.createTypedNode(id) instead

Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
----- Original Message -----
From: "Lionel Villard" <vi...@us.ibm.com>
To: <xa...@xml.apache.org>
Sent: Thursday, February 06, 2003 2:18 PM
Subject: Re: Factory questions: proposal: use factory.createTypedNode(id)
instead


>
> Yep sound good for me. I'll do that.
>

 Yes, I like that too.

-- Santiago



Re: Factory questions: proposal: use factory.createTypedNode(id) instead

Posted by Lionel Villard <vi...@us.ibm.com>.



Yep sound good for me. I'll do that.



                                                                                                                              
                      Shane                                                                                                   
                      Curcuru/Cambridge        To:       xalan-dev@xml.apache.org                                             
                      /IBM@Lotus               cc:       Lionel Villard/Watson/IBM@IBMUS                                      
                                               Subject:  Re: Factory questions: proposal: use factory.createTypedNode(id)     
                      02/06/2003 01:59          instead                                                                       
                      PM                                                                                                      
                      Please respond to                                                                                       
                      xalan-dev                                                                                               
                                                                                                                              




Here's a proposal for the nodeFactory: why not have it have a set of
createTypeXNode(id) for the common node types?  This would eliminate the
casts needed and make the create methods simpler.

Since we have a reasonably bounded set of AST nodes we're actually going
to be using (the max number driven from the spec's grammar), why not just
define the factory to have creation methods for each type, plus one
'fallback' createNode(id) method for future expansion or less-frequently
used node types.

A minor point, but it could be a little bit faster and seems like it would
make implementing the Xalan factory impl a little bit easier as well.  Or
am I missing something fundamental here?

- Shane