Sandy has already responded to the list addressing the main issue of canonical representations, but I thought I'd come back to my previous post to clarify some things.
Peter McCracken/Toronto/[EMAIL PROTECTED] wrote on 01/04/2006 01:10:22 PM: > For an instance document, the > canonical representation is used *only* if there is a "fixed" value > constraint [1] (Suppose the fixed value of an element is "0.00" and the > instance document specifies "0". It makes sense to convert them both to a > canonical representation "0.0" before comparing them for equality). > [1] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cvc-elt (see > clause 5.2.2) It seems I was wrong on this point. The canonical representation of the value in the instance document is not used to compare against the fixed value constraint. I took the wrong interpretation of clause 5.2.2.2.2 in the above reference [1] -- the true interpretation is that the actual values are compared, not the lexical representations. > When parsing a schema, I'm not sure why the Schema spec requires that the > canonical value of default value constraints are valid. The reason for this is because the schema component model for element (and attribute) declarations only keeps around the *actual* value in the {value constraint} property, and not the original lexical value that was used in the schema document [2]. (It's also possible that a schema component model was created in some way other than by reading a schema document, in which case there wouldn't be an original lexical value). So, although it would make more sense to compare the original lexical value against the pattern, the next best choice is to compare the canonical representation of the actual value. [2] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#Element_Declaration_details Cheers, -- Peter McCracken XML Parser Development IBM Toronto Lab Phone: 905-413-5201 T/L 969-5201 Email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
