2012-01-24 2 views
0

아래 (노란색 섹션 각각에 대해) 아래 첨부 파일에 ID 또는 클래스를 추가하려고합니다. 나는 "날짜", "제목"및 "더 많은"수업을 찾았지만 본문, img, 카테고리 및 게시 섹션에 문제가 있습니다. 출력을 보려면 링크를 클릭하십시오 ....XSL에 ID 또는 클래스 추가

여기

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" 
       version="1.0" exclude-result-prefixes="xsl ddwrt msxsl rssaggwrt" 
       xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" 
       xmlns:rssaggwrt="http://schemas.microsoft.com/WebParts/v3/rssagg/runtime" 
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
       xmlns:rssFeed="urn:schemas-microsoft-com:sharepoint:RSSAggregatorWebPart" 
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" 
       xmlns:rss1="http://purl.org/rss/1.0/" xmlns:atom="http://www.w3.org/2005/Atom" 
       xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" 
       xmlns:atom2="http://purl.org/atom/ns#"> 
    <xsl:param name="rss_FeedLimit">5</xsl:param> 
    <xsl:param name="rss_ExpandFeed">false</xsl:param> 
    <xsl:param name="rss_LCID">1033</xsl:param> 
    <xsl:param name="rss_WebPartID">RSS_Viewer_WebPart</xsl:param> 
    <xsl:param name="rss_alignValue">left</xsl:param> 
    <xsl:param name="rss_IsDesignMode">True</xsl:param> 
    <xsl:template match="rss"> 
    <xsl:call-template name="RSSMainTemplate"/> 

    </xsl:template> 
    <xsl:template match="rdf:RDF"> 
    <xsl:call-template name="RDFMainTemplate"/> 

    </xsl:template> 
    <xsl:template match="atom:feed"> 
    <xsl:call-template name="ATOMMainTemplate"/> 

    </xsl:template> 
    <xsl:template match="atom2:feed"> 
    <xsl:call-template name="ATOM2MainTemplate"/> 

    </xsl:template> 
    <xsl:template name="RSSMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:variable name="Rows" select="channel/item"/> 
    <xsl:variable name="RowCount" select="count($Rows)"/> 
    <div class="slm-layout-main" > 
     <xsl:call-template name="RSSMainTemplate.body"> 
     <xsl:with-param name="Rows" select="$Rows"/> 

     <xsl:with-param name="RowCount" select="count($Rows)"/> 

     </xsl:call-template> 
    </div> 
    </xsl:template> 
    <xsl:template name="RSSMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="Rows"/> 
    <xsl:param name="RowCount"/> 
    <xsl:for-each select="$Rows"> 
     <xsl:variable name="CurPosition" select="position()" /> 
     <xsl:variable name="RssFeedLink" select="$rss_WebPartID" /> 
     <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" /> 
     <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)"> 
     <div class="item link-item postSection" > <a class="postHeaderLink" href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" > <xsl:value-of select="title"/> </a> 
      <xsl:if test="$rss_ExpandFeed = true()"> 
      <xsl:call-template name="RSSMainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
      <xsl:if test="$rss_ExpandFeed = false()"> 
      <xsl:call-template name="RSSMainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
     </div> 
     </xsl:if> 
    </xsl:for-each> 
    </xsl:template> 
    <xsl:template name="RSSMainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="DescriptionStyle"/> 
    <xsl:param name="CurrentElement"/> 
    <div id="{$CurrentElement}" class="description" align="{$rss_alignValue}" style="{$DescriptionStyle} text-align:{$rss_alignValue};"> 
     <div class="postDate"> 
     <xsl:choose> 
      <!-- some RSS2.0 contain pubDate tag, some others dc:date --> 
      <xsl:when test="string-length(pubDate) &gt; 0"> 
      <xsl:variable name="pubDateLength" select="string-length(pubDate) - 3" /> 
      <xsl:value-of select="ddwrt:FormatDate(substring(pubDate,0,$pubDateLength),number($rss_LCID),3)"/> 
      </xsl:when> 
      <xsl:otherwise> 
      <xsl:value-of select="ddwrt:FormatDate(string(dc:date),number($rss_LCID),3)"/> 
      </xsl:otherwise> 
     </xsl:choose> 
     </div> 
     <xsl:if test="string-length(description) &gt; 0"> 
     <xsl:variable name="SafeHtml"> 
     <xsl:call-template name="GetSafeHtml"> 
      <xsl:with-param name="Html" select="description"/> 

     </xsl:call-template> 
     </xsl:variable> 
     <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/> 
     </xsl:if> 
     <div class="description"> <a href="{ddwrt:EnsureAllowedProtocol(string(link))}">More...</a> </div> 
    </div> 
    </xsl:template> 
    <xsl:template name="RDFMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:variable name="Rows" select="rss1:item"/> 
    <xsl:variable name="RowCount" select="count($Rows)"/> 
    <div class="slm-layout-main" > 
     <div class="groupheader item medium"> <a href="{ddwrt:EnsureAllowedProtocol(string(rss1:channel/rss1:link))}"> <xsl:value-of select="rss1:channel/rss1:title"/> </a> </div> 
     <xsl:call-template name="RDFMainTemplate.body"> 
     <xsl:with-param name="Rows" select="$Rows"/> 

     <xsl:with-param name="RowCount" select="count($Rows)"/> 

     </xsl:call-template> 
    </div> 
    </xsl:template> 
    <xsl:template name="RDFMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="Rows"/> 
    <xsl:param name="RowCount"/> 
    <xsl:for-each select="$Rows"> 
     <xsl:variable name="CurPosition" select="position()" /> 
     <xsl:variable name="RssFeedLink" select="$rss_WebPartID" /> 
     <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" /> 
     <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)"> 
     <div class="item link-item postSection" > <a class="postHeaderLink" href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" > <xsl:value-of select="rss1:title"/> </a> 
      <xsl:if test="$rss_ExpandFeed = true()"> 
      <xsl:call-template name="RDFMainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
      <xsl:if test="$rss_ExpandFeed = false()"> 
      <xsl:call-template name="RDFMainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
     </div> 
     </xsl:if> 
    </xsl:for-each> 
    </xsl:template> 
    <xsl:template name="RDFMainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="DescriptionStyle"/> 
    <xsl:param name="CurrentElement"/> 
    <div id="{$CurrentElement}" class="description" align="{$rss_alignValue}" style="{$DescriptionStyle} text-align:{$rss_alignValue};"> <xsl:value-of select="ddwrt:FormatDate(string(dc:date),number($rss_LCID),3)"/> 
     <xsl:if test="string-length(rss1:description) &gt; 0"> 
     <xsl:variable name="SafeHtml"> 
     <xsl:call-template name="GetSafeHtml"> 
      <xsl:with-param name="Html" select="rss1:description"/> 

     </xsl:call-template> 
     </xsl:variable> 
     <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/> 
     </xsl:if> 
     <div class="description"> <a href="{ddwrt:EnsureAllowedProtocol(string(rss1:link))}">More...</a> </div> 
    </div> 
    </xsl:template> 
    <xsl:template name="ATOMMainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:variable name="Rows" select="atom:entry"/> 
    <xsl:variable name="RowCount" select="count($Rows)"/> 
    <div class="slm-layout-main" > 
     <div class="groupheader item medium"> <a href="{ddwrt:EnsureAllowedProtocol(string(atom:link/@href))}"> <xsl:value-of select="atom:title"/> </a> </div> 
     <xsl:call-template name="ATOMMainTemplate.body"> 
     <xsl:with-param name="Rows" select="$Rows"/> 

     <xsl:with-param name="RowCount" select="count($Rows)"/> 

     </xsl:call-template> 
    </div> 
    </xsl:template> 
    <xsl:template name="ATOMMainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="Rows"/> 
    <xsl:param name="RowCount"/> 
    <xsl:for-each select="$Rows"> 
     <xsl:variable name="CurPosition" select="position()" /> 
     <xsl:variable name="RssFeedLink" select="$rss_WebPartID" /> 
     <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" /> 
     <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)"> 
     <div class="item link-item postSection" > <a class="postHeaderLink" href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" > <xsl:value-of select="atom:title"/> </a> 
      <xsl:if test="$rss_ExpandFeed = true()"> 
      <xsl:call-template name="ATOMMainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
      <xsl:if test="$rss_ExpandFeed = false()"> 
      <xsl:call-template name="ATOMMainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
     </div> 
     </xsl:if> 
    </xsl:for-each> 
    </xsl:template> 
    <xsl:template name="ATOMMainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="DescriptionStyle"/> 
    <xsl:param name="CurrentElement"/> 
    <div id="{$CurrentElement}" class="description" align="{$rss_alignValue}" style="{$DescriptionStyle} text-align:{$rss_alignValue};"> <xsl:value-of select="ddwrt:FormatDate(string(atom:updated),number($rss_LCID),3)"/> 
     <div class="postDate"> 
     <xsl:choose> 
      <xsl:when test="string-length(atom:summary) &gt; 0"> 
      <xsl:variable name="SafeHtml"> 
      <xsl:call-template name="GetSafeHtml"> 
       <xsl:with-param name="Html" select="atom:summary"/> 

      </xsl:call-template> 
      </xsl:variable> 
      <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/> 
      </xsl:when> 
      <xsl:when test="string-length(atom:content) &gt; 0"> 
      <xsl:variable name="SafeHtml"> 
      <xsl:call-template name="GetSafeHtml"> 
       <xsl:with-param name="Html" select="atom:content"/> 

      </xsl:call-template> 
      </xsl:variable> 
      <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/> 
      </xsl:when> 
     </xsl:choose> 
     </div> 
     <div class="description"> <a href="{ddwrt:EnsureAllowedProtocol(string(atom:link/@href))}">More...</a> </div> 
    </div> 
    </xsl:template> 
    <xsl:template name="ATOM2MainTemplate" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:variable name="Rows" select="atom2:entry"/> 
    <xsl:variable name="RowCount" select="count($Rows)"/> 
    <div class="slm-layout-main" > 
     <div class="groupheader item medium"> <a href="{ddwrt:EnsureAllowedProtocol(string(atom2:link/@href))}"> <xsl:value-of select="atom2:title"/> </a> </div> 
     <xsl:call-template name="ATOM2MainTemplate.body"> 
     <xsl:with-param name="Rows" select="$Rows"/> 

     <xsl:with-param name="RowCount" select="count($Rows)"/> 

     </xsl:call-template> 
    </div> 
    </xsl:template> 
    <xsl:template name="ATOM2MainTemplate.body" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="Rows"/> 
    <xsl:param name="RowCount"/> 
    <xsl:for-each select="$Rows"> 
     <xsl:variable name="CurPosition" select="position()" /> 
     <xsl:variable name="RssFeedLink" select="$rss_WebPartID" /> 
     <xsl:variable name="CurrentElement" select="concat($RssFeedLink,$CurPosition)" /> 
     <xsl:if test="($CurPosition &lt;= $rss_FeedLimit)"> 
     <div class="item link-item postSection" > <a class="postHeaderLink" href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" > <xsl:value-of select="atom2:title"/> </a> 
      <xsl:if test="$rss_ExpandFeed = true()"> 
      <xsl:call-template name="ATOM2MainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
      <xsl:if test="$rss_ExpandFeed = false()"> 
      <xsl:call-template name="ATOM2MainTemplate.description"> 
       <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/> 

       <xsl:with-param name="CurrentElement" select="$CurrentElement"/> 

      </xsl:call-template> 
      </xsl:if> 
     </div> 
     </xsl:if> 
    </xsl:for-each> 
    </xsl:template> 
    <xsl:template name="ATOM2MainTemplate.description" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> 
    <xsl:param name="DescriptionStyle"/> 
    <xsl:param name="CurrentElement"/> 
    <div id="{$CurrentElement}" class="description" align="{$rss_alignValue}" style="{$DescriptionStyle} text-align:{$rss_alignValue};"> <xsl:value-of select="ddwrt:FormatDate(string(atom2:updated),number($rss_LCID),3)"/> 
     <div class="postDate"> 
     <xsl:choose> 
      <xsl:when test="string-length(atom2:summary) &gt; 0"> 
      <xsl:variable name="SafeHtml"> 
      <xsl:call-template name="GetSafeHtml"> 
       <xsl:with-param name="Html" select="atom2:summary"/> 

      </xsl:call-template> 
      </xsl:variable> 
      <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/> 
      </xsl:when> 
      <xsl:when test="string-length(atom2:content) &gt; 0"> 
      <xsl:variable name="SafeHtml"> 
      <xsl:call-template name="GetSafeHtml"> 
       <xsl:with-param name="Html" select="atom2:content"/> 

      </xsl:call-template> 
      </xsl:variable> 
      <xsl:value-of select="$SafeHtml" disable-output-escaping="yes"/> 
      </xsl:when> 
     </xsl:choose> 
     </div> 
     <div class="description"> <a href="{ddwrt:EnsureAllowedProtocol(string(atom2:link/@href))}">More...</a> </div> 
    </div> 
    </xsl:template> 
    <xsl:template name="GetSafeHtml"> 
    <xsl:param name="Html"/> 
    <xsl:choose> 
     <xsl:when test="$rss_IsDesignMode = 'True'"> 
     <xsl:value-of select="$Html"/> 
     </xsl:when> 
     <xsl:otherwise> 
     <xsl:value-of select="rssaggwrt:MakeSafe($Html)"/> 
     </xsl:otherwise> 
    </xsl:choose> 
    </xsl:template> 
