You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christian Wolfgang Hujer <Ch...@itcqis.com> on 2002/06/01 23:21:59 UTC

Shouldn't target name and depend be ID and IDREFS?

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>