|
Subject: [xsl] general gripe - html output From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx> Date: Mon, 24 Jun 2002 12:29:43 +0100 |
When my code looks like this:
<xsl:template match="/">
<html>
<body>
<br/>
</body>
</html>
</xsl:template>
The processor decides that I really want <br>, because it can see
<html>. If I trick the processor, and take advantage of sloppy html and
use:
<xsl:template match="/">
<body>
<br/>
</body>
</xsl:template>
It gives me <br/> as I want, because it doesnt know any different. But
I want to be good, so I'll use:
<xsl:template match="/">
<html>
<head>
</head>
<body>
<br/>
</body>
</html>
</xsl:template>
In which case, I get a nice line inserted as a child of <head>:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
All well and good, but when I attempt to use html-tidy I get informed of
my ill-formed html (</head> in <meta> etc).
So what do I do to solve all this helpfulness?
I use:
<xsl:output method="xml"/>
Its a funny old world.
cheers
andrew
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] xml-stylesheet p.i. and o, Chris Bayes | Thread | Re: [xsl] general gripe - html outp, David Carlisle |
| RE: [xsl] xml-stylesheet p.i. and o, Chris Bayes | Date | Re: [xsl] general gripe - html outp, David Carlisle |
| Month |