ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Atkin <ianat...@blueyonder.co.uk>
Subject Re: Help resolving DTD location
Date Wed, 22 May 2002 09:59:10 GMT
XML parsers can use catalogs, but i don't think Ant exposes the option, 
its the setEntityResolver() method in JAXP isn't it?

i think in the absense of one the default is to look in the same dir as 
the XML instance being parsed (or the working dir of the JVM, but i 
think this is based on buggy code from the past)

so you could:-
- use a full path to the dtd
- put the dtd in the same dir as the build script and use "project.dtd"
- not use a doctype

also
- why use a doctype?
- they can't hope to validate the "freeform" nature of Ant's markup
- the Antstructure task tries to write a doctype based on current 
taskdefs (i think) but that still can't get round doctype limitations
- Ant does some of it's own validation as a result, i think based on 
introspection of task/type/... implementations

build processes are yet another thing to go wrong though, it would be a 
*good* thing to get proper markup-based validation going in some form




David North wrote:
> I am new to Ant.  The following snippet cannot resolve where 'project.dtd'
> is located unless I explicitly set the path:
> 
>  <!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "project.dtd">
> 
> 'project.dtd' is located in c:\dtds\ant.
> 
> SGML tools use a CATALOG to reference the public name for a document to a
> physical file.  Does/can Ant do anything similar?
> 
> TIA,
> 
> David North
> david.north@ingenix.com
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 



--
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