[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: general gripe - html output

Subject: RE: general gripe - html output
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 24 Jun 2002 13:05:48 +0100
RE:  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.

If you want the output serialized as XML rather than HTML, then use
<xsl:output method="xml"/>.

  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).

What exactly is the processor producing, that html-tidy complains of?
> 
> So what do I do to solve all this helpfulness?
> 
> I use:
> 
> <xsl:output method="xml"/>
> 
> Its a funny old world.
> 

I can't quite see what you're griping about.

Is it that the HTML and XML serializations are different?

Is it that you don't like the rules for choosing a default output method
if you haven't asked for one explicitly?

Is it that you don't like the HTML serialization?

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.