ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: XDocs Proposal
Date Wed, 27 Feb 2002 18:38:12 GMT
----- Original Message -----
From: "Curt Arnold" <carnold@houston.rr.com>
> > Some interesting issues are: How do we deal with enumerated types?
(since
> its
> > building off the source code, I can't just instantiate and call the
method
> > to get the values - or, could I assume the class is available to
> > instantiate?  we are running *in* Ant after all!)
>
> Even that however won't get any descriptive text for the enumeration.

As you've seen with another reply, this is already addressed.  The Available
task should probably be modified to have an EnumeratedAttribute for its
setType method instead of String.

> > Should we add the equivalent of the user manual's "required" column
> > somewhere?
>
> Would it be better to cover more multiplicity options than just 1..1 and
> unspecified?  The most general would be a @minOccurs and @maxOccurs tag,
by
> @required, @optional, @zeroOrMore and @oneOrMore would probably cover the
> gamut.

Sure, and as mentioned earlier, this makes since for task sub-elements.  But
not for attributes where you can only have one of each.  The difficulty I
brought up, though, was that some tasks like <property> have more complex
rules on the validity of attributes.  You cannot specify prefix without
specifying file or resource (in the latest codebase).  How to encode that in
XDoclet tags, I'm not sure.

> My interest in this is generating an XML schema from the XDoc so that you
> validate an ant script before running it and have some assistance in XML
> editors.  I think it would be pretty likely you could generate an
reasonable
> schema from the XDocs.

There are *many* uses for an XML representation of the tasks, and that
certainly is a great one.  I also envision IDE's being able to have more
dynamic context-sensitive "property pages" for tasks such that they could
automatically render a checkbox for a boolean attribute.

    Erik



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


Mime
View raw message