Take a look at the EntityResolver functionality.
An entityresolver translates public and system id's to InputSources for the
parser to use.
In other words, you can store the DTD anyway you want. Filesystem, database,
resource... only you set the limit.

/ Erik

-----Original Message-----
From: Sven Staible [mailto:[EMAIL PROTECTED]]
Sent: den 29 januari 2003 14:55
To: Xerces-C-Dev Mailinglist
Subject: How can I feed the DTD independently from the working
directory?



Hi,

I have an application where I parse an XML-file with the DOMBuilder parser.
The XML contains the following header:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE CertificateEvaluatorConfiguration SYSTEM
"CertificateEvaluator.dtd">

I can add relative or abstract directory-path information to the
DTD-filename. The parser seems to search for the DTD relative to the
applications working directory.
I'm looking for a way to feed the DTD independently of the working
directory. I already tried to preparse the DTD with loadGrammar() but didn't
succeed in the XML-parser actually using the preparsed grammar. (I did
enable the
'http://apache.org/xml/features/validation/cache-grammarFromParse' feature.)

Is there a way to feed the DTD without correct path information in the
XML-header? Did I miss something with the use of the system-identifier/
preparsed grammar?

Any help would be appreciated, thank you.

Regards,
Sven Staible

--
Sven Staible <[EMAIL PROTECTED]>, Senior Software Engineer
keyon > applying security to your e-business
Sch�nbodenstrasse 4, CH-8640 Rapperswil, Switzerland
Phone +41 55 220 64 06, Fax +41 55 220 64 01, www.keyon.ch
keyon @ iEX 03 - Halle 6. Stand 140


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


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

Reply via email to