views:

362

answers:

1

I'm trying to get the meta and img tags to close in the output from an xlt. I've looked into it, and it seems I need to select an "xml" method rather than "html", but this still doesn't seem to work. I've currently got:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:php="http://php.net/xsl"&gt;

    <xsl:output method="xml"
       omit-xml-declaration="yes"
       indent="yes"
       encoding="iso-8859-1"
       doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
       doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />

    <!-- ... -->

    <meta name="keywords" content="{meta/data/here/text()}" />

    <!-- ... -->

Am I doing anything that is obviously wrong?

A: 

I can replicate the non-terminating meta tag with msxsl. This can be fixed by setting the xmlns to the XHTML standard (xmlns="http://www.w3.org/1999/xhtml") on the xsl:stylesheet element. I've found in the past that msxsl has a number of problems with XSLT processing. Besides which, it's pretty much deprecated.

Benjamin Titmus
Which version of msxml? msxml 6.0 is not deprecated as far as I know. What makes you think so?
John Saunders
The XSLT processor I used was msxsl.exe, not msxml. msxsl.exe uses msxml version 4. msxml is not deprecated.
Benjamin Titmus