Both of these are kind of interesting. Personally, while I like the
short syntax for typing, the long one for XML work.
My main issue with the current mapping is that I always use ',' as the
separator, not ';', because that is how ant breaks things up. but I can
also see that it isnt long before the mapping string becomes very long
indeed.
-Steve
Maarten Coene wrote:
There is already a (limited) possibility to express the configuration mapping
with XML elements:
<dependency ...>
<conf name="from1" mapped="to1,to2">
<conf name="from2">
<mapped name="to3" />
<mapped name="to4" />
</conf>
</dependency>
See also http://www.jayasoft.org/ivy/doc/ivyfile/dependency-conf
regards,
Maarten
----- Original Message ----
From: easyproglife <[EMAIL PROTECTED]>
To: ivy-dev <[email protected]>
Sent: Thursday, November 16, 2006 7:09:34 PM
Subject: New XML syntax suggestion for configured dependencies
Hi.
I want to share you with my thought about ivy.xml syntax:
A powerful feature is the configuration feature and configuration mappings.
I find this feature very useful for my tasks.
The problem is that from version to version it becomes more code-based and
less human readable. I am talking about the '*', '@', '->', '#' and other
codes inside 'conf' attribute.
I wondered if we can use the power of XML to suggest an
"elements-and-attributes" approach where 'conf' attribute like: "compile,
runtime -> @; schema -> wsdl" for example would be written like (just a
suggestion):
<dependency ....>
<conf>
<from>compile</from>
<from>runtime</from>
<to conf="same"/>
</conf>
<conf>
<from>schema</from>
<to>wsdl</to>
</conf>
</dependency>
Yes, it is longer, I can see that, but the benefits are:
1. It is pure XML approach - great for parsers, XSLTs, etc.
2. It is more human readable. No need to remember all the 'conf' codes and
tokens. Good for newbies.
Of course you can keep the old syntax as well, the same way you did with
'organization' and 'organisation' for example. Every one could choose the
way he prefer.
What do you think?
easyproglife