HTML generation

The acronyms HTML & XHTML are used throughout this guide as synonyms — which is technically not correct usage. This chapter explains the formal relationship between the two and describes some of the nuances of the XHTML produced by Xilize.

XHTML, HTML, and XML

Xilize produces XHTML in conformance with XHTML 1.0 The Extensible HyperText Markup Language, Second Edition which says

XHTML 1.0 ... is the first document type in the XHTML family. It is a reformulation of the three HTML 4 document types as applications of XML 1.0 .... It is intended to be used as a language for content that is both XML-conforming and, if some simple guidelines are followed, operates in HTML 4 conforming user agents. [Note: All modern browsers are "HTML 4 conforming user agents."] link

In short, XHTML 1.0 depends on HTML 4.01 and XML 1.0.

XHTML production

Much of Xilize markup is dedicated to making it as easy as possible to specify both an element and its attributes.

class attribute

Some CSS class names are used by Xilize in the generated HTML. See class attribute in the CSS chapter. In the two cases where there is potential for conflict with your explicit class name assignment — toc. & fnN. — Xilize simply adds its class name to the class attribute rather than replacing yours.

For example, footnotes are given the class name fn_text:

fn1. text of the footnote
<p class="fn_text" id="fn1">
<a class="fn_anchor" href="#fnmk1">1</a> text of the footnote</p>

If you provide an explicit class name, both your name and fn_text appear in the output:

fn1(myClass). text of the footnote
<p class="myClass fn_text" id="fn1">
<a class="fn_anchor" href="#fnmk1">1</a> text of the footnote</p>

id attribute in heading elements

To support table of contents and site map generation, Xilize creates an id attribute for every heading element (<h1>, <h2>, etc.) which does not already have an id assigned. That is, you may freely assign meaningful id's to heading elements which Xilize will use and preserve.

Because you are not guaranteed the generated id string will remain constant from one Xilize translation to the next, if you are going to link to a heading give it a meaningful id. Xilize will never modify it and will use your id in the any table of contents and/or sitemap which includes that heading.

For example, this document uses

"Xilize tables":basicMarkup.html#tables

to link to the "table" heading in basicMarkup.html. So in that file the heading is written

h2(#tables). tables

to assign the id tables to the h2 tag.

(Note: Since v2.0beta_35 the generated id's consist of the string xil_id followed by one or more digits: the first heading without an explicit id is assigned xil_id1, the next xil_id2, etc. So, for example, adding or deleting a heading will change the id attribute on any following that does not have an explicit id. In short, assign your own id's to those headings you link to.)

arbitrary tag attributes

Primarily to support JavaScript, Xilize provide markup for adding arbitrary attributes and their values to tags. For example:

p{{onmouseover="doSomething()"}}>. Text of the paragraph.
<p onmouseover="doSomething()">Text of the paragraph.</p>

Any text can be included between the double-curly-brackets. Xilize just adds it to the start tag without any evaluation.

customizing file prolog and epilog

See page assembly.

common reference links

A collection of useful links:

specifications XHTML 1.0, HTML 4.01, XML 1.0, CSS2, DOM
DTDs XHTML-1.0-Strict, XHTML-1.0-Strict
indices HTML elements, HTML attributes, CSS properties, CSS selectors,
tables HTML tables, CSS tables, Xilize tables
charts color, character
mozilla development center JavaScript, AJAX