You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Michael J. Lanham" <ml...@cise.ufl.edu> on 2002/05/14 21:44:26 UTC

Xerces-C and OpenOffice.org: anyone success?

Hi,

trying to parse the content.xml file from an OpenOffice.org zip archive 
created by openoffice writer program.  keep getting this error
Message: An exception occured! Type:RuntimeException, 
Message:Could not open DTD file 
     '/.automount/netapp0/export/homes02/mlanham/tmp/office.dtd'
An error occured during parsing

has anyone else had success parsing the content.xml file?
how did you do it?

the offending line in the xml file looks like this: 
<!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD 
OfficeDocument
1.0//EN" "office.dtd"> 


I tried turning validation in Xerces-C off but that did not seem to help

Mike

-- 
Michael Lanham
Captain, Infantry
United States Army

- TA for CIS 6930 Unix System Admin
- Some say patriotism is the last refuge of the scoundrel.  I propose that 
religion has subsumed that role for the knuckleheads of this century.



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: Xerces-C and OpenOffice.org: anyone success?

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Michael J. Lanham" <ml...@cise.ufl.edu> writes:

> trying to parse the content.xml file from an OpenOffice.org zip
> archive created by openoffice writer program.  keep getting this
> error Message: An exception occured! Type:RuntimeException,
> Message:Could not open DTD file
>      '/.automount/netapp0/export/homes02/mlanham/tmp/office.dtd'
> An error occured during parsing
> 
> has anyone else had success parsing the content.xml file?
> how did you do it?
> 
> the offending line in the xml file looks like this: 
> <!DOCTYPE office:document-content PUBLIC "-//OpenOffice.org//DTD 
> OfficeDocument
> 1.0//EN" "office.dtd"> 

It seems like your system is mapping the openoffice public identifier
to a file that doesn't exist on your system (the
.../mlanham/tmp/office.dtd looks suspicious).

> I tried turning validation in Xerces-C off but that did not seem to help

You'll have to remove the whole DOCTYPE. If there's a dtd listed,
xerces *has* to open it.

Otherwise, you can simply put a simlink to the DTD directory in your
working directory and modify the SYSTEM name to match:

  ln -s /path/to/office/dtd/ ~/dtd
  <!DOCTYPE office:document-content SYSTEM "dtd/office.dtd"> 

The OOo DTD is modular, so it includes a lot of other files in the
same directory.

HTH,
jas.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org