You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@bost.de> on 2000/07/11 13:47:51 UTC
Name that task: creating a DTD for Ant
Hi,
based on the changes I've commited a few minutes ago I've written a
task that generates a (partial) DTD for Ant. What you can expect of it
will look something like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!ENTITY % boolean "(true|false|on|off|yes|no)">
...
<!ELEMENT echo EMPTY>
<!ATTLIST echo
id ID #IMPLIED
message CDATA #IMPLIED>
<!ELEMENT javadoc2 (link | group)*>
<!ELEMENT script (#PCDATA)>
...
this is not perfect - as message in echo is actually #REQUIRED - but
it is a start. All attributes defined as taking a boolean attribute
will look like this
<!ATTLIST patch
id ID #IMPLIED
backups %boolean; #IMPLIED
How would you name such a task? antdtd?
One thing I want to take into account is that the same logic could be
used to create an XML Schema (I've just started reading the Primer)
and an attribute like format (DTD|Schema) to this task seems natural.
Stefan