I recognize that it is more a pure XML question than a Xalan one, but just in case someone has a good answer for me.
When looking at the XML Schema specification, if you declare an element with nillable="true", you cannot use the fixed attribute (which, I guess makes sense). I did not find anything related to nillable="true" and the usage of a default value. By using the Xalan sample programs, here is what I found by experimentation (more a Xerces test than a Xalan one, I suppose): if I have either a default or fixed attribute on my element declaration, as well as nillable="true", no errors are generated at the schema processing time, but when processing an XML document, if it contains an empty element instance with xsi:nil="true", then I get an error (Element [element name] with attribute xsi:nil=true must be empty). I understand the behavior when I have the fixed attribute (although an error at schema processing time will be better), but I am not sure I understand this behavior when I have the default attribute as the XML schema does not seem to say that it is not allowed. Any ideas? Did I miss something in the XML schema spec or is there a potential Xerces bug? Thomas
