You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Eric Ye <er...@locus.apache.org> on 2000/08/29 00:10:28 UTC
Re: xerces-j-dev@xml.apache.org
1. Regarding the mailing list, make sure you post the message from the same email address as the one used to subscribe.
2. Right now, when the parser read and compile the Schema, validation is turned off on purpose, because until we get all the Schema features implemented, we can't use the Schema for Schema to validate. In addition, there are a few errors in the Schema for Schema itself. This would explain a lot of things you came across. Eventually the validation will be turn on when the parser reads in the Schema.
3. Regarding xsd prefix for attributes, e.g. "minOccurs", these attributes are declared as locally scoped attributes with no prefix(or namespace) in Schema for Schema, that is why you shouldn't use xsd prefix for them.
_____
Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org
----- Original Message -----
From: Finkbeiner, Dave
To: 'ericye@locus.apache.org'
Sent: Friday, August 25, 2000 8:52 AM
Subject: xerces-j-dev@xml.apache.org
I'm sorry if you're not the right person, but I don't know who to send this to; if you could forward it to the right person, I'd appreciate it. I'm subscribed to xerces-j-dev@xml.apache.org and I get the 15 or so emails per day. But when I try to post to that address, nothing ever happens - no error, bounceback, and no posting. Any ideas? Here was what I was trying to post:
Subject: How to catch typos in schema declarations.
1) When defining a schema, one makes use of the Schema of Schema attributes & elements. Consider the following declaration (inside of some type's definition):
<element name="person" type="PersonType" minOccurs="2" maxOccurs="2">
I would like to avoid the possibility of mistyping the attributes "minOccurs", "maxOccurs", etc. but I don't see any way to. I can have:
<element name="person" type="PersonType" MiNoCCur="2" maxOccurs="2">
and the validator will just quietly "ignore" my MiNoCCur attribute without telling me it didn't recognize the attribute MiNoCCur; any instance documents that have only 1 person element (rather than the intended 2) will get reported as valid.
I tried forcing everything to have prefixed namespaces in my schma by:
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
but that only applies to schema of schema elements, not their attributes (like name, type, minOccurs, etc.).
Any ideas?
2) I think I also found 2 bugs:
a) it seems Xerces-J ignores the xsd prefix requirement: if the schema of schemas namespace is declared with a prefix (like xsd), I can use the prefix or not (e.g. <element or <xsd:element will work), it won't give me errors (but it still interprets element as what it should be (enforcing it in the instance documents, etc.), not as some unknown and useless addition to my default namespace).
b) if I make the schema of schemas my default namespace and I have a child of the schema node (global definition) as:
<anyOldThing name="Joe" sisters="none" />
I would expect an error saying that anyOldThing must be defined before I can use it, but I get no error. Does it just add it to the Schema of schemas target namespace where it sits useless??
**********************************************************************
David Finkbeiner 703-558-0036(w) Email: David_Finkbeiner@sparta.com