Joseph Kesselman <[EMAIL PROTECTED]> wrote on 11/24/2004 12:05:27 PM:
> Re why #12; can't be converted back to ^L (formfeed): Unfortunately, the > XML spec says that numeric character escapes are treated the same as their > corresponding characters; if it isn't a legal XML 1.0 character, expressing > it as a numeric is not a workaround. That's not a parser issue, it's an XML > spec issue. > > The fact that the serializer (not the DOM) is converting the illegal > character on output is one of those "What would you prefer" kinds of > questions. Fine-grained checking for all the illegal characters would > impose some performance overhead to guard against a situation you shouldn't > be provoking in the first place, and it isn't clear what should happen if > one is found. (Throw an exception? Call an error handler? Call a > user-provided bad-character handler which might then throw an exception?) It should be noted that DOM Level 3's LSSerializer can be configured to perform well-formedness checking during serialization. I believe this is enabled by default. If the DOM contains characters that are not legal in XML this will be reported to an error handler. With DOM Level 3 you can also check well-formedness of the DOM in memory so an application could detect the presence of illegal characters and then make some decision as to what to do about it. > ______________________________________ > Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more. > "The world changed profoundly and unpredictably the day Tim Berners Lee > got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]