Jan,
Thank you for contributing!
The main reason why there is no official schema is that we want to
have the URL that this is published at actually respond and return
the definition, so for it to be active and useful, not just a
unique id. This is subject to some discussion as to what the
appropriate way to host this would be in a goverment context.
Also, there are many
types of card, and we're not sure if the best course of action
would be to attempt to capture their differences, formally (a
pretty complex XSD), or keep it simple and advise everyone to
account for the differences in their code (as below). The
eid/card/documenttype may well become the key to those
differences, and may have to move to become eid/documenttype, or
be replicated there for backward compatibilty. Hence the delay.
That being said, about your XSD:
I wouldn't interpret nationalnumber, dateofbirth, cardnumber,
validitydatebegin, validitydateend and zip as numbers:
They're formatted strings, and some may have leading zeroes.
For example, for someone born between 2000 and 2009,
nationalnumber will have one or 2 leading zeroes. Date of birth
may contain just a year (when dob is unknown - this is rendered as
YYYY0101 for now but that may change).. Chip en Card-numbers may
change length and suddenly become too long for the chosen binary
format, and e.g. Card numbers may contain letters (one type starts
with "B"). I would say none of the elements can safely be
interpreted as numeric. Perhaps zip code, but that is so short as
to present very little to gain, *and* who knows what the postal
services will do in the future.
Please interpret them all as xs:string for XML purposes.
Then, I would not use xs:sequence since that implies order, and
there is no guarantee of element ordering. While this happens to
be stable using the currently used technologies, this is by no
means certain in the future, please don't count on it.
As for presence: Please take a look at the annotations in the
classes at:
http://code.google.com/p/eid-viewer/source/browse/trunk/eid-viewer-lib/src/main/java/be/fedict/eidviewer/lib/file/
Version4XMLFile*
Notice the optional fields. We're thinking about making
"firstname" optional as well, as some people turn out not to have
one (!), and it's cleaner not to have the field than to make it
empty, IMHO.
Not all 5 certificates are present on all cards. For example, some
have no signing cert, some have no signing and no auth cert, we've
tested with such cards, and other combinations may occur in the
future.
So: Interpret as string, don't count on order, don't count on
presence (see sources)
I would say: If you can, don't formally validate the XML for now,
parse and then see which elements you have, and keep an eye on
this list, we'll announce the formal XSD with it's there, and your
work helps, thanks!
If you
have to formally validate the XML now, please take
my comments above into account.. We'll
try to not break
the XSD taken from yours + my remarks, but
we cannot guarantee
that.
WKR,
-f