|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: AW: <xsl:output>doesn't like my method.
Subject: Re: AW: <xsl:output>doesn't like my method.
From: James Bebbington <james@xxxxxxxxxxxxxxx>
Date: Wed, 6 Aug 2003 21:02:25 +0100
|
Yeah that's it, sorry, I'm a dick!
And yes, I do understand the differences in HTML vs XML/XHTML that you
point out, its just that I was incorrectly assuming that the 'html'
section of the outputted <!DOCTYPE> was produced from the <xsl:output>
method attribute and should therefore be 'html' not 'xml'.
Many thanks for your help, I was starting to lose hair over that little
problem.
James.
On Wednesday, August 6, 2003, at 07:53 pm, Markus Abt wrote:
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: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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|