Ich hab nen deutlich unsch�nen Workaround:

xmllint --valid --noout <Datei>

aber funktioniert.

Bj�rn


At 18:09 12.03.2003 +0100, you wrote:
Hi,

there's something about dtd validation, that's threatening to drive me
mad.
I'd really like to check, if the document i want to process is valid.
But the parser doesn't seem to care about validity. It only checks the
well-formedness.

Here's an excerpt from my code:

        my $parser = XML::Xerces::XercesDOMParser->new ();
        # Parseroptionen setzen

$parser- >setValidationScheme($XML::Xerces::XercesDOMParser::Val_Always);
        $parser->setLoadExternalDTD(1);
        $parser->setDoNamespaces(1);
        $parser->setDoSchema(0);
        $parser->setValidationConstraintFatal(1);
        $parser->setExitOnFirstFatalError(1);
        $parser->setCreateEntityReferenceNodes(1);
        $parser->setIncludeIgnorableWhitespace(0);
        $parser->setCreateCommentNodes(0);
        # ErrorHandler setzen
        my $error_handler = XML::Xerces::PerlErrorHandler->new ();
        $parser->setErrorHandler ($error_handler);

        eval {
                $parser->parse ($xmlfile);
        };
        XML::Xerces::error($@) if ($@);

The xml declaration of the doc contains standalone='no' and of course
there's a line pointing to the dtd. It's really strange.

Lucas
--
"The coroner? Ugh. I'm so sick of that guy."

-Dr. Nick Riveria


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


--

Bjoern Haje
mailto:[EMAIL PROTECTED]
ICQ: 158775500
PGP-KeyID: 0xB3A620BB
Fingerprint: CB9B 6447 E8EC 0BA7 A1A9 0EE3 B865 931F B3A6 20BB


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



Reply via email to