RE: making div section with xsl invisible
My only guess then is that you are either outputting XML instead of HTML and as such IE is just rendering it without interpreting it (which obviously doesn't make sense given that it would show up on the screen as an XML tree instead of a rendered DIV -- or is it rendering?). The other possibly is your DOCTYPE is set to something that causes IE to not know what to do with the visibility:hidden property of the style attribute. As far as an XSL related solution I would first make sure you have the method attribute of your xsl:output element set to "html". If you are not using the xsl:output element then you should be. xsl:output is a child element of xsl:stylesheet and as such should go somewhere above your first xsl:template declaration. I usually put it right above my first template to keep it easily within reach if and when I need to change to it to xml, html, or text (the only three valid values for the method attribute) If changes the method attribute of xsl:output doesn't help then I would check to see what DOCTYPE your processor is spitting out and then check in with one of the CSS groups to make sure this isn't the source of your problem. If none of this helps then send me the source and I'll see what else I can come up with. What processor are you using by the way? Best of luck! <M:D/> -----Original Message----- From: rj_peterson@xxxxxxxxxxxxx [mailto:rj_peterson@xxxxxxxxxxxxx] Sent: Wednesday, March 24, 2004 9:34 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: making div section with xsl invisible When looking at the rendered source code, it does appear correct. When I cut and paste the rendered html part in a simple html page the div section does not show, but it does show when xsl renders the page. So it doesn't appear to be a browser issue, by the way I am using IE 6.0. <div style="visibility:hidden"> <tr> <td> Total number:</td> </tr> </div> visibility:hidden is correct, there isnt a problem with your code. display:none is different as it doesn't occupy any space. As per usual, write the html first then once that is correct write the xslt to produce that html. > <div style="display:none"> > <tr> > <td> > Total number: <xsl:value-of select="$foo"/> > </td> > </tr> > </div> > > Yov@nis > > > > > > > In my xsl template I have the following code snippet. > > <div style="visibility:hidden"> > <tr> > <td> > Total number: <xsl:value-of select="$foo"/> > </td> > </tr> > </div> > > When I render the page this div section still appears. I > also tried using the following with the same reuslts. > > <div><xsl:attribute name="style">visibility:hidden</xsl:attribute> > > Am I missing something simple here? > > Thanks
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format