Hello all,

I have looked through the documentation and mailing list archive and did
not find an answer to my problem, so I thought I post it to the mailing
list.

I am trying to read a directory of generated xml files and process them
and write them out...I am getting the following error when the <xmltask>
tries to read the file:

  [xmltask] org.xml.sax.SAXParseException: Relative URI
"/some/directory/to/an/application.dtd"; can not be resolved without a
base URI.
  [xmltask]     at
org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)
  [xmltask]     at
org.apache.crimson.parser.Parser2.fatal(Parser2.java:3370)
  [xmltask]     at
org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2952)
  [xmltask]     at
org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2924)
  [xmltask]     at
org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1309)
        .
        .
        .
The top of the xml files looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Simpson SYSTEM "/some/directory/to/an/application.dtd ">
<Simpson command="insert">
    <Level class="one" description="Level One Information>
        <Set value="the value of the set"/>
                .
                .
If I remove the <!DOCTYPE ... > line then all is well...I have been
doing during development however now I need to deal with production
files and I can remove the line Now I know that the file is valid and
all my operations will not change the validity of the file, so how can I
get <xmltask> to process the file.  If I could merely tell <xmltask> to
ignore the DOCTYPE element(s) that would be great!!!!

Following the documentation (ANT and xmltask) I tried adding the
following <xmlcatalog> elements to my ANT build script:

<project name="test" default="removeSource">
  <property name="source.dir" value="source"/>

  <xmlcatalog id="dtds">
    <dtd publicId="/some/directory/to/an/application.dtd "
location="${source.dir}/application.dtd"/>
  </xmlcatalog>

  <target name="removeSource">
    <mkdir dir="${dest.dir}"/>
    <xmltask todir="${dest.dir}">
      <xmlcatalog refid="dtds"/>
        .
        .
        .
    </xmltask>
  </target>
  
</project>

But it does not help.

Is the problem that the URI specified (in the DOCTYPE element) is a
partial URI...it is missing a scheme: component (http://, ftp://, or
file://).  I would like to get the <xmltask> to work without modifying
the original file and so I am hoping somebody can help with the
<xmlcatalog> (or older <entity>) syntax so that I can allow the file to
be processed.

Thanx,

Ninju

---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and 
is intended to be received only by persons entitled to receive such 
information. If you have received this e-mail in error, please notify the 
sender immediately. Please delete it and all attachments from any servers, hard 
drives or any other media. Other use of this e-mail by you is strictly 
prohibited.


All e-mails and attachments sent and received are subject to monitoring, 
reading and archival by Monsanto. The recipient of this e-mail is solely 
responsible for checking for the presence of "Viruses" or other "Malware". 
Monsanto accepts no liability for any damage caused by any such code 
transmitted by or accompanying this e-mail or any attachment.
---------------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to