Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Using div elements in XSL

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 6/4/2005 1:36:00 PM

Syxxzonz wrote:

> I'm new HTML,XSL,XML. Basically, I'm new to anything having to do with
> web pages. However, I have a problem regarding HTML div elements. I
> have an XSL stylesheet that correctly reads and XML file and formats it
> accordingly. It has a main body (i.e. <html> and <body> tags) and some
> javascripts. I start off my file by having a template match. This is
> where i have my html and body tags. Within my body, I have a table. I
> basically have a table tag with no cells. Between the table tags I do
> an apply-template call to apply it to certain elements. When I finish
> this main section of my code I start applying various templates (i.e.
> template match = ""). This is where I start forming my cells. However,
> what I want to do is create a div element so that I can hide and show
> the first column. In the end, I'm outputting a table with many rows but
> only two or three columns depending on the data. What I want to do is
> hide and show the first column. I can add a div tag to the first column
> in each different template (where the cells are being created with the
> data), and furthermore, I can use the "display" property to hide it at
> page load. However, I can't dynamically hide it or show it with a
> javascript function at the click of a button. I tried it out with a
> regular web page and it works the way I want it to. However, with an
> xsl stylesheet, when I create the table in the various templates the
> div element does not work. I'd appreciate the help. Is there something
> different that prevents a div element from working properly in an XSL
> stylesheet?

It is not clear what you try to achieve, the proper way to markup a 
table column is to use the <col> element, not a <div> element. Then in 
theory you can toggle the CSS visibility to collapse to hide a column 
but in practice that is only supported in Mozilla 1.8 nightlies I think. 
In other browsers if you want to hide a column then you need to hide all 
cells in that column.
If you want to hide a table row then you do not need a <div> element 
either, you should directly apply the CSS to the <tr> element.




-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent