www.webdeveloper.com
Results 1 to 11 of 11

Thread: hide display

  1. #1
    Join Date
    May 2006
    Posts
    60

    hide display

    i want to hide this
    Code:
    <title>CCH Wall Street</title> 
              <link>http://cp.llesiant.com/Delivery/RSSContentSet.asp?id=89C66C75-6E53-4F84-B778-CC7F5157D57F&n=3&days=7</link> 
              <description>There are 139 items available.</description> 
              <language>en-us</language> 
              <cf:treatAs xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005">list</cf:treatAs>
    part of XML from the display using xslt. please suggest me here.


    Code:
    <rss version="2.0">
    
    <channel>
              <title>CCH Wall Street</title> 
              <link>http://cp.llesiant.com/Delivery/RSSContentSet.asp?id=89C66C75-6E53-4F84-B778-CC7F5157D57F&n=3&days=7</link> 
              <description>There are 139 items available.</description> 
              <language>en-us</language> 
              <cf:treatAs xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005">list</cf:treatAs> 
           
    		 <item>
                  <title>Barclays, former trader settle SEC charges in NYC for over $10.9M</title> 
                  <link>http://cp.llesiant.com/Delivery/ExternalContent.asp?contentId=225969440000000187</link> 
                  <description>NEW YORK (AP) -- Barclays Bank PLC has agreed to pay $10.9 million and a former trader for the bank agreed to pay $750,000 to settle charges that they engaged in securities fraud through a pattern...</description> 
                  <source url="/Delivery/ExternalContent.asp?contentId=225969440000000187">NY Metro</source> 
                  <pubDate>30 May 2007 19:19:00 UT</pubDate> 
                  <guid isPermaLink="false">225969440000000187</guid> 
            </item>
            
    		<item>
                 <title>New CCH White Paper Covers SEC, PCAOB Internal Controls Guidance</title> 
                 <link>http://cp.llesiant.com/Delivery/ExternalContent.asp?contentId=225969400000000111</link> 
                 <description>CCH Securities Law Analyst and Author Available for Comment RIVERWOODS, Ill., May 30 /PRNewswire/ -- CCH principal analyst and leading author on securities law, Jim Hamilton, JD, LLM, has released...</description> 
                 <source url="/Delivery/ExternalContent.asp?contentId=225969400000000111">KCAU-TV</source> 
                 <pubDate>30 May 2007 19:09:00 UT</pubDate> 
                 <guid isPermaLink="false">225969400000000111</guid> 
           </item>
         
    	   <item>
                <title>Investor Alert From Cauley Bowman Carney & Williams, PLLC: Update on Proposed Acquisition of Bradley Pharmaceu</title> 
                <link>http://cp.llesiant.com/Delivery/ExternalContent.asp?contentId=225969176000000147</link> 
                <description>/PRNewswire/ -- Cauley Bowman Carney &amp; Williams, PLLC announces an investigation into the proposed acquisition of Bradley Pharmaceuticals, Inc. ('Bradley'). On May 29, 2007, Bradley announced...</description> 
                <source url="/Delivery/ExternalContent.asp?contentId=225969176000000147">Pharma Live</source> 
                <pubDate>30 May 2007 18:14:00 UT</pubDate> 
                <guid isPermaLink="false">225969176000000147</guid> 
          </item>
    
      </channel>
    
      </rss>

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    Code:
    <xsl:template match="channel/*"/>
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    May 2006
    Posts
    60
    does it solve the purpose? i did not understand the logic here. please update me

  4. #4
    Join Date
    May 2006
    Posts
    60
    still i have the problem

  5. #5
    Join Date
    May 2006
    Posts
    60
    please help me here. i could not able find out the solution

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    You create a template that matches what you want to hide and just have the template do nothing.

    In this case I create a template that matches all of the children of the channel element. I expect that you have another template that matches the item elements. That template will be more specific and override the other and so the item elements will be shown and everything else hidden.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  7. #7
    Join Date
    May 2006
    Posts
    60
    i have done this(template to hide the portaion of the xml). but the blank space is appearing on the display.

  8. #8
    Join Date
    May 2006
    Posts
    60

    blank space

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
    <xsl:output method="html" encoding="ISO-8859-1"/>
    
    <xsl:template match="/">
    	<link rel="stylesheet" href="/ws-portal/css/newsfeed.css" type="text/css" />
    	<script language="javascript" src="/ws-portal/jscript/newsfeed.js"></script>
            <xsl:element name="newsfeed_container">	
                    <xsl:apply-templates/>
           </xsl:element>
    </xsl:template>
    
    <xsl:template match="channel/*" >
    
    <xsl:template match="item">
    	
    	<!-- create link for newsfeed -->
            <xsl:element name="div">
                <xsl:attribute name="id">newsfeed_link</xsl:attribute>
                    <xsl:element name="a">
                       <xsl:attribute name="class">newsfeedlink</xsl:attribute>
                        <xsl:attribute name="href">
                            <xsl:text>javascript:openNewsfeedLink('</xsl:text>
                                    <xsl:value-of select="link"/>
                                    <xsl:text>')</xsl:text>
                            </xsl:attribute>
                            <!-- show newsfeed title-->
    			<xsl:value-of select="title"/>
    		</xsl:element>
            </xsl:element>
    	
    	<!-- show the description of newsfeed -->
            <xsl:element name="div">
                <xsl:attribute name="id">newsfeed_description</xsl:attribute>
                <xsl:value-of select="description"/>
    	</xsl:element>
    	<!-- show the publication date of newsfeed -->
    	<xsl:element name="div">
                <xsl:attribute name="id">newsfeed_published_date</xsl:attribute>
                <xsl:value-of select="datePublished"/>
            </xsl:element>
    
    </xsl:template>
    </xsl:template>
    <xsl:template match="docHits">
    		<!-- nop --> 
    </xsl:template>
    
    </xsl:stylesheet>
    <!--
    
    -->

  9. #9
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    What you have there does not match my example.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  10. #10
    Join Date
    May 2006
    Posts
    60

    solved the problem

    <?xml version="1.0" encoding="ISO-8859-1"?>



    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xslutput method="html" encoding="ISO-8859-1"/>

    <xsl:template match="/">
    <link rel="stylesheet" href="/ws-portal/css/newsfeed.css" type="text/css" />
    <script language="javascript" src="/ws-portal/jscript/newsfeed.js"></script>
    <xsl:element name="newsfeed_container">
    <xsl:apply-templates select="//item"/>
    </xsl:element>
    </xsl:template>



    <xsl:template match="item">

    <!-- create link for newsfeed -->
    <xsl:element name="div">
    <xsl:attribute name="id">newsfeed_link</xsl:attribute>
    <xsl:element name="a">
    <xsl:attribute name="class">newsfeedlink</xsl:attribute>
    <xsl:attribute name="href">
    <xsl:text>javascriptpenNewsfeedLink('</xsl:text>
    <xsl:value-of select="link"/>
    <xsl:text>')</xsl:text>
    </xsl:attribute>
    <!-- show newsfeed title-->
    <xsl:value-of select="title"/>
    </xsl:element>
    </xsl:element>

    <!-- show the description of newsfeed -->
    <xsl:element name="div">
    <xsl:attribute name="id">newsfeed_description</xsl:attribute>
    <xsl:value-of select="description"/>
    </xsl:element>
    <!-- show the publication date of newsfeed -->
    <xsl:element name="div">
    <xsl:attribute name="id">newsfeed_published_date</xsl:attribute>
    <xsl:value-of select="pubDate"/>
    </xsl:element>

    </xsl:template>

    <xsl:template match="docHits">
    <!-- nop -->
    </xsl:template>

    </xsl:stylesheet>

  11. #11
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    That'll work also.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles