[xml] In-memory catalog



Hello,

I'm defining a XML doctype to be used only by one of my applications. I
would like to use the DOCTYPE as an external subset in the XML files:

...
<!DOCTYPE FXML SYSTEM "http://myhost/DTD/1.0/mydtd.dtd";>
...

While I can (and will) store the DTD at the specified URL, I would like
my applications to use a local copy of it. That's what catalogs are for,
right ? Ok, but I don't want to install a catalog file, as this adds one
more file that will break the application if it is missing. Rather, I
would like to specify a catalog entry in an in-memory catalog at
runtime, which rewrites "http://myhost/DTD/1.0/mydtd.dtd"; as
"myapp://DTD/1.0/mydtd.dtd". The DTD (stored in the application binary)
will then be supplied by a custom input callback. 

How can I do this, or does this sound too weird ? 

To repeat, my goal is to (1) provide the DTD at the specified http URL,
and (2) being able to provide a local copy compiled in the application
binary when the above system id is specified, without having to use
external files.

Regards,

Daniel





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]