On 24.07.01 at 23:32, Jason E. Stewart <[EMAIL PROTECTED]> wrote:
>My appologies for the terse answer to your useful question, but I'm at
>the OpenSource conference at the moment...
Let us know how the Craig Mundie "duel" turns out... :-)
>Instead of nsgmls I most frequently use either the SAXCount or DOMCount
>applications that come with Xerces to do the same thing. Xerces.pm
>includes versions of these that are both schema and namespace aware (in
>the samples/ dir). You could modify these examples to better suit your
>needs, and I'd be happy to help.
I've looked at these samples, and they're way too simplistic for my needs.
In particular, they don't even attempt to trap errors and the output format
doesn't lend itself to parsing. What I'm getting from nsgmls is:
nsgmls:<OSFD>0:1:0:E: no DOCTYPE declaration
This tells me the source of the error (nsgmls), the file containing the
error ("<OSFD>0" (file descriptor 0, aka. STDIN), the line number in that
"file" (1), the column number (0), and the error message. I need the file
containing the error to report whether the error occurred in an external
subset (usually resolved via a DOCTYPE and a catalog in this application),
the line and column numbers, and the message for reporting to the user.
The normal input for this application is well-formed, but invalid, XML. Not
well-formed XML is also a distinct, and common, possibility. The DOM is not
really interesting. The structure isn't all that interesting. The main
concern is identifying the errors; everything else is icing on the cake.
SAXCount and DOMCount report human readable -- i.e. not machine parseable!
-- errors, and focus more on document structure then reporting, and
facilitating fixing, errors.
Don't get me wrong, Xerces is by all accounts, and as far as I can tell,
great! It's just that it doesn't come prepared to do what I want it to;
unsurprisingly because I want to do pretty strange things with it. :-)
If anyone is willing to hold my hand, I'll give it a go making it work, but
given the state of the docs and my lack of C++ skills, I'm worried this
will be out of my league. OTOH, I'd think an nsgmls-alike sample would be
good both for giving people the util they need out of the box as well as a
good example to get people started doing more advanced things.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]