[
Lists Home |
Date Index |
Thread Index
]
Kevin Jones wrote:
> I have a small list of constraints that need to be added
> which are not implicitly guaranteed by this encoding. Just
> wondering if anybody can think of any others I should be
> looking at that would not typically be for free as part of
> this type of binary encoding.
It's hard to suggest because we don't know what is guaranteed by the
encoding. However, another thing that jumps out is the test for legal
characters: e.g. no unmatched surrogate pairs and no C0 controls except
the three allowed ones (\r, \n, and \t). And of course there are also
namespace constraints.
Finally, I would not assume that the encoding guarantees everything
unless you check that the document is correctly encoded. The parser
should assume that any and all bits might have been randomly or
non-randomly flipped, and should detect any problems that result. That
is, do not assume that the document was created by a conforming encoder.
This is similar to how the Java virtual machine verifies byte codes and
notices problems that occur even if certain byte code sequences could
not have been created by javac.
--
Elliotte Rusty Harold elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
|