Is there a list of features which the java codebase supports which the c
codebase does not??
Kiran

-----Original Message-----
From: Mike Pogue [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2000 2:42 PM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: again just 2B sure (XML Validation)


And, this message from the Xerces-J mailing list should also help you
(please move there!):

=============================================
Andy Quick wrote:
> Code snippet used to parse
>         org.apache.xerces.parsers.DOMParser parser = new
> org.apache.xerces.parsers.DOMParser();
> 
>         parser.setFeature( "http://xml.org/sax/features/validation";,
true);
>         parser.parse(in); // in is an InputSource for the XML document

As always, unless you register an ErrorHandler, you will not be
notified of errors in the parser even if validation is turned on.

-- 
Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]

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

Scott Boag/CAM/Lotus wrote:
> 
> 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