Re: [xsl] rotate text 90 degrees

Subject: Re: [xsl] rotate text 90 degrees
From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx>
Date: Tue, 07 May 2002 10:17:39 -0600
At 02:40 PM 5/6/2002, you wrote:
At 02:13 PM 5/6/2002, you wrote:
I have an XML document that I want to display as a table (HTML)... I want
the first row (column names) to have their text rotated 90 degrees... I have
read that this is possible using XSL but I haven't found a good description
or example how this can be done... if anyone can point me to a good example
or give any tip I would really appreciate it...

Huh? The closest you'll find is the ability to output CSS instructions which could do what you're asking. Move your search from XML to CSS, find out how to do it there (in plain HTML and CSS only), and then come back and cut 'n' paste what you wrote into an XSL StyleSheet.

I noticed that you kept asking but didn't start looking. I did a search on Yahoo! and found this in less than 5 minutes. <http://www.faqts.com/knowledge_base/view.phtml/aid/9250>. It probably won't be portable outside of IE (I'm using 6.0) but it does what you want.


<html>
  <head>
    <script>

var i = 0;
function rot()
{
i = ++i % 4;
if (!document.all.aDiv.style.filter)
document.all.aDiv.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + i + ')';
else
document.all.aDiv.filters.item('DXImageTransform.Microsoft.BasicImage').Rotation = i;
} // ends function rot(void)


</script>
</head>
<body>
<input type="button" value="Rotate by 90 deg" onclick="rot();" />
<div id="aDiv" style="width: 100px; height: 100px; background-color: lime;">
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">Kibology for all.</td>
</tr>
</table>
</div>
</body>
</html>



Greg Faron Integre Technical Publishing Co.



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


Current Thread