xsl-list
[Top] [All Lists]

Re: Empty object

2004-01-29 08:23:13
Mike Haarman wrote:

But my first priority is to get   into my
transformed output.

Why!?

http://mail.gnome.org/archives/xml/2003-June/msg00099.html

http://sources.redhat.com/ml/xsl-list/2001-11/msg00782.html

<xsl:text>&amp;nbsp;</xsl:text> when transformed still places
&amp;nbsp;
into my output when viewed with a browser.

Because you didn't add the attribute disable-output-escaping="yes" to
the xsl:text node.  You did not read the FAQ or you would know that and
also why you don't want to do that.

What am I doing wrong?

You're not doing your reading and you're not listening.

http://www.dpawson.co.uk/xsl/sect2/nbsp.html#d6216e236

If your PHB is demanding an entity reference in the output of your
transformation, get him to post and we'll put him straight too.


Mike


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


Mike,

I actually read all the posts you directed me to. Thank you for your input. Solved the problem yesterday. I have included snippets of my code below.

xml input file
<snippet..>

<!DOCTYPE WITAGLIB [
  <!ENTITY nbsp "&#160;">
]>

xsl file
<snippet..with OBJECT template>

<xsl:choose>
              <xsl:when test="text() = '&#160;'">
<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
                            </xsl:when>
              <xsl:otherwise><xsl:apply-templates/>
</xsl:otherwise>
          </xsl:choose>
          </td>
XHTML output file:
<snippet..>

<td style="color:#000000;font-family:Arial;font-size:8pt;text-align:right;background-color:#FFFFFF;height:20px;width:98px;">$4.00</td> <td style="color:#000000;font-family:Arial;font-size:8pt;text-align:right;background-color:#FFFFFF;height:20px;width:98px;">&nbsp;</td>

- Scott

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



<Prev in Thread] Current Thread [Next in Thread>