[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANN: XML Schema: DOs and DON'Ts
- From: Kohsuke KAWAGUCHI <kohsukekawaguchi@yahoo.com>
- To: Eddie Robertsson <eddie@allette.com.au>, xml-dev@lists.xml.org
- Date: Thu, 17 May 2001 08:58:32 -0700
Thank you for your comments.
> You make a good point in your
> article but at the same time Martin gave another example of how he (and
> probably others) use it so I wouldn't call your way "the correct way" of
> using namespaces.
Well, I'd appreciate if anyone would tell me why such an usage is
justifiable. But probably it should be a separate issue.
> but I believe the
> following is a valid schema with a valid restriction that conforms to the
> above specification:
I understand that you can't believe what I said. But the fact is, the
spec explicitly prohibits this. If you have some time and plenty
of patience, see the spec:
http://www.w3.org/TR/xmlschema-1/#rcase-Recurse
> I tried validating this with XSV and it seems to be valid.
That's simply because XSV doesn't implement the check.
And that's exactly why I said we should avoid complex types. Because
nobody think that your example is invalid. Even your validator gives you
the result that you want.
But if I have a truly conforming processor, then it should reject your
schema. Don't you think it's a problem?
> In your including schema you also say that the
> default namespace is "http://best.practice.com" which means the
> unqualified declarations in your included schema will use this default
> namespace.
I agree that your interpretation is natural and consistent by itself.
But to my surprise, I believe that natural interpretation is not what the
spec says.
QName resolution rule, which is defined in the section 3.15.3, does not
mention anything about chameleon capability. It says the resolution
doesn't be affected by who includes the chameleon schema.
But honestly I can't believe what I found. Is there anyone who can point
to the specific section of the spec, and tell me that I'm wrong with
this?
regards,
----------------------
K.Kawaguchi
E-Mail: kohsukekawaguchi@yahoo.com