Subject: [xsl] xmlns="" / XML to XHTML From: Alexander Nichau <ml@xxxxxxxxxx> Date: Mon, 12 Sep 2005 20:39:29 +0200 |
<?xml version="1.0" ?> <page> <content> <topic module="content_xhtml" no="4" author="Alexander"> <text> <h2>Heading</h2> <p> .... </p> </text> </topic> </content> <meta>...</meta> ... </page>
<xsl:param name="content" select="/page/content/topic"/> ...
<xsl:when test="$module = 'content_xhtml'"> <xsl:call-template name="content_xhtml"/> </xsl:when>
<xsl:template name="content_xhtml"> <xsl:param name="content" select="/page/content/topic"/> <xsl:copy-of select="$content/text/child::*" /> </xsl:template>
This results in a html page snippet: <h2 xmlns="">Heading</h2> <p xmlns="">.... <br /> .... </p>
<xsl:template match="text"> <xsl:apply-templates mode="import" /> </xsl:template>
System: PHP Version 5.0.3 with libxml 2.6.9 and libxslt 1.1.12: dom DOM/XML enabled DOM/XML API Version 20031129 libxml Version 2.6.9 HTML Support enabled XPath Support enabled XPointer Support enabled Schema Support enabled RelaxNG Support enabled
xsl XSL enabled libxslt Version 1.1.12 libxslt compiled against libxml Version 2.6.17 EXSLT enabled libexslt Version 1.1.12
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using a template to trans, Emerson, Matt | Thread | Re: [xsl] xmlns="" / XML to XHTML, Joris Gillis |
RE: [xsl] Create two xml files from, Michael Kay | Date | Re: [xsl] Create two xml files from, ADAM PATRICK |
Month |