At 3:22 PM -0700 10/17/01, Kamiya, Taki wrote: >My only concern is if we change the default behaviour for elements, >that of attributes also probably needs to be changed for better >consistency. >
No, it does not need to be. XML 1.0 is quite clear that elements and attributes are not the same thing and are not consistent. The W3C XML Schema Language tries to make them the same, and that's responsible for a lot of confusion in and about schemas. Xerces should not walk down the same errant path. According to XML 1.0, a parser normalizes attribute values that do not have type CDATA. Xerces does this and is correct. Also according to XML 1.0, a parser does not normalize element content. If Xerces is doing this, then this is a bug that needs to be fixed. I'm not 100% sure of this, but looking through the schema spec I don't see anything that changes any of this. The whiteSpace facet can be used to define a normalized value for an element. However, that's only for purposes of validation. The unnormalized value should still be reported by the parser. -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | [EMAIL PROTECTED] | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible, 2nd Edition (Hungry Minds, 2001) | | http://www.ibiblio.org/xml/books/bible2/ | | http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/ | +----------------------------------+---------------------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
