We help IT Professionals succeed at work.
Get Started

XSL question

Chris Jones
Chris Jones asked
on
223 Views
Last Modified: 2015-03-27
Hello,

i have some XSL  and its pulling text but leaving out my html and not displaying on my web page.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="date-converter" version="1.0"
    xmlns:date-converter="http://www.tamuc.edu/dateConverter/1.0/"
    xmlns:xalan="http://xml.apache.org/xalan"
    xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
    <xd:doc scope="stylesheet">
        <xd:desc>
            <xd:p>
                <xd:b>Created on:</xd:b> Feb 3, 2011
            </xd:p>
            <xd:p>
                <xd:b>Author:</xd:b> DickinsonKen
            </xd:p>
            <xd:p/>
        </xd:desc>
    </xd:doc>
    <xsl:template match="/system-data-structure">
        <xsl:if test="activated/value='Yes' and date-converter:isActive(number(expire)) = 'true'">
            <div id="alert" style="width:100%;text-align:center;background-color:#eeb211;font-size:2em;color:#03314B;border-bottom:white solid 6px;padding-bottom:4px;position:relative;">
                <div id="alert-inner" style="width:940px; text-align:left; margin:auto;">
                    <div id="alert-header" style="font-size:2.5em;float:left;padding-right:10px;height:100%;vertical-align:middle;text-transform:uppercase;font-weight:bold;font-family:Trade Gothic LT Std Cn;margin-top:10px;">
                        <xsl:value-of select="heading"/>
                    </div>
                    <div id="alert-content">
                        <xsl:value-of select="text"/>
                    </div>
                </div>
                <div style="width:100%;height:1px;font-size:1px;clear:both;"></div>
            </div>
        </xsl:if>
    </xsl:template>
    <xalan:component functions="isActive" prefix="date-converter">
        <xalan:script lang="javascript"> 
            function isActive(date){
                var sRet = "false";
                var dNow = new Date();
                var dExpire = new Date(date);
                if (dNow &lt; dExpire){ 
                    sRet = "true";
                }
                return sRet;
            } 
        </xalan:script>
    </xalan:component>
</xsl:stylesheet>

Open in new window

Comment
Watch Question
Information Architect
CERTIFIED EXPERT
Top Expert 2006
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE