- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 16 Jan 2003 09:13:33 +0000
- To: Goldner Zvi <Zvi_Goldner@icomverse.com>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Sorry for delayed reply. Goldner Zvi <Zvi_Goldner@icomverse.com> writes: > I am using MSV in order to validate XMLs, but I am facing a problem with the > lax processing. > It seems like the lax is working fine with undeclared elements (it does not > validates elements which are not specified in the XSD), but it throws > validation error on undeclared elements, which contain attributes. This kind > of behavior does not happen in other validation tools (such as "XmlSpy" has, > for instance). > > The XSD looks like: > <xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema > <http://www.w3.org/2001/XMLSchema> " elementFormDefault="unqualified" > attributeFormDefault="unqualified"> > > <xs:element name="Root"> > <xs:complexType> > <xs:sequence maxOccurs="unbounded"> > <xs:any processContents="lax" > maxOccurs="unbounded"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:element name="InnerElement" type="xs:boolean"/> > </xs:schema> > The XML looks like: > <Root xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance > <http://www.w3.org/2001/XMLSchema-instance> " > xsi:noNamespaceSchemaLocation="C:\temp\lax.xsd"> > <InnerElement>true</InnerElement> > <UnDefineElement attr1="1"/> > </Root> > The error tells about "unexpected attribute 'attr1'". > Is it a bug? I believe this is a bug -- it validates as correct in XSV, with the following extra information if you enable warnings: allowing {None}:InnerElement because it matched wildcard(##any), validating it against boolean allowing {None}:UnDefineElement because it matched wildcard(##any), validating it laxly ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2002, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Thursday, 16 January 2003 04:13:29 UTC