[XML-SIG] Please resolve external parameter entity
Wed, 02 Feb 2000 09:12:21 -0800
At 03:33 PM 2/1/00 -0800, Steven Work wrote:
>I find myself logging (accumulating) information in XML-derived
>formats pretty frequently these days. The only way I know to do this
>in a strictly append-only and atomic way is this:
This exact problem has been discussed a few times on xml-dev.
The way to break out of it is to look at each log entry as
a separate document, rather than try to make the entire log
To separate the documents in the log, use a character not allowed
in XML. Formfeed is a fine choice, since it even means "next page"
which is pretty close to the semantics wanted. Using a character
that doesn't appear in XML means that even if a partial write
is made to the file, the log can be re-sync'ed at the beginning
of the next log entry. So the penalty for non-atomic writes is
lessened (from "partial write wrecks the whole file" to "partial
write wrecks one entry").
So an entry looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log SYSTEM "log.dtd">
But the xml declaration and doctype are optional, so the
space-conscious logger can do this:
Or even lose the ignorable whitespace and put it all on one line.
Walter R. Underwood
Senior Staff Engineer
GO Network, part of The Walt Disney Company
http://software.infoseek.com/cce/ (my product)