[
Lists Home |
Date Index |
Thread Index
]
At 6:20 PM -0400 4/19/04, Alessandro Triglia wrote:
>If you expect an attribute "age", will you accept an attribute "Age"
>instead?
>
>If you expect an attribute "age", will you accept a child element <age>
>instead?
>
>If you expect an attribute "abc:age", will you accept an attribute "age"
>(unqualified) instead?
>
>If you expect two child elements <a> and <b>, will you accept a <c> in
>between? What if you have a <d> before the <a> but the mandatory element
><b> is missing altogether? Will you accept and know how to handle this
>situation?
>
>Will you accept a namespace name "abcde" when a schema specifies the
>namespace name "abcdef", or "abcdef/", or "ABCDE"?
>
>Are you saying that it has become a common idioma in application development
>to expect and accept one or more of the above? I cannot believe you really
>mean that.
I won't speak for Stephen, but depending on external context, I might
accept any or all of those. The first task for a robust system is to
see what you've got and match it up against what you expect. If it
doesn't match, then toss it off to a human, and have them look at it.
If it's obvious what was intended, then add the necessary chunk to
your processing software to handle the modified format. I'm not sure
what to call this idiom--Extreme Input?--but it works. The first
couple of weeks you try it, you're going to be writing a lot of
custom code, but it tends to rapidly settle into a steady state with
new formats encountered only very occasionally.
--
Elliotte Rusty Harold
elharo@metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
|