> -----Original Message-----
> From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 31 December, 2003 11:12 AM
> To: OJB Users List
> Subject: Re: ojbdoclet task in ant build.xml
> 
> >  
> > 1.How to avoid editing the project-schema generated via ojb doclets?
> > I have to replace
"http://jakarta.apache.org/turbine/dtd/database.dtd
> > <http://jakarta.apache.org/turbine/dtd/database.dtd> " with 
> > "src/schema/database.dtd", otherwise ...
> > 
> >    [torque-sql] Using contextProperties file:
> > E:\Workspaces\pds\myproject\build.properties
> >    [torque-sql] Using classpath
> >    [torque-sql] Generating to file 
> > E:\Workspaces\pds\myproject\src\sql\report.myproject.sql.generation
> >    [torque-sql] Parsing file: 'myproject-schema.xml'
> >    [torque-sql] (transform.DTDResolver               140 ) Resolver:
> > used    http://jakarta.apache.org/turbine/dtd/database.dtd
> >    [torque-sql] (transform.DTDResolver               160 ) Couldn't
read
> > DTD specified in XML schema: 
> >    [torque-sql] java.net.UnknownHostException: jakarta.apache.org
> 
> This is a known problem with some XML parsers. There is an (for
whatever reason yet undocumented)
> attribute of the torque sub task called 'dtdUrl' that allows to
specify the url of the dtd
> in the build file.

I am trying to fix this in my ant builds, but...

1. Which version(s) of the XML Parser is suitable for torque? I have got
the same error with Xerces 2.6.0 (the latest version).

2. I am using torque, version 3.0.2 and apparently the 'dtdUrl'
attribute is not known...
   If I edit the build-torque.xml as follows...

        <torque-sql
          contextProperties="${build.properties}"
          controlTemplate="${SQLControlTemplate}"
          outputDirectory="${torque.home}/${outputDirectory}/sql"
          useClasspath="true"
          basePathToDbProps="sql/base/"
          sqldbmap="${torque.home}/${outputDirectory}/sql/sqldb.map"
          outputFile="report.${project}.sql.generation"
          targetDatabase="${database}"
          dtdUrl="src/schema/database.dtd"
          idTableXMLFile="${idTableXMLFile}">
          <fileset dir="${torque.home}/${schemaDirectory}">
            <include name="*-schema.xml"/>
          </fileset>
        </torque-sql>    

   the torque task complains that it does not support the "dtdurl"
attribute.

        prepare-db:

        project-sql-classpath:
             [echo] +------------------------------------------+
             [echo] |                                          |
             [echo] | Generating SQL for OJB Testsuite!        |
             [echo] | enJoy!                                   |
             [echo] |                                          |
             [echo] +------------------------------------------+
        [torque-sql] Using contextProperties file:
E:\Workspaces\pds\myproject\build.properties

        BUILD FAILED
          E:/Workspaces/pds/myproject/build-torque.xml:454: The
<torque-sql> task doesn't support
        the "dtdurl" attribute.

   Do I need a more recent version of torque to use the "dtdurl"
attribute?

Best regards,

Pierre

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to