Insert Attribute with value automatically
Posted: Wed Dec 14, 2022 2:05 pm
Hello,
We use the oxygen sdk in version 25.0.0.0.
We want to automate the insertion of an attribute with a default value each time an element is inserted.
To do that, we use the cc_common.xml
Here what we have tried :
Here is the xsd
The attribute eoTopicType is well added but the value is empty.
Did we miss something with elementProposals definition ?
Thanks,
Regards,
Isabelle
We use the oxygen sdk in version 25.0.0.0.
We want to automate the insertion of an attribute with a default value each time an element is inserted.
To do that, we use the cc_common.xml
Here what we have tried :
Code: Select all
<elementProposals path="eoTopic">
<insertAttribute name="eoTopicType" value="eott04"/>
</elementProposals>
Code: Select all
<xs:element name="eoTopic" type="eoTopicElemType"/>
<xs:complexType name="eoTopicElemType">
<xs:element ref="eoTopicContent"/>
<xs:attribute ref="eoTopicType" use="required"/>
<xs:attribute ref="id"/>
</xs:complexType>
<xs:attribute name="eoTopicType" type="eoTopicTypeAttType"/>
<xs:simpleType name="eoTopicTypeAttType">
<xs:restriction base="xs:string">
<xs:enumeration value="eott01"/>
<xs:enumeration value="eott02"/>
<xs:enumeration value="eott03"/>
<xs:enumeration value="eott04"/>
<xs:enumeration value="eott05"/>
<xs:enumeration value="eott06"/>
<xs:enumeration value="eott07"/>
<xs:enumeration value="eott08"/>
<xs:enumeration value="eott09"/>
<xs:enumeration value="eott10"/>
</xs:restriction>
</xs:simpleType>
Did we miss something with elementProposals definition ?
Thanks,
Regards,
Isabelle