locked
stop displaying node text in Xslt RRS feed

  • Question

  • User1739362982 posted

    hi,

    this is my xml

    <Response>
        <Status>1</Status>
        <Message>Successful</Message>
        <ResponseTime>00:00:00.0152703</ResponseTime>
        <Record>
           <Ealert Name="Morning" Group="Financial News Alerts (FNA)" NoRecords="5">
               <OneDate>
                   <Date>2013-07-09</Date>
                   <EalertURL>http://vibrant3.vlibonline.com/Ealerts/Html/Financial News Alerts (FNA)/Morning/Morning2013-07-09.html</EalertURL>
               </OneDate>
               <OneDate>
                   <Date>2013-07-08</Date>
                   <EalertURL>http://vibrant3.vlibonline.com/Ealerts/Html/Financial News Alerts (FNA)/Morning/Morning2013-07-08.html</EalertURL>
               </OneDate>
           </Ealert>
         </Record>
    </Response>

    this is my xslt

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
        <xsl:output method="xml" indent="yes"/>
    
      <xsl:template match="Ealert">
        <div id="MainRead">
          <div class ="Sub1Read">
            <table>
              <tr>
                <td>
                  <xsl:element name="iframe">
                    <xsl:attribute name="id">ealerthtml</xsl:attribute>
                    <xsl:attribute name="name">ealerthtml</xsl:attribute>
                    <xsl:attribute name="height">400px</xsl:attribute>
                    <xsl:attribute name="width">100%</xsl:attribute>
                    <xsl:attribute name="scrolling">no</xsl:attribute>
                    <xsl:attribute name="src">
                      <xsl:value-of select="OneDate/EalertURL"/>
                    </xsl:attribute>
                  </xsl:element>
                </td>
              </tr>
            </table>
          </div>
          <div class="Sub2Read">
            <table>
              <xsl:for-each select="OneDate">
                <tr>
                  <td class="tddat">
                    <span class="datspan">
                      <xsl:value-of select="Date"/>
                    </span>
                    <xsl:element name="input">
                      <xsl:attribute name="type">hidden</xsl:attribute>
                      <xsl:attribute name="name">ealturl</xsl:attribute>
                      <xsl:attribute name="class">ealturl</xsl:attribute>
                      <xsl:attribute name="value">
                        <xsl:value-of select="EalertURL"/>
                      </xsl:attribute>
                    </xsl:element>
                  </td>
                </tr>
              </xsl:for-each>
            </table>
          </div>
        </div>
    
    
        <script type="text/javascript">
          <![CDATA[
                var $u = jQuery.noConflict();
                $u(document).ready(function() {
                    $u("span.datspan:first").addClass('Active');
                    $u(".datspan").live('click', function(){
                       $u("span.datspan").removeClass('Active');
                       $u(this).addClass('Active');
                       $u("#ealerthtml").attr('src', $u(this).parent('.tddat').find('.ealturl').val());
                    });
                });            
            ]]>
        </script>
    
      </xsl:template>
    </xsl:stylesheet>
    

    and here is my output brings out

    1Successful00:00:00.0152703


    followed by the required output result. Can you please tell me how to get rid of this text.

    thanks

    Wednesday, July 10, 2013 2:29 AM

Answers

  • User1938476581 posted

    Hi,

    The match pattern is wrong. Try this

    <xsl:template match="Response\Record\Ealert">

    Hope it can help you.

     
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 10, 2013 11:02 PM