</xsl:stylesheet> 

blog pic는 HTML에 출력된다 :

<!DOCTYPE HTML> 
<html> 
<head> 
</head> 

<body> 
<div class="ms-rtestate-read ms-rte-wpbox"> 
    <div class="ms-rtestate-notify ms-rtestate-read 5b3f0d13-9a94-4cb5-8d0b-09bcd8a3bfe4" id="div_5b3f0d13-9a94-4cb5-8d0b-09bcd8a3bfe4"> 
    <table cellspacing="0" cellpadding="0" style="width:100%"> 
     <tbody> 
     <tr> 
      <td valign="top" class="s4-wpcell-plain" id="MSOZoneCell_WebPartWPQ7"><table cellspacing="0" cellpadding="0" border="0" width="100%" class="s4-wpTopTable"> 
       <tbody> 
       <tr> 
        <td><table cellspacing="0" cellpadding="0" border="0" width="100%"> 
         <tbody> 
         <tr class="ms-WPHeader"> 
          <td align="left" class="ms-wpTdSpace">&nbsp;</td> 
          <td class="ms-WPHeaderTd" id="WebPartTitleWPQ7" title="Latest News! - Displays an RSS feed."><h3 class="ms-standardheader ms-WPTitle" style="text-align:justify;"><a href="*******Can't show this link*******News/default.aspx" accesskey="W"><nobr><span>Latest News!</span><span id="WebPartCaptionWPQ7"></span></nobr></a></h3></td> 
          <td align="right" onclick="OpenWebPartMenu('WebPartWPQ7_Menu', this, 'WebPartWPQ7','False'); TrapMenuClick(event); return false;" class="ms-WPHeaderTdMenu"><span style="display:none;"> 
          <menu class="ms-SrvMenuUI" id="WebPartWPQ7_Menu"> 
           <ie:menuitem type="option" text="Minimize" onmenuclick="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" id="MSOMenu_Minimize" title="Collapse this web part."> </ie:menuitem> 
           <ie:menuitem type="option" text="Restore" onmenuclick="javascript:MSOLayout_MinimizeRestore(MenuWebPart)" id="MSOMenu_Restore" title="Expand this web part."> </ie:menuitem> 
           <ie:menuitem type="option" text="Close" onmenuclick="javascript:MSOLayout_RemoveWebPart(MenuWebPart)" id="MSOMenu_Close" title="Close this Web Part. You can still find it under closed Web Parts section in the insert ribbon. These changes will apply to all users."> </ie:menuitem> 
           <ie:menuitem type="option" text="Delete" onmenuclick="if(confirm('You are about to permanently delete this Web Part. Are you sure you want to do this?')) {MSOWebPartPage_partDeleted = MenuWebPartID;MSOWebPartPage_MenuDoPostBack('ctl00$m', MenuWebPartID + ';MSOMenu_Delete');}" iconsrc="/_layouts/images/DelItem.gif" id="MSOMenu_Delete" title="Delete this Web Part from the page. These changes will apply to all users."> </ie:menuitem> 
           <ie:menuitem type="separator"></ie:menuitem> 
           <ie:menuitem type="option" text="Edit Web Part" onmenuclick="javascript:MSOTlPn_ShowToolPane2Wrapper('Edit', 16, MenuWebPartID)" iconsrc="/_layouts/images/EditItem.gif" id="MSOMenu_Edit" title="Change properties of this shared Web Part. These changes will apply to all users."> </ie:menuitem> 
           <ie:menuitem type="option" text="Connections" onmenuclick="" id="MSOMenu_Connections" title="Show connections options for this Web Part. These changes will apply to all users."> </ie:menuitem> 
           <ie:menuitem type="separator"></ie:menuitem> 
           <ie:menuitem type="option" text="Export..." onmenuclick="javascript:MSOWebPartPage_ExportCheckWarning('\u002fsites\u002fdermres\u002f_vti_bin\u002fexportwp.aspx?pageurl=http\u00253A\u00252F\u00252Fdermdev2\u00253A80\u00252Fsites\u00252Fdermres\u00252FSitePages\u00252FHome\u00252Easpx\u0026guidstring='+ escape(MenuWebPartID), MenuWebPart.getAttribute('HasPers') == 'true')" id="MSOMenu_Export" title="Export this Web Part. These changes will apply to all users."> </ie:menuitem> 
           <ie:menuitem style="display:none" type="option" text="Help" onmenuclick="MSOWebPartPage_SetNewWindowLocation(MenuWebPart.getAttribute('helpLink'), MenuWebPart.getAttribute('helpMode'))" iconsrc="/_layouts/images/HelpIcon.gif" id="MSOMenu_Help"> </ie:menuitem> 
          </menu> 
          </span> 
          <div onmouseover="this.className='ms-WPMenuDivHover'" onmouseout="this.className='ms-WPMenuDiv'" class="ms-WPMenuDiv"><a menuid="WebPartWPQ7_Menu" onfocus="UpdateWebPartMenuFocus(this, 'ms-wpselectlinkfocus', 'ms-WPEditTextVisible');" onblur="UpdateWebPartMenuFocus(this, 'ms-wpselectlink', 'ms-WPEditText');" class="ms-wpselectlink" title="Latest News! Web Part Menu" href="#" onkeydown="WebPartMenuKeyboardClick(document.getElementById('WebPartWPQ7_MenuLink'), 13, 40, event)" id="WebPartWPQ7_MenuLink" onclick="OpenWebPartMenuFromLink('WebPartWPQ7_Menu', this, 'WebPartWPQ7','False'); return false;"><img style="border-width:0px;" alt="Latest News! Web Part Menu" src="/_layouts/images/wpmenuarrow.png" class="ms-WPHeaderMenuImg"></a></div></td> 
          <td class="ms-WPHeaderTdSelection"><span class="ms-WPHeaderTdSelSpan"> 
          <input type="checkbox" onclick="TrapMenuClick(event); return false;" onmouseup="WpCbxSelect(event); return false;" onkeyup="WpCbxKeyHandler(event);" onfocus="this.className='ms-WPHeaderCbxVisible'" onblur="this.className='ms-WPHeaderCbxHidden'" title="Select or deselect Latest News! Web Part" class="ms-WPHeaderCbxHidden" id="SelectionCbxWebPartWPQ7"> 
          </span></td> 
          <td align="left" class="ms-wpTdSpace">&nbsp;</td> 
         </tr> 
         </tbody> 
        </table></td> 
       </tr> 
       <tr> 
        <td valign="top" class=""><div style="" allowdelete="false" allowremove="false" class="ms-WPBody noindex ms-wpContentDivSpace" width="100%" id="WebPartWPQ7" haspers="false" webpartid2="5b3f0d13-9a94-4cb5-8d0b-09bcd8a3bfe4" webpartid="4925e295-451f-4c05-8411-a3d05fbed1c1"> 
         <table cellspacing="0" cellpadding="0" border="0" width="100%"> 
         <tbody> 
          <tr> 
          <td><div style="padding-top:5px;" id="rssFeedWPDiv_ctl00_m_g_5b3f0d13_9a94_4cb5_8d0b_09bcd8a3bfe4"> 
           <table cellspacing="0" cellpadding="0" border="0" width="100%"> 
            <tbody> 
            <tr> 
             <td><!--?xml version="1.0" encoding="utf-8"?--> 
             <div xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:rssfeed="urn:schemas-microsoft-com:sharepoint:RSSAggregatorWebPart" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rss1="http://purl.org/rss/1.0/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom2="http://purl.org/atom/ns#" class="slm-layout-main"> 
              <div class="item link-item"><a href="javascript:ToggleItemDescription('g_5b3f0d13_9a94_4cb5_8d0b_09bcd8a3bfe41')">Happy Hippos!</a> 
              <div align="left" style="display:block; text-align:left;" class="description" id="g_5b3f0d13_9a94_4cb5_8d0b_09bcd8a3bfe41">Friday, January 20, 2012 
               - 
               <div class="postDescription"><b></b> 
               <div class="ExternalClass7307B3207C5F4D249548C7AF6EAFC3D5"> 
                <p class="postImage">&#8203;<img style="margin:5px;width:233px;height:178px" src="*******Can't show this link*******News/Lists/Photos/HappyHippo.JPG" alt="HappyHippo.JPG"></p> 
                <p>Happy Hippos!</p> 
                <p>Vestibulum ante ip<span style="text-decoration:underline">sum primis in faucibus orci luctus et ultrices pos</span>uere 
                cubilia Curae; Aliquam ac lorem nisi. Aliquam vitae lacus sapien. Nam 
                ornare, tellus id tristique <strong>elementum, ipsum velit gravida elit, vitae 
                condimentum neque ante tincidunt est. Nulla facilisi. Sed</strong> pulvinar neque 
                vitae dolor pretium gravida. Pellentesque habitant morbi tristique 
                senectus et netus et malesuada fames ac turpis egestas.&nbsp;</p> 
                <p>writing more.......................<br> 
                <br> 
                </p> 
               </div> 
               </div> 
               <div class="postCategory"><b>Posted In:</b> <a href="*******Can't show this link*******_layouts/listform.aspx?PageType=4&amp;ListId={E1ED84A3-3668-4A94-B5A8-4F8EE21F6759}&amp;ID=6&amp;RootFolder=*">Announcements</a>; <a href="*******Can't show this link*******_layouts/listform.aspx?PageType=4&amp;ListId={E1ED84A3-3668-4A94-B5A8-4F8EE21F6759}&amp;ID=5&amp;RootFolder=*">Current Issues</a>; <a href="*******Can't show this link*******_layouts/listform.aspx?PageType=4&amp;ListId={E1ED84A3-3668-4A94-B5A8-4F8EE21F6759}&amp;ID=7&amp;RootFolder=*">Lastest News</a>; <a href="*******Can't show this link*******_layouts/listform.aspx?PageType=4&amp;ListId={E1ED84A3-3668-4A94-B5A8-4F8EE21F6759}&amp;ID=4&amp;RootFolder=*">What's New?</a></div> 
               <div></div> 
               <div class="description"><a href="*******Can't show this link*******Lists/Posts/ViewPost.aspx?ID=7">More...</a></div> 
              </div> 
              </div> 
             </div></td> 
            </tr> 
            </tbody> 
           </table> 
           </div></td> 
          </tr> 
         </tbody> 
         </table> 
        </div></td> 
       </tr> 
       </tbody> 
      </table></td> 
     </tr> 
     </tbody> 
    </table> 
    </div> 
    <div style="display:none" id="vid_5b3f0d13-9a94-4cb5-8d0b-09bcd8a3bfe4"></div> 
