This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

general gripe - html output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]