Gooseman
Gooseman

Reputation:

Generated tags in xslt are not being closed correctly

I'm trying to get the meta and img tags to close in the output from an xslt.

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">

    <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?

Upvotes: 1

Views: 2306

Answers (1)

Benjamin Titmus
Benjamin Titmus

Reputation: 391

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.

Upvotes: 1

Related Questions