You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@covalent.net on 2002/03/05 06:52:15 UTC

ProjectHelper

I re-wrote the ProjectHelper/ProjectHelperImpl, using the current ant code
( i.e. with the comments and all changes - merging was impossible ).

I also removed all other stuff - it's just plugging a different xml
processor and nothing else.

Please review - if everyone is happy ( or at least there are no 
serious reasons to -1 it ) I'll commit it.

I'll start working on the Sax2ProjectHelperImpl assuming the interface
and ProjectHelper will be in this form ( which is the current 
ProjectHelper plus 2 new public methods for the plugging in)

Costin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by co...@covalent.net.
On Wed, 6 Mar 2002, Conor MacNeill wrote:

> > Everything that worked before will continue to work in exactly the
> > same way, it is completely backward compatible.
> > 
> > However if a SAX2 parser is present it'll allow namespaces to
> > be used. 
> > 
> 
> I haven't had time to look at the code yet but how will the namespaces 
> be used? Just curious.

At this moment - the helper is not doing anything with the namespaces,
since the task registration can only deal with the tag name.

I don't think it's a good idea to decide on any particular use of 
namespaces for ant1.5 - just to have them available and pass this info
to the task factory ( assuming the task factory proposal is accepted).
User code can do whatever it wants with it. 

BTW, I think Peter was right that SAX1 helper should remain the default,
in order to have more feedback and experience with the SAX2 one.

Costin





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
costinm@covalent.net wrote:

> On Wed, 6 Mar 2002, Peter Donald wrote:
> 
> 
>>On Wed, 6 Mar 2002 01:45, costinm@covalent.net wrote:
>>
>>>Peter, is this ok ? I have no problem with detecting if SAX2 is
>>>not available and switching back to ProjectHelperImpl ( and using
>>>ProjectHelperImpl2 if SAX2 is detected ).
>>>
>>If it doesn't effect the content allowed in build.xml then sure. 
>>
> 
> Everything that worked before will continue to work in exactly the
> same way, it is completely backward compatible.
> 
> However if a SAX2 parser is present it'll allow namespaces to
> be used. 
> 

I haven't had time to look at the code yet but how will the namespaces 
be used? Just curious.

Conor


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by co...@covalent.net.
On Wed, 6 Mar 2002, Peter Donald wrote:

> On Wed, 6 Mar 2002 01:45, costinm@covalent.net wrote:
> > Peter, is this ok ? I have no problem with detecting if SAX2 is
> > not available and switching back to ProjectHelperImpl ( and using
> > ProjectHelperImpl2 if SAX2 is detected ).
> 
> If it doesn't effect the content allowed in build.xml then sure. 

Everything that worked before will continue to work in exactly the
same way, it is completely backward compatible.

However if a SAX2 parser is present it'll allow namespaces to
be used. 

Costin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by Peter Donald <pe...@apache.org>.
On Wed, 6 Mar 2002 01:45, costinm@covalent.net wrote:
> Peter, is this ok ? I have no problem with detecting if SAX2 is
> not available and switching back to ProjectHelperImpl ( and using
> ProjectHelperImpl2 if SAX2 is detected ).

If it doesn't effect the content allowed in build.xml then sure. 

-- 
Cheers,

Pete

-----------------------------------------------------
First, we shape our tools, thereafter, they shape us.
-----------------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by co...@covalent.net.
On 5 Mar 2002, Stefan Bodewig wrote:

> > -1 on defaulting to SAX2 and thus breaking backwards compatability
> 
> +1 on defaulting to SAX2 if the parser is a SAX2 XMLReader, otherwise
> fall back to SAX1.
> 
> What backwards compatibility problems do you expect, Peter?
> 
> Costin, ProjectHelper didn't use any SAX2 classes in Ant 1.4.1.  I
> have introduced them to add support for AElfred some weeks ago.
> 
> Since we explicitly require JAXP 1.1 we can savely assume that the
> SAX2 classes are on the classpath, but I'm not sure whether this
> implies that the parser must support SAX2 as well.

JAXP1.1 requires SAX2 ( 'a jaxp1.1 implementation must support sax2, 
xslt1.0, dom?.?' ).

However I think I can reverse your change ( that 'masks' a SAX2 XMLReader
as a SAX1 Parser ) and mask a SAX1 parser as a XMLReader ( using the
ParserAdapter ). 

If dependency on SAX2 APIs is acceptable, then this will not break 
anything.

Peter, is this ok ? I have no problem with detecting if SAX2 is 
not available and switching back to ProjectHelperImpl ( and using 
ProjectHelperImpl2 if SAX2 is detected ).

Costin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 5 Mar 2002, Peter Donald <pe...@apache.org> wrote:

> +1 on separation.

+1

> -1 on defaulting to SAX2 and thus breaking backwards compatability

+1 on defaulting to SAX2 if the parser is a SAX2 XMLReader, otherwise
fall back to SAX1.

What backwards compatibility problems do you expect, Peter?

Costin, ProjectHelper didn't use any SAX2 classes in Ant 1.4.1.  I
have introduced them to add support for AElfred some weeks ago.

Since we explicitly require JAXP 1.1 we can savely assume that the
SAX2 classes are on the classpath, but I'm not sure whether this
implies that the parser must support SAX2 as well.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ProjectHelper

Posted by Peter Donald <pe...@apache.org>.
On Tue, 5 Mar 2002 16:52, costinm@covalent.net wrote:
> I'll start working on the Sax2ProjectHelperImpl assuming the interface
> and ProjectHelper will be in this form ( which is the current
> ProjectHelper plus 2 new public methods for the plugging in)

+1 on separation.
-1 on defaulting to SAX2 and thus breaking backwards compatability

-- 
Cheers,

Pete

*-----------------------------------------------------------------------*
PROGRAM: n.  a magic spell cast over a computer allowing it to turn
one's input into error messages.  v.t.  to engage in a pastime similar
to banging one's head against a wall, but with fewer opportunities for 
reward.
*-----------------------------------------------------------------------*

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>