comp.text.xml
[Top] [All Lists]

schema validation gotcha

Subject: schema validation gotcha
From: franco
Date: Wed, 16 Jul 2008 09:16:15 -0700 PDT
Newsgroups: comp.text.xml

I'll work up an example soon, but in the mean time let me describe my
problem.

I have a schema with a type that contains <xs:any namespace="##any"
processContents="lax"/>  <bucket/>.

In an instance document I have an element inside a <bucket/>:
<xxx:thing xsi:type='foo'/>. The namespace  prefix xxx is declared to
a namespace but there is no schema supplied during validation for it.

with processContents set to lax the validator should attempt to
validate <xxx:thing xsi:type='foo'/> if definitions are available.
since they are not it should skip it.

But since xsi:type='foo' implies there is a type named foo, the
validator tries to find a type named 'foo' and fails because there is
no schema available and type foo cannot be resolved.

Is this the proper behavior of a validator in this case? is the
presence of xsi:type enough to make processContents="lax" to attempt
validation?

thanks in advance,

-franco


<Prev in Thread] Current Thread [Next in Thread>
  • schema validation gotcha, franco <=
Privacy Policy