- From: Zafar Abbas <Zafar.Abbas@microsoft.com>
- Date: Tue, 10 Oct 2006 10:02:49 -0700
- To: <lists@jeffrafter.com>
- CC: Bryan Rasmussen <BRS@itst.dk>, Xan Gregg <xan.gregg@jmp.com>, <xmlschema-dev@w3.org>
Jeff, These are not validation errors, even though the message from the .NET1.1 validator says so, but that message has been fixed in .NET2.0 The validator is performing lax validation on the content as expected. During such validation, if schema information is not found for an item, only a validation WARNING is sent through the event handler. You should check the args passed to the event handler, the Severity should be set to 'XmlSeverityType.Warning'. The PSVI on such a node (available only in .NET2.0) also correctly reflects the Validity of NotKnown as opposed to Invalid. You should be checking the Severity of the validation event before marking the document invalid in this case. Thanks, Zafar Abbas -----Original Message----- From: Jeff Rafter [mailto:lists@jeffrafter.com] Sent: Tuesday, October 10, 2006 7:30 AM To: Zafar Abbas Cc: Bryan Rasmussen; Xan Gregg; xmlschema-dev@w3.org Subject: Re: SV: SV: Any wildcard and the .NET validator? Hi Zafar Abbas, I used 1.1.x and 2.0.x: System.Xml.XmlValidating Reader validation 1.1.x Validating example.xml Validation Error: Could not find schema information for the element 'http://www.w3.org/1999/xhtml:em'. An error occurred at file:///G:/example.xml, (22, 110). Validation Error: Could not find schema information for the element 'http://www.w3.org/1999/xhtml:br'. An error occurred at file:///G:/example.xml, (22, 141). Validation Error: Could not find schema information for the element 'http://www.w3.org/1999/xhtml:strong'. An error occurred at file:///G:/example.xml, (22, 156). Document is invalid -------------------------------- System.Xml.XmlReader schema validation 2.x Validating example.xml Validation Error: Could not find schema information for the element 'http://www.w3.org/1999/xhtml:em'. Validation Error: Could not find schema information for the element 'http://www.w3.org/1999/xhtml:br'. Validation Error: Could not find schema information for the element 'http://www.w3.org/1999/xhtml:strong'. Document is invalid I think the specific versions I am using are (v1.1.4322 and v2.0.50727). Also, I tried to see if it was the mixed="true" definition throwing it off. I created a new non-mixed example and removed that from the declaration and got the same errors. Thanks, Jeff Zafar Abbas wrote: > Bryan, > What error do you get when validating it through .NET? And which version > of the .NET framework are you using? > > Thanks, > Zafar Abbas > > -----Original Message----- > From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] > On Behalf Of Bryan Rasmussen > Sent: Monday, October 09, 2006 6:14 AM > To: Xan Gregg > Cc: lists@jeffrafter.com; xmlschema-dev@w3.org > Subject: SV: SV: SV: Any wildcard and the .NET validator? > > > Oops you're right, I didn't notice that mixed was set to true. In that > case I > would assume that All validators but .Net are correct in this instance. > > Cheers, > Bryan Rasmussen > > > > > -----Oprindelig meddelelse----- > Fra: Xan Gregg [mailto:xan.gregg@jmp.com] > Sendt: 9. oktober 2006 15:10 > Til: Bryan Rasmussen > Cc: lists@jeffrafter.com; xmlschema-dev@w3.org > Emne: Re: SV: SV: Any wildcard and the .NET validator? > > > I don't see what the confusion is. Text nodes are allowed because > DescriptionType has mixed=true, and xhtml element nodes are allowed > because of the <any> particle. The lax value only means that > unrecognized xhtml element nodes won't be assessed for validity, but > recognized xhtml element nodes will be assessed. Element nodes in > other namespaces (e.g., RDF) are disallowed outright. > > xan > > On Oct 9, 2006, at 6:50 AM, Bryan Rasmussen wrote: > >> Well I think no matter which is right the spec at this point is >> unclear >> (unless clarified at some other place in the spec in which case it >> is just >> convoluted) >> >>> -----Oprindelig meddelelse----- >>> Fra: Jeff Rafter >>> Til: xmlschema-dev@w3.org >>> Emne: Any wildcard and the .NET validator? >>> >>> Does anyone here have information on the .NET XML Schema validator >>> and >>> their position on lax validation of wildcards? >>> >>> i.e.: >>> >>> <complexType name="DescriptionType" mixed="true"> >>> <sequence> >>> <any minOccurs="0" maxOccurs="unbounded" >>> namespace="http://www.w3.org/1999/xhtml" >>> processContents="lax"/> >>> </sequence> >>> </complexType> >>> >>> <description xmlns:html="http://www.w3.org/1999/xhtml">Blah >>> Blah<html:em>blah</html:em>.<html:br/>Blah<html:strong>blah</ >>> html:strong> >>> blah!</description> > > > > >
Received on Tuesday, 10 October 2006 17:04:06 UTC