Project

Profile

Help

Bug #3711

Updated by Michael Kay over 5 years ago

In an SCM file representing the exported form of a compiled XSD schema, the information that is retained for value constraints (that is, "fixed" and "default" values of elements or attributes) does not match what the XSD 1.1 specification mandates for the {value constraint} property records. 


 


 Specifically, XSD 1.1 says that the schema component model should include both the "actual value" and the "lexical form". 


 


 Saxon's SCM file includes the lexical form (only) in the case of the default value, and the "actual value" (only) in the case of a fixed value. (The actual value, of course, has to be serialized in the XML representation of the SCM; but the point is that we are serializing it by converting the actual value back to a string, not by retaining the original lexical form.) 


 


 This applies to the ElementDecl, AttributeDecl, and AttributeUse components. 


 


 The practical consequence is that, in the case of the fixed value, the lexical form cannot be reconstituted, which means it is difficult for a schema validator to ensure that the value is consistent with facets that operate on the lexical form, such as the pattern facet. 
 

Back