XSL docbook2html transforms the docbook into HTML. The docbook format is the format stored by CMS, so all rich texts are covered. Note that docbook2htmleditor.xsl is very similar to docbook2html.xsl. It is not always overloaded when docbook2html.xsl is extended since this second XSL allows rendering in the rich editor of CMS only.

Overload docbook2html.xsl allows you to modify certain behaviors. This XSL can be found in cms/skins/[skinName]/stylesheets/io. It can be used, for example, to change the level of titles or open a link in a new tab when a particular style is applied. It is also possible to perform more advanced behaviors, such as adding an action each time a form is validated. For the latter, programming skills are required.

Because the kernel calls this XSL , it is sometimes necessary to prioritize all docbook elements to be overloaded.

<xsl:template match="docbook:link" priority="10">
	<!-- Surcharge -->
</xsl:template>
What's more, if you don't want to change everything, remember to import the default XSL that you want to extend, by adding this to your header:
<xsl:import href="plugin:web://stylesheets/io/docbook2html.xsl"/>

Overload elements

Default

The following basic elements can be overloaded in CMS:

  • Paragraphs
    • docbook:article (Root tag)
    • docbook:section (Tag by title level)
    • docbook:para (Paragraph)
    • docbook:phrase[@role='linebreak'] (Line break)
  • Texts
    • docbook:subscript (Hint)
    • docbook:supscript (Exhibitor)
    • docbook:emphasis (Bold or italic)
    • docbook:abbrev (Abbreviation)
    • docbook:acronym (Acronym)
    • docbook:quote (Quote)
    • docbook:foreignphrase (Quotation in another language)
  • Lists
    • docbook:itemizedlist (List)
    • docbook:orderedlist (Numbered list)
    • docbook:listitem (List item)
    • docbook:para in listitem mode (Item content)
  • Tables
    • docbook:table (Table)
    • docbook:tbody (Table body)
    • docbook:tr (Line)
    • docbook:td or docbook:th (Cell or header cell)
  • Links
    • docbook:link (Link)
    • link-title-attribute (Link title attribute - Overridden by plugin Web if present)
    • link-class-attribute (link class attribute - overridden by plugin Web if present)
  • Images
    • docbook:mediaobject (Containing a media object: image, video, other)
    • docbook:mediaobject/docbook:alt (Media object attribute)
    • docbook:mediaobject/docbook:caption (Media object attribute)
    • docbook:imageobject (Image object)
    • image-wrapper (Render image container)
    • image-wrapper-link-attributes (Image container link attribute - Overridden by plugin Web if present)
    • image (Image rendering)
    • get-image-src (Image source attribute - Overridden by plugin Web if present)
    • image-title-attribute (Image title attribute - Overridden by plugin Web if present)
  • Other
    • html:htmlexpert (Block HTML expert)
    • html:toc (Table of contents)
    • docbook:para[html:toc] (Table of contents)
  • Common
    • get-styles (Get class, alignment and style attributes)
    • get-style (Get alignment and style attributes)

With plugin Forms

  • Form
    • html:form (Form)
    • html:label
    • html:form//docbook:para (Paragraph in form)
    • html:input[@type='submit' or @type='reset'] (submit button and reset button)
    • html:input (Simple text, radio button, checkbox, password, file)
    • html:textarea (Text space)
    • html:select (Drop-down list)
    • html:option (Drop-down list option)
    • html:fieldset (Set of form elements)
    • html:legend (Legend of the set)
    • html:captcha (Captcha to avoid robots)
  • Controls Javascript
    • html:input[@type='text'] in form-check mode (simple text check)
    • html:input[@type='password'] in form-check mode (Password check)
    • html:input[@type='checkbox'] in form-check mode (Checking a checkbox)
    • html:input[@type='radio'] in form-check mode (Choice button control)
    • html:input[@type='file'] in form-check mode (Checking a file field)
    • html:textarea in form-check mode (Checking a text space)
    • html:select in form-check mode (Checking a drop-down list)
    • html:captcha in form-check mode
    • node() in form-check mode (check all other nodes)
    • form-check-file-buildextensions (Check file extension)

With plugin InlineMedia

  • Media elements
    • docbook:videoobject[docbook:videodata/@type = 'youtube'] (YouTube video)
    • docbook:videoobject[docbook:videodata/@type = 'dailymotion'] (DailyMotion video)
    • docbook:videoobject (Other video types)

With plugin DataInclusion

  • ametys:dataquery
Back to top