docbook:varname

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
annotations optional
arch optional
audience optional
condition optional
conformance optional
dir restriction of xs:token optional
linkend xs:IDREF optional
os optional
remap optional
revision optional
revisionflag restriction of xs:token optional
role optional
security optional
userlevel optional
vendor optional
version optional
wordsize optional
xlink:actuate xlink:actuateType optional
xlink:arcrole xlink:arcroleType optional
xlink:href xlink:hrefType optional
xlink:role xlink:roleType optional
xlink:show xlink:showType optional
xlink:title xlink:titleAttrType optional
xlink:type xlink:typeType optional
xml:base xs:anyURI optional
See http://www.w3.org/TR/xmlbase/ for
information about this attribute.
xml:id xs:ID optional
See http://www.w3.org/TR/xml-id/ for
information about this attribute.
xml:lang union of(xs:language, restriction of xs:string) optional
Attempting to install the relevant ISO 2- and 3-letter
         codes as the enumerated possible values is probably never
         going to be a realistic possibility.  See
         RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
         at http://www.iana.org/assignments/lang-tag-apps.htm for
         further information.

         The union allows for the 'un-declaration' of xml:lang with
         the empty string.
xreflabel optional

Used By

Source

<xs:element name="varname">
  <xs:complexType mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="docbook:inlinemediaobject"/>
      <xs:element ref="docbook:remark"/>
      <xs:element ref="docbook:superscript"/>
      <xs:element ref="docbook:subscript"/>
      <xs:element ref="docbook:xref"/>
      <xs:element ref="docbook:link"/>
      <xs:element ref="docbook:olink"/>
      <xs:element ref="docbook:anchor"/>
      <xs:element ref="docbook:biblioref"/>
      <xs:element ref="docbook:alt"/>
      <xs:element ref="docbook:annotation"/>
      <xs:element ref="docbook:indexterm"/>
      <xs:element ref="docbook:phrase"/>
      <xs:element ref="docbook:replaceable"/>
    </xs:choice>
    <xs:attribute name="role"/>
    <xs:attributeGroup ref="docbook:db.common.attributes"/>
    <xs:attributeGroup ref="docbook:db.common.linking.attributes"/>
  </xs:complexType>
</xs:element>

Sample

< para xmlns = "http://docbook.org/ns/docbook" >

An important design characteristic of the schema is that duplication is minimized. This is done through the use of named patterns for common groupings that can be re-used. For example, the

< tag>

imagedata

</ tag>

and

< tag>

videodata

</ tag>

elements each have an

< tag class = "attribute" >

align

</ tag>

attribute that takes the same set of enumerated values. Rather than repeating those values, a single pattern,

< varname>

db.halign.enumeration

</ varname>

is referenced by the

< varname>

db.videodata.align.enumeration

</ varname>

and

< varname>

db.imagedata.align.enumeration

</ varname>

patterns, which are in turn referenced by the

< varname>

db.videodata.align.attribute

</ varname>

and

< varname>

db.imagedata.align.attribute

</ varname>

patterns. While this may seem like overkill, it allows a customizer to modify the allowed enumerations for these two attributes separately or together, or to completely re-define the allowed content of either or both, by redefining one or more of these named patterns.

</ para>