Thanks everybody,

It's working. I think the fiddling with the combinations of the feats made
the difference.
Also I made that my program also stops on warning- and non-fatal-
SAXParseExceptions.
I did this in the ErrorHandler which I already made.

Cheers && thanks,

Peet Sneekes,
Mediamatic IP,
Amsterdam, NL

----- Original Message -----
From: "Scott Boag/CAM/Lotus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Wednesday, May 03, 2000 6:20 PM
Subject: Re: again just 2B sure (XML Validation)


>
> Peet, parser.setFeature("http://xml.org/sax/features/validation";, true);
> always worked for me.  You might try it with only that feature turned
on...
> sometimes I found the different features interact with each other, to a
> negative effect.
>
> -scott
>
>
>
>
>
>                     "Peet
>                     Sneekes"             To:     "Xalan Mailgroup"
<[email protected]>, "Xerces Mailgroup"
>                     <[EMAIL PROTECTED]        <[EMAIL PROTECTED]>
>                     tic.nl>              cc:     (bcc: Scott
Boag/CAM/Lotus)
>                                          Subject:     again just 2B sure
(XML Validation)
>                     05/03/2000
>                     09:28 AM
>                     Please
>                     respond to
>                     xerces-dev
>
>
>
>
>
> Hi, how do I get the DOMParser to validate my XML's realy strict.
> There seems no validation going on at all.
>
> Thanks in advance . . .
>
> Peet Sneekes,
> Mediamatic IP,
> Amsterdam, NL
>
> This is my Java:
> .....
>     parser.setFeature("http://xml.org/sax/features/validation";, true);
>     parser.setValidating(true);
>
> parser.setFeature("
> http://apache.org/xml/features/validation/warn-on-duplica
> te-attdef", true);
>
> parser.setFeature("
> http://apache.org/xml/features/validation/warn-on-undecla
> red-elemdef", true);
>     parser.setFeature("http://xml.org/sax/features/namespaces";, true);
>      }
>
> parser.setFeature("http://xml.org/sax/features/external-general-entities";,
> true);
>
> parser.setFeature("http://xml.org/sax/features/external-parameter-entities
> ",
> true);
>
> parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion
> ",
> false);
>
> parser.setProperty("
> http://apache.org/xml/properties/dom/document-class-name
> ","org.apache.xerces.dom.DocumentImpl");
>
> parser.setFeature("
> http://apache.org/xml/features/dom/create-entity-ref-node
> s", false);
> ......
>
> and this is the XML:
> <?xml version="1.0"?>
> <!DOCTYPE screen [
> <!ENTITY % screen-dtd SYSTEM "/resources/dtd/screen.dtd">
> %screen-dtd;
> ]>
> <screen site-component="jij" index="true" bgcolor="#ff9900"
> background="back-o.jpg">
>  <title>About you</title>
>  <settings>
>   <preload>
>
>
> Peet Sneekes,
> Mediamatic IP,
> Amsterdam, NL
>
>
>
>
>

Reply via email to