ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Wolfgang Hujer <Christian.Hu...@itcqis.com>
Subject Shouldn't target name and depend be ID and IDREFS?
Date Sat, 01 Jun 2002 21:21:59 GMT
Hello dear list members,


I have a question.
Searching the ant-user mail archive did show no results on IDREFS, so
please excuse if this has already been discussed.

Currently, the <target name=""/>-attribute is not of type ID, though
duplicate targets are not allowed.  Wouldn't it be easier to verify this
using a DTD or Schema that disallows duplicate target names by declaring
the following?
<!ATTLIST target
    name ID #REQUIRED
>

Currently, the <target depends=""/>-attribute accepts a comma seperated
list of existing targets.  Wouldn't it be easier to verify this using the
following?
<!ATTLIST target
    depends IDREFS #IMPLIED
>

This definition could already be helpful for validation of build files
against the external subset generated by the antstructure task.  Anyway,
currently (Ant 1.5 Beta 2) antstructure outputs
<!ATTLIST target
    name CDATA #REQUIRED
>
which I think should be
<!ATTLIST target
    name ID #REQUIRED
>

Yes this would clash with the id attribute.  Not so fine, when using DTDs
one could not use the same value for the id and for the name attribute.
But with XML Schema I think this will be no problem.  And in general
I think scripting in Ant is less often seeked for as the general ability to
validate build.xml.


Anyway, it would be great if it would be possible to validate ant build
files properly.  I know it's not quite easy at the moment.
But it could be possible using XML Schema, I think.


If not already suggested, I suggest XML Schema validation for ANT 2.0.
(But I won't die if Ant 2.0 won't have Schema validation)



Greetings, have a nice sunday.

-- 
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter
ITCQIS GmbH
Telefon: +49 (089) 27 37 04 37
Telefax: +49 (089) 27 37 04 39
E-Mail: mailto:Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message