Documentation
Elements
- <a>
- <aside>
- <assessment>
- <author>
- <backcover>
- <blockquote>
- <body>
- <bodymatter>
- <caption>
- <code>
- <cover>
- <dd>
- <dl>
- <document>
- <dt>
- <em>
- <figure>
- <figureGroup>
- <frame>
- <frontcover>
- <frontmatter>
- <hd>
- <img>
- <input>
- <jacketcopy>
- <legend>
- <li>
- <line>
- <linegroup>
- <list>
- <meta>
- <metadata>
- <note>
- <noteRef>
- <number>
- <p>
- <page>
- <poem>
- <pullquote>
- <rearmatter>
- <section>
- <source>
- <span>
- <sub>
- <subtitle>
- <sup>
- <table>
- <tbody>
- <td>
- <tfoot>
- <th>
- <thead>
- <title>
- <tr>
Global attributes
The MONET-XML framework includes a set of standardized attributes that can be applied to all elements to maintain consistency and flexibility in document formatting. This guide explains the available attributes, their possible values, and how to use them within your XML documents.
Standard Attributes
The following attributes are part of the monetDefaultAttributes group and can be applied to any element in the framework.
id Attribute
- Type:
xs:ID - Usage: Optional
- Description: Assigns a unique identifier to an element. This is useful for referencing elements within the document.
Example:
<p id="para1">This is a sample paragraph.</p>
textAlign Attribute
- Type:
textAlign - Default Value:
left - Possible Values:
leftrightcenterjustify
- Usage: Controls the alignment of text within an element.
Example:
<p textAlign="center">Centered text.</p>
textDir Attribute
- Type:
textDir - Default Value:
ltr - Possible Values:
ltr(Left-to-right)rtl(Right-to-left)
- Usage: Specifies the text direction, which is especially useful for multilingual content.
Example:
<p textDir="rtl">مرحبا بكم</p>
fontStyles Attribute
- Type:
fontStyle - Possible Values:
boldunderlineitalicstrikeThrough
- Usage: Allows multiple font styles to be applied by specifying a space-separated list of styles.
Example:
<p fontStyles="bold italic">Bold and Italic Text</p>
fontTypes Attribute
- Type:
fontType - Possible Values:
serifsansSerifhandWritingmonoSpacedisplay
- Usage: Specifies the font category for text rendering.
Example:
<p fontTypes="sansSerif">Sans-serif font example.</p>
xml:lang Attribute
- Type:
xml:lang - Usage: Required on
documentelement, optional on other elements. - Description: Specifies the language of the content within an element, using standard language codes.
Example:
<p xml:lang="fr">Ceci est un texte en français.</p>
Best Practices
- Always use the
idattribute if an element needs to be referenced elsewhere in the document. - Use
textAlignandtextDirfor proper text formatting, especially for multilingual content. - Combine
fontStylesas needed for styling emphasis but avoid excessive formatting for readability. - Specify
fontTypeswhen a specific font appearance is required. Only use this attribute when instructed. - Always use
xml:langfor accessibility and proper language support.
By following these guidelines, you can ensure consistency and clarity in your XML documents within the Monet framework.