[oXygen-user] default attribute value

Oxygen XML Editor Support support at oxygenxml.com
Fri Dec 7 09:13:19 CST 2012


Hello,

With your current schema the attribute "type" has the default value 
"unspecified". This default value appears in Oxygen in the Attributes 
view (Window > Show view > Attributes) when the caret is in the 
proximity of the "wordgroup" element. Note that the value of the 
attribute is grayed, meaning it's implied from the schema (not explicit 
in the XML).
Were you expecting the value to appear someplace else? Or did I 
misunderstand what you're looking for?

Regards,
Adrian

Adrian Buza
oXygen XML Editor and Author Support

Tel: +1-650-352-1250 ext.202
Fax: +40-251-461482
support at oxygenxml.com
http://www.oxygenxml.com


Roderik Dernison wrote:
>
> 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.
> ----------------------------------------------------------
> ------------------------------------------------------------------------
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>   




More information about the oXygen-user mailing list