Re: [xsl] XSL Formatting Problem

Subject: Re: [xsl] XSL Formatting Problem
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 26 Feb 2002 13:07:57 +0000
Hi Jack,

> Would like to center some text. Neither of the following works:
>
>         <html:p align="center">
>           <xsl:value-of select="DissTitle"/>
>         </html:p>
>
>         <html:p><html:center>
>           <xsl:value-of select="DissTitle"/>
>         </html:center></html:p>
>
> The lines,
>
>         <html:title>
>           <xsl:value-of select="DissTitle"/>
>         </html:title>
>
> were intended to act as the conventional title tag, which should
> place the content in the browser's title bar. Instead, the content
> is rendered on the browser content window, and the title bar
> reflects the path and file name on the local machine.

It sounds as if your browser is having difficulty understanding the
HTML that you're using. What I suggest you do is try to write (by
hand) an HTML page that works, and then try to generate that HTML page
from your XSLT stylesheet. Otherwise it's easy to get confused between
what's not working because of the HTML and what's not working because
of the XSLT.

I can think of three things that might be happening, and that you
could try changing when you create the HTML page. First, it might be
that your browser doesn't recognise deprecated attributes and elements
such as the 'align' attribute and 'center' element. Second, it might
be that your browser is getting confused because of the 'html' prefix
that you're using on all your elements -- if you used the default
namespace instead, you might be better off. Third, it might be that
your HTML document isn't structured properly, and that's throwing off
the browser's formatting routines.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread