My “Capability” schema contains an optional “parent_id” attribute of type xs:IDREF
When creating a CapabilityDocument the following is always initialy true
<xapp:if select=“/Capability/@parent_id” condition=“exist”>
unless @parent_id is explicitly removed by
<xapp:elementaction form=“form_create” select=“/Capability/@parent_id” type=“remove”> command
Eventhough /Capability/@parent_id is declared as an optional attribute in my “Capability” schema, it still shows up as an existing attribute in the newly created CapabilityDocument.
This is behaviour that dose not make sense. I would think if you define an attribute to be optional, that would mean that you explicitly haveto add that attribute or element as a matter of fact to the document that you are creating.
As a side note, when running the “Capability” schema through the X-Application generator, it completely ignores attributes at the root node be they optional or required. This only occurs with the root node of the schema. Child nodes containing attributes are picked up by the X-Application generator and included on the jsp pages that are generated.
I have attached the Capability schema to this post.
–joeycz
X-Application Version: 4.1.1
Tamino Version : 4.1.1
Platform : Win2k
WebContainer : Tomcat 4.1.18
JDK Version : 1.4.1
Capability.tsd (61.9 KB)
#webMethods#Tamino#API-Management