xsl-list
[Top] [All Lists]

RE: making div section with xsl invisible

2004-03-24 09:59:33
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(_at_)dstoutput(_dot_)com 
[mailto:rj_peterson(_at_)dstoutput(_dot_)com] 
Sent: Wednesday, March 24, 2004 9:34 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] 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(_at_)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







--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
You are subscribed as: m(_dot_)david(_at_)mdptws(_dot_)com
To unsubscribe, go to:
http://lists.mulberrytech.com/unsub.php/xsl-list/m(_dot_)david(_at_)mdptws(_dot_)com
or e-mail:
<mailto:xsl-list-unsubscribe-m(_dot_)david=mdptws(_dot_)com(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--