You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Pierre, Sebastian" <sp...@Rational.Com> on 2000/06/15 19:05:54 UTC

Ant project DTD

Hi all !

I'm wondering if there is an Ant DTD ?

It could be useful for those who use an XML editor that is DTD-aware, or
someone like me who uses Vim and some scripts to validate their XML
files - but I must say it's quite hard to validate without the DTD ;)

Cheers,

Sebastien PIERRE_______________________

 XML technology intern

 R a t i o n a l Software
 Rational Unified Process team.
 Vancouver, Canada.

---------------------------------------
spierre@rational.com | www.rational.com

Re: Ant project DTD

Posted by Willy Picard <pi...@kti.ae.poznan.pl>.
Hi.

I wrote some DTD. It is not perfect but it can be use.
In this DTD:
    - all deprecated argumens (according to the Ant documentation) are not
        supported.
    - there are some problems with the "available", "javadoc" and
"property"
        tasks: these tags need have some required attributes (for property,

        some of the following attributes are needed: value OR resource OR
file).
        I didn't find any way to model this in a DTD. One solution could be

        to change to something like this:
<!ELEMENT property    EMPTY>
<!ATTLIST    property
    name    CDATA    #REQUIRED
    type    (value, resource,file)    #REQUIRED
    data    CDATA    #REQUIRED>
But then some changes are needed in the sources and documentation.

Waiting for some feedback.

Willy Picard

"Pierre, Sebastian" wrote:

> Hi all !
>
> I'm wondering if there is an Ant DTD ?
>
> It could be useful for those who use an XML editor that is DTD-aware, or
> someone like me who uses Vim and some scripts to validate their XML
> files - but I must say it's quite hard to validate without the DTD ;)
>
> Cheers,
>
> Sebastien PIERRE_______________________
>
>  XML technology intern
>
>  R a t i o n a l Software
>  Rational Unified Process team.
>  Vancouver, Canada.
>
> ---------------------------------------
> spierre@rational.com | www.rational.com

RE: Ant project DTD

Posted by Ken Liu <kl...@auctionlogic.com>.
I know for certain that both Oracle's parser and Xerces have partial
support for XML Schema (they don't have all the functionality implemented).

Ken

> I know that DTDs are quite unexpressive - but that's why schemas are
> coming..The problem, though, is that there is no parser supporting it
> for the moment (maybe Xerces will soon).

> Sebastien PIERRE_______________________
> 
>  XML technology intern
> 
>  R a t i o n a l Software
>  Rational Unified Process team.
>  Vancouver, Canada.
> 
> ---------------------------------------
> spierre@rational.com | www.rational.com
> 

Re: Ant project DTD

Posted by "Pierre, Sebastien" <sp...@Rational.Com>.
Willy Picard wrote:
> I've got a little problem with the "property"
> tag. As far as I understood the Ant doc, the attributes of this
> tag are the following:
> - name is required
> - one of the following is required (value, resource, file)
> 
> Do you know how to model this "one of the following..." ?

You can't do it with attributes... You cannot use exclusion, or
conditionnals. The only way would be using XML schema or another DTD
which instances could be XSLed to Ant's format.

I know that DTDs are quite unexpressive - but that's why schemas are
coming..The problem, though, is that there is no parser supporting it
for the moment (maybe Xerces will soon).

So either be patient, or sacrify some constraints : but don't forget to
mention it into your DTD's documentation !

Cheers,
Seb.

-- 

Sebastien PIERRE_______________________

 XML technology intern

 R a t i o n a l Software
 Rational Unified Process team.
 Vancouver, Canada.

---------------------------------------
spierre@rational.com | www.rational.com

Re: Ant project DTD

Posted by Willy Picard <pi...@kti.ae.poznan.pl>.
Hi.

I'm trying to build an Ant DTD for the basic functionnalities,
I mean for all buildin tasks but with no care about  custom
tasks. But I've got a little problem with the "property"
tag. As far as I understood the Ant doc, the attributes of this
tag are the following:
- name is required
- one of the following is required (value, resource, file)

Do you know how to model this "one of the following..." ?

Willy

"Pierre, Sebastian" wrote:

> Hi all !
>
> I'm wondering if there is an Ant DTD ?
>
> It could be useful for those who use an XML editor that is DTD-aware, or
> someone like me who uses Vim and some scripts to validate their XML
> files - but I must say it's quite hard to validate without the DTD ;)
>
> Cheers,
>
> Sebastien PIERRE_______________________
>
>  XML technology intern
>
>  R a t i o n a l Software
>  Rational Unified Process team.
>  Vancouver, Canada.
>
> ---------------------------------------
> spierre@rational.com | www.rational.com


Re: Ant project DTD

Posted by Michel CASABIANCA <ca...@sdv.fr>.
Hi

James Duncan Davidson <ja...@eng.sun.com> writes:
> > I'm wondering if there is an Ant DTD ?
> > 
> > It could be useful for those who use an XML editor that is DTD-aware, or
> > someone like me who uses Vim and some scripts to validate their XML
> > files - but I must say it's quite hard to validate without the DTD ;)
> 
> It's impossible to define a DTD for ant. The tag names themselves have a
> meaning that can be changed at runtime either in the XML file or
> programmatically. Sure, it'd probably be possible to create a DTD for some
> static set of Ant, but with it's pluggable architecture, it won't be a
> complete one.

Yes, but it is possible to extend a DTD. I have such a DTD on my page :

  http://www.sdv.fr/pages/casa/html/ant-dtd.en.html

-- 
+---------------------------+--------------------------------+
| Michel CASABIANCA         | http://www.sdv.fr/pages/casa   |
| mailto:casa@sdv.fr        | Articles sur Java et XML       |
| Développement Java et XML | Applications et Applets de Jeu |
+---------------------------+--------------------------------+

Re: Ant project DTD

Posted by James Duncan Davidson <ja...@eng.sun.com>.
on 6/15/00 10:05 AM, Pierre, Sebastian at spierre@Rational.Com wrote:

> Hi all !
> 
> I'm wondering if there is an Ant DTD ?
> 
> It could be useful for those who use an XML editor that is DTD-aware, or
> someone like me who uses Vim and some scripts to validate their XML
> files - but I must say it's quite hard to validate without the DTD ;)

It's impossible to define a DTD for ant. The tag names themselves have a
meaning that can be changed at runtime either in the XML file or
programmatically. Sure, it'd probably be possible to create a DTD for some
static set of Ant, but with it's pluggable architecture, it won't be a
complete one.

.duncan