There seems to be no way within the API to determine if the 'ref' attribute exists on an <attribute> element information item. This is important, because the value constraints are absent on the Attribute Declaration Schema Component when the 'ref' attribute is absent (they must come from the Attribute Use Schema Component). Actually, I guess the problem is really that when the 'ref' attribute exists, there are two sets of value constraints, one from the Attribute Use Schema Component and one from the global Attribute Declaration Schema Component (for the referenced attribute). Are these the same value constraints, and if so why are they duplicated? My confusion stems from section 3.2.2 of XML Schema Part 1.

On a somewhat related note, how do you determine if the value of the 'use' attribute is 'optional' vs. 'prohibited'? There is the "getRequired()" method on XSAttributeUse, but that method returns false if either the use attribute is absent or it's value is not 'required'. As such, there is no way using the interface API definitions to distinguish between the values of 'optional' and 'prohibited'. Of course, since the fUse member of XSAttributeUseImpl is public, I can look at it, but I'd rather have a way through one of the public methods of XSAttributeUse.

Thanks - Mark Brucks



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to