[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-p-dev
Subject:    [Eric Deutsch] RE: Xerces validation against xsd?
From:       jason () openinformatics ! com (Jason E !  Stewart)
Date:       2004-12-16 3:25:03
Message-ID: 876533djgg.fsf () openinformatics ! com
[Download RAW message or body]

X-From-Line: edeutsch@systemsbiology.org Thu Dec 16 08:32:59 2004
Return-path: <edeutsch@systemsbiology.org>
Envelope-to: jasons@localhost
Delivery-date: Thu, 16 Dec 2004 08:32:59 +0530
Received: from [127.0.0.1] (helo=localhost ident=jasons)
	by amadeus with esmtp (Exim 4.34)
	id 1Celuq-00065w-WA
	for jasons@localhost; Thu, 16 Dec 2004 08:32:59 +0530
X-Original-To: jason@openinformatics.com
Delivered-To: jason@skyhouseconsulting.com
Received: from openinformatics.com [69.55.227.180]
	by localhost with IMAP (fetchmail-6.2.5)
	for jasons@localhost (single-drop); Thu, 16 Dec 2004 08:32:56 +0530 (IST)
Received: from exchange.systemsbiology.net (pix39.systemsbiology.net
 [198.107.152.39])
	by mail.skyhouseconsulting.com (Postfix) with ESMTP id 7C7D7EAE1AF
	for <jason@openinformatics.com>; Wed, 15 Dec 2004 15:21:49 -0600 (CST)
X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0
content-class: urn:content-classes:message
Subject: RE: Xerces validation against xsd?
Date: Wed, 15 Dec 2004 13:21:48 -0800
Message-ID: <BFBA7186C5B3CB4C8EA0B509FA9090B378B9F0@exchange.systemsbiology.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Xerces validation against xsd?
Thread-Index: AcTh+cLCcN4J3+knQk6jdNzvC8jRFAA8Y46w
From: "Eric Deutsch" <edeutsch@systemsbiology.org>
To: "Jason E. Stewart" <jason@openinformatics.com>
Cc: "Eric Deutsch" <edeutsch@systemsbiology.org>
X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on 
	skyhouseconsulting.com
X-Spam-Level: 
X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham 
	version=2.64
Lines: 61
Xref: amadeus incoming:45766
MIME-Version: 1.0


Thanks, Jason, I finally figured out my problem.

It would appear that if you have in your XML document:

xsi:NoNamespaceSchemaLocation='pepXML_v9_1.xsd'

Instead of:

xsi:noNamespaceSchemaLocation='pepXML_v9_1.xsd'

Then the file is read without any validation but no other complaints.
Funny old things, computers.

Thanks,
Eric


> -----Original Message-----
> From: Jason E. Stewart [mailto:jason@openinformatics.com]
> Sent: Tuesday, December 14, 2004 8:24 AM
> To: Eric Deutsch
> Subject: Re: Xerces validation against xsd?
> 
> "Eric Deutsch" <edeutsch@systemsbiology.org> writes:
> 
> >> Yes, you need to set a number of parser options at once: validation
> >> off (no DTD), shema on, and namespaces on - it's that last one that
> >> usually get's people.
> >>
> >>   $parser->setValidationScheme ($validate);
> >>   $parser->setDoNamespaces ($namespace);
> >>   $parser->setDoSchema ($schema);
> >>
> >> where each takes a boolean on/off value. Check the t/ directory,
there
> >> is a schema example in there, but it's minimal.
> >
> > Hmm, thanks, that doesn't do it either. That only succeeds in
turning
> > off all validation. Maybe my Xerces is too old and this works on
newer
> > ones.
> 
> Nah. If you can make the setDoSchema() call, you get get schema
> validation working. You have to make sure that setValidationScheme()
> is off, and that namespaces and schema are on.
> 
> I used the samples/personal-schema.xml and I broke the personal.xsd
> schema and got a fatal error and I broke personal-schema.xml and also
> got a fatal error so it is correctly validating with the schema.
> 
>   perl ./samples/DOMCount.pl -v=never -n -s
./samples/personal-schema.xml
> 
> Let me know if you have some examples and I'll try them out.
> 
> Cheers,
> jas.



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic