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]



Reply via email to