Pseudo HTML output

The HTML data format used to tag Web pages for presentation in browsers is, like XML, based on SGML. For this reason, there is enough similarity between HTML documents and well-formed XML documents that is is possible to output an XML file that will be accepted as an HTML document by existing Web browsers. The format of start-tags, end-tags, attributes and entity references are essentially the same. For example, the HTML tag '<P>' (Paragraph) can also be considered a valid XML tag. The following example replaces a Note element with HTML P (Paragraph) and B (Bold) elements:

<xsl:template match="note">
  <P CLASS="notepara1"><B><xsl:apply-templates/></B></P>
</xsl:template>

It is important to note here that none of the markup ...

Get XSL companion, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.