Hi Bob,
I'm not certain you're quite right in your response to Paul's second question. From 3.3.1 of the Schema PR: {value constraint} establishes a default or fixed value for an element. If default is specified, and if the element being ?validated is empty, then the canonical form of the supplied constraint value becomes the [schema normalized value] of the ?validated element in the post-schema-validation infoset. If fixed is specified, then the element's content must either be empty, in which case fixed behaves as default, or its value must match the supplied constraint value. To my mind, this implies that if an element isn't there it's default value doesn't get used; if it is present and is empty, then its default value *is* used. What do you think? Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 416-448-3519, T/L 778-3519 E-mail: [EMAIL PROTECTED] Bob Schloss/Watson/[EMAIL PROTECTED] on 04/11/2001 06:47:07 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: default values for elements Paul Jakubik asked questions about xml schema. Presumably, FAQs and tutorials about the Schema language will be appearing over the next month. There is a promise that the FAQ located at http://www.chronocell.com/faq/xml-schema.html is going to get a significant update next week. If your question is not answered by a FAQ, the best place to get those questions answered is by posting to the following list: [EMAIL PROTECTED] For questions of the form: One part of one schema spec says A, but another part of another schema spec doesn't mention A or says something contractory, those questions should be posted to: [EMAIL PROTECTED] I will express my own opinion on some of your questions. Paul Jakubik asked: > 2) When exactly is the default value used? Is it > only when the element does not appear at all? Yes. > Is it also > used when the element appears, but is empty? No. > 3) What is considered an empty element? Are any of > the following Foo elements empty? > <Foo/> Yes - this is empty. > <Foo></Foo> Yes - this is empty. > <Foo> </Foo> No - this is not empty. Bob Schloss IBM T. J. Watson Research Center Yorktown Heights, New York, USA --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]