<xsl:text> <xsl:text>Inserts a line break!
XSLT with 2 xml documents
The data is in one xml document and the layout (html) is in the other document. The XSLT sheet stores the root (/) data doc (the one that is found by url) in a variable called data. It stores the layout doc in a variable call layout. It then
- matches the root of the data; apply-templates selecting the layout variable
- match all the known sections of the layout document; applying templates and selecting the relevant parts of the data document
- The finally template is an identity template that passes all the unmatched layout nodes thru to the output
Example from CAO
<?xml version="1.0" <xsl:stylesheet xmlns:xsl=" xmlns="http://www.w3.org/1999/xhtml& version="1.0"> <xsl:output method='xhtml' indent="yes" encoding="UTF-8" media-type="application/xhtml+xml" doctype-system=" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" /> <xsl:param <xsl:param <xsl:param <xsl:variable <xsl:variable <xsl:variable <xsl:template <xsl:apply-templates </xsl:template> <xsl:template <xsl:apply-templates </xsl:template> <xsl:template <xsl:apply-templates </xsl:template> <xsl:template <xsl:value-of </xsl:template> <xsl:template <xsl:value-of </xsl:template> <xsl:template <xsl:value-of </xsl:template> <xsl:template <xsl:value-of </xsl:template> <xsl:template <xsl:value-of </xsl:template> <xsl:template <xsl:value-of </xsl:template> <!-- Identity transformation --> <xsl:template <xsl:copy> <xsl:apply-templates </xsl:copy> </xsl:template> </xsl:stylesheet>