</div> 
</body> 
</html> 
+0

그런데이 코드는 Sharepoint 2010의 RSS 뷰어 XSL 코드 – Davis

답변

0

콘텐츠의 HTML 표현이 즉석에서 XSLT 프로세서에 대한 고유 정보에 의해 생성 될 것이다 (주로 rssaggwrt:MakeSafe 부에 작동하는 피드 내용의). 브라우저가

  • 는 RSS 피드 콘텐츠를 포함하는 가장 안쪽 html 요소에 XSLT 작전을 적용 페이지를 렌더링 할 수

    • : 구성 또는 확장 라이브러리로 조정할 수없는 경우 당신은 같은 전략을 수행해야 할 수도 있습니다. 이것은 콘텐츠를 serialize하는 것 (예 : jquery 속성 innerHTML 사용), 콘텐츠를 유효한 xml로 정규화하고, 다시 파싱하는 것입니다. 당신은 단지 원래 스타일 시트의 출력에 작동하는 JQuery와 핸들러와 떨어져 아마 더 좋을 것 같아 클래스와 DOM 요소에 주석을하고자하는 경우
    • 는 변환 출력

    원래 DOM 하위 트리를 교체합니다.

  • +0

    에서 제공 한 코드에서 예제를 제공 할 수 있습니까? – Davis

    +0

    @ user952851 : 이렇게하려면 xslt 출력의 샘플 페이지 나 ids/클래스를 추가 할 내용의 HTML 표현에 대한 구두 정보가 필요합니다. – collapsar

    +0

    확인 게시물을 업데이트했습니다. 이 일을 도와 주셔서 감사합니다. XSL이 내 가장 강한 영역이 아닙니다. – Davis