[xsl] <xsl:output>doesn't like my method.

Subject: [xsl] <xsl:output>doesn't like my method.
From: James Bebbington <james@xxxxxxxxxxxxxxx>
Date: Wed, 6 Aug 2003 16:42:43 +0100
Hello all,

I'm all a bit new to XSL but loving it none the less, so if I'm asking stupid questions be nice :) I have tried serching the archives and the XSL FAQ but couldn't find anything of help.

I'm using Xalan-Java on Mac OS X 10.2.6 (Java 1.4, I think) to transform (in this example) an xml document into XHTML. Problem is I can't get the correct <!DOCTYPE> definition in the output document.

The XSLT strats as follows...

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect">

<xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd" indent="yes"/>



The complete file can be found at:


http://fireant.homeunix.net/dcmaterials/concept4/xsl/bugs.xsl

which transforms:

http://fireant.homeunix.net/dcmaterials/concept4/xml/bugs.xml

to produce:

http://fireant.homeunix.net/dcmaterials/concept4/bugs.html

Whose content starts with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">


The issue appears to be with the "HTML" section at the start of the !DOCTYPE as when I try and validate it using the W3C's validation service it fails. When I change the .html file to contain <!DOCTYPE html ... (notice the lower case) it seems to validate fine.

So the question is how do I get the XSLT to output 'method="html"' as "html" not "HTML"??

Thanks,

James.


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread