Embedding XML

1. Process XHTML embedded in XML


Process XHTML embedded in XML

David Carlisle

> How to I process XHTML which is embedded in my XML file?
> For example, an XHTML caption element.
  <xsl:template match="caption">

Matches caption in the null namespace, but you want to match elements in XHTML so

  <xsl:template match="h:caption"> will work,

and add xmlns:h="http://www.w3.org/1999/xhtml" in your xsl:stylesheet start tag, so the h prefix is available everywhere in the stylesheet.

<xsl:stylesheet xmlns:xsl="....