[oXygen-user] default attribute value

Roderik Dernison Roderik.Dernison at inl.nl
Thu Dec 6 08:13:23 CST 2012


Hi,

My colleagues want default attribute values for some tags.
I've tried:

<xs:element name="wordgroup" >
            <xs:annotation>
                  <xs:documentation>The actual words or sentence of an example.</xs:documentation>
            </xs:annotation>
            <xs:complexType>
                  <xs:complexContent>
                       <xs:extension base="wordgroup.class">
                       <!-- TODO -->
                       </xs:extension>
                  </xs:complexContent>
            </xs:complexType>
      </xs:element>

      <xs:complexType name="wordgroup.class" mixed="true">
            <xs:attributeGroup ref="wordgroup.attributes"/>
      </xs:complexType>

      <xs:attributeGroup name="wordgroup.attributes">
            <xs:attribute name="type" type="wordgroup-type-att.class" default="unspecified"/>
      </xs:attributeGroup>

      <xs:simpleType name="wordgroup-type-att.class">
            <xs:restriction base="xs:string">
                  <xs:enumeration value="unspecified" />
                  <xs:enumeration value="compoundpart" />
                  <xs:enumeration value="circumfix" />
                  <xs:enumeration value="infix" />
            </xs:restriction>
      </xs:simpleType>


But in this case, no value is set for the attribute "type".
How can I manage to set a default attribute value that is also shown in oXygen?

Kind regards,


Ing. Roderik Dernison
Programmeur/ontwikkelaar


INL * Schatkamer van de Nederlandse Taal
Matthias de Vrieshof 2 * Kamer 106a * 2311 BZ Leiden
Tel. +31 (0)71 527 2491 * www.inl.nl<http://www.inl.nl/>


________________________________

----------------------------------------------------------
Aan dit bericht kunnen geen rechten worden ontleend.
Het bericht is alleen bestemd voor de geadresseerde.
Indien het bericht niet voor u is bestemd, verzoeken wij
u dit aan ons te melden en het bericht te verwijderen.

This message shall not constitute any obligations.
This message is intended solely for the addressee.
If you have received this message in error, please
inform us and delete the message.
----------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20121206/68be0c58/attachment.html 


More information about the oXygen-user mailing list