Inserting un-encoded text

Subject: Inserting un-encoded text
From: "Tom Gilbert" <tomg@xxxxxxx>
Date: Wed, 16 Jun 1999 14:28:39 -0500
This is probably simple but how do I get un-encoded HTML output
from a script function in a style sheet? This example returns
encoded characters Here's the condensed and simplified version
of what I tried:
 
  <xsl:script>
    <![CDATA[
      function bold(e)
      {
        if ( e.previousSibling.text == "ip address" )
          return "<B>" + e.text + "</B>";         else
          return e.text;
        return;
      }
    ]]>
  </xsl:script>
 
  <xsl:template match="id_value">
      <xsl:eval>bold(this)</xsl:eval>
  </xsl:template>
 
Typical xml:
 
...<id><id_type>ea address</id_type><id_value>123</id_value></id> <id><id_type>ip address</id_type><id_value>1.2.3.4</id_value></id>...
 
In this case I'd like the ip address to appear bold.
 
The function returns "&lt;B&gt;....." so that the B tag is ignored by the browser.
 

Tom Gilbert                          
GE Marquette                         Voice: 414-362-2528
8200 W. Tower Ave.                   FAX:   414-362-3010
Milwaukee, WI 53223                  Email: tomg@xxxxxxx

 
Current Thread