[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

AW: [xsl] doesn't like my method.


Subject: AW: [xsl] <xsl:output>doesn't like my method.
From: Markus Abt <abt@xxxxxxxx>
Date: Wed, 6 Aug 2003 20:53:15 +0200

Hello James,

did you try <xsl:output method="xml" ...>?

There are other things which are different in HTML/SGML and XHTML/XML,
for example empty tags (<br> in HTML, and <br/> in XHTML).


Hope this helps,
Markus
__________________________
Markus Abt
Comet Computer GmbH
http://www.comet.de



----------
Von: 	James Bebbington
Gesendet: 	Mittwoch, 6. August 2003 17:42
An: 	XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Betreff: 	[xsl] <xsl:output>doesn't like my method.

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



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



Current Thread
Keywords