ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: String -> Ressource (was Re: archivefileset resources)
Date Fri, 23 Mar 2007 14:43:42 GMT
Stefan Bodewig wrote:
> On Wed, 21 Mar 2007, Matt Benson <> wrote:
>> I think what is needed is a well-known syntax specification for
>> specifying a string representation of [resource-type][String to pass
>> to constructor] e.g. "file?/foo/bar.baz",
>> "url?", "string?blah blah blah".
> This is so I can say
> <unzip
>   src="url?"/>
> instead of
> <unzip>
>   <url url=""/>
> </unzip>
> right?
> Sounds right.

>> This is to all intents and purposes the only way, IMHO, to seriously
>> take advantage in Ant tasks of our early decision to design
>> getOutputStream() into the Resource contract.  You'll notice my use
>> of the "?" character above to indicate the preceding text was the
>> name of a currently available type.  I used "?" because for xmlns as
>> well as fs reasons I'm pretty sure this character should NOT be a
>> colon.
> I agree that a colon would be a bad choice, at least if we allow file
> ressources to be specified without a prefix.  I don't really see any
> conflict with xmlns.

ah, this is starting to scare me.

  you'd need qname resolution in string to support custom resources


  I hate those because they only resolve relative to where they are defined

<property name="url" 
  xmlns:tns="" />

this defines the url property with the tns namespace in scope

but where it is used, it may be absent


or defined to something else

    src="${url}" xmlns:tns="http://something-else"/>

So you're going to have to retaiin the entire list of in-scope XMLNS 
declarations in every property you define. Now, what if its a custom 
task that creates the string?  is Project.setNewProperty() going to have 
to take a reference to the node in the DOM graph where the current task 
is working?

You may think I'm being a troublemaker here, but I have had to deal with 
exactly this kind of problem in the past, where we really did have to 
extract and maintain the xmlns list. And believe me, Xom does not go out 
of its way to make that easy

>> However I'm not sure what the RIGHT "trigger character" is and IMO
>> this is the only outstanding question stopping us from adding this
>> feature to Ant.

that and how to correctly handle xml namespaces.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message