쉐어포인트 2010에서 검색페이지의 디자인을 많이 바꾸게 되는데요..
검색결과 웹 파트의 XSL을 변경하여 디자인을 수정하게 될 것입니다.
XSL 편집을 위해서는 Xml Data가 필요한데요.. 검색 시 나오는 결과 페이지에 Xml 확인하는 방법입니다.
MSDN의 페이지를 참조한 것이며 URL은 아래와 같습니다.
방법은 아래와 같습니다.
Xsl 코드는 아래와 같습니다.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>
확인 후 페이지 저장을 선택하시면 아래와 같이 확인 할 수 있습니다.
<All_Results>
<Result>
<id>1</id>
<workid>426</workid>
<rank>73866856</rank>
<title>test</title>
<author></author>
<size>0</size>
<url>http://ae-dev/Lists/test/AllItems.aspx</url>
<urlEncoded>http%3A%2F%2Fae%2Ddev%2FLists%2Ftest%2FAllItems%2Easpx</urlEncoded>
<description></description>
<write>9/20/2011</write>
<sitename>http://ae-dev/Lists/test</sitename>
<collapsingstatus>0</collapsingstatus>
<hithighlightedsummary>DiscussionBoard <ddd /> Site Actions <ddd /> This page location is: <ddd /> Roos <ddd /> Subject <ddd /> I Like It <ddd /> Tags & Notes <ddd /> Top Link Bar <ddd /> my page <ddd /> Quick Launch <ddd /> Libraries <ddd /> Site Pages <ddd /> Shared Documents <ddd /> Lists <ddd /> Calendar <ddd /> Tasks <ddd /> Discussions <ddd /> Team <ddd /> All <ddd /> </hithighlightedsummary>
<hithighlightedproperties>
<HHTitle>
<c0>test</c0>
</HHTitle>
<HHUrl>http://ae-dev/Lists/<c0>test</c0>/AllItems.aspx</HHUrl>
</hithighlightedproperties>
<contentclass>STS_List_DiscussionBoard</contentclass>
<isdocument>False</isdocument>
<picturethumbnailurl></picturethumbnailurl>
<popularsocialtags />
<picturewidth>0</picturewidth>
<pictureheight>0</pictureheight>
<datepicturetaken></datepicturetaken>
<serverredirectedurl></serverredirectedurl>
<fileextension>ASPX</fileextension>
<ows_metadatafacetinfo></ows_metadatafacetinfo>
<imageurl imageurldescription="토론 게시판">/_layouts/images/itdisc.png</imageurl>
</Result>
<Result>
<id>2</id>
<workid>263</workid>
<rank>72043116</rank>
<title>Roos</title>
<author></author>
<size>104863</size>
<url>http://ae-dev</url>
<urlEncoded>http%3A%2F%2Fae%2Ddev</urlEncoded>
<description>Roots</description>
<write>9/7/2012</write>
<sitename>http://ae-dev</sitename>
<collapsingstatus>0</collapsingstatus>
<hithighlightedsummary>
<c0>test</c0> <ddd /> Add a new image, change this welcome text or add new lists to this page by clicking the edit button above. You can click on Shared Documents to add files or on the calendar to <ddd /> </hithighlightedsummary>
<hithighlightedproperties>
<HHTitle>Roos</HHTitle>
<HHUrl>http://ae-dev</HHUrl>
</hithighlightedproperties>
<contentclass>STS_Site</contentclass>
<isdocument>False</isdocument>
<picturethumbnailurl></picturethumbnailurl>
<popularsocialtags />
<picturewidth>0</picturewidth>
<pictureheight>0</pictureheight>
<datepicturetaken></datepicturetaken>
<serverredirectedurl></serverredirectedurl>
<fileextension></fileextension>
<ows_metadatafacetinfo></ows_metadatafacetinfo>
<imageurl imageurldescription="SharePoint 사이트 모음">/_layouts/images/siteicon_16x16.png</imageurl>
</Result>
<TotalResults>2800</TotalResults>
<NumberOfResults>50</NumberOfResults>
</All_Results>
화면 출력은 아래와 같습니다.
아울러 검색 결과 디자인을 위해서는 아래 XSL을 수정하시면 됩니다.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:srwrt="http://schemas.microsoft.com/WebParts/v3/searchresults/runtime"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">
<xsl:output method="xml" indent="no"/>
<xsl:param name="Keyword" />
<xsl:param name="ResultsBy" />
<xsl:param name="ViewByUrl" />
<xsl:param name="ShowDropDown" />
<xsl:param name="ViewByValue" />
<xsl:param name="SortBy" />
<xsl:param name="SortOptions" />
<xsl:param name="Relevancy" />
<xsl:param name="ModifiedDate" />
<xsl:param name="DropDownOption" />
<xsl:param name="Multiply" />
<xsl:param name="PictureTaken" />
<xsl:param name="IsNoKeyword" />
<xsl:param name="IsFixedQuery" />
<xsl:param name="ShowActionLinks" />
<xsl:param name="MoreResultsText" />
<xsl:param name="MoreResultsLink" />
<xsl:param name="CollapsingStatusLink" />
<xsl:param name="CollapseDuplicatesText" />
<xsl:param name="AlertMeLink" />
<xsl:param name="AlertMeText" />
<xsl:param name="SrchRSSText" />
<xsl:param name="SrchRSSLink" />
<xsl:param name="SearchProviderText" />
<xsl:param name="SearchProviderLink" />
<xsl:param name="SearchProviderAlt"/>
<xsl:param name="ShowMessage" />
<xsl:param name="IsThisListScope" />
<xsl:param name="DisplayDiscoveredDefinition" select="True" />
<xsl:param name="NoFixedQuery" />
<xsl:param name="NoKeyword" />
<xsl:param name="ResultsNotFound" />
<xsl:param name="NoResultsSuggestion" />
<xsl:param name="NoResultsSuggestion1" />
<xsl:param name="NoResultsSuggestion2" />
<xsl:param name="NoResultsSuggestion3" />
<xsl:param name="NoResultsSuggestion4" />
<xsl:param name="NoResultsSuggestion5" />
<xsl:param name="AdditionalResources" />
<xsl:param name="AdditionalResources1" />
<xsl:param name="AdditionalResources2" />
<xsl:param name="IsSearchServer" />
<xsl:param name="Period" />
<xsl:param name="SearchHelp" />
<xsl:param name="Tags" />
<xsl:param name="Authors" />
<xsl:param name="Date" />
<xsl:param name="Size" />
<xsl:param name="ViewInBrowser" />
<xsl:param name="DefinitionIntro" />
<xsl:param name="IdPrefix" />
<xsl:param name="LangPickerHeading" />
<xsl:param name="LangPickerNodeSet" />
<xsl:param name="IsDesignMode">True</xsl:param>
<!-- When there is keywory to issue the search -->
<xsl:template name="dvt_1.noKeyword">
<span class="srch-description2">
<xsl:choose>
<xsl:when test="$IsFixedQuery">
<xsl:value-of select="$NoFixedQuery" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$NoKeyword" />
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:template>
<!-- When empty result set is returned from search -->
<xsl:template name="dvt_1.empty">
<div class="srch-results">
<xsl:if test="$AlertMeLink and $ShowActionLinks">
<span class="srch-alertme" > <a href ="{$AlertMeLink}" id="CSR_AM1" title="{$AlertMeText}"><img style="vertical-align: middle;" src="/_layouts/images/bell.gif" alt="" border="0"/><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text><xsl:value-of select="$AlertMeText" /></a>
</span>
</xsl:if>
<xsl:if test="string-length($SrchRSSLink) > 0 and $ShowActionLinks">
<xsl:if test="$AlertMeLink">
|
</xsl:if>
<a type="application/rss+xml" href ="{$SrchRSSLink}" title="{$SrchRSSText}" id="SRCHRSSL"><img style="vertical-align: middle;" border="0" src="/_layouts/images/rss.gif" alt=""/><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text><xsl:value-of select="$SrchRSSText"/></a>
<xsl:if test="string-length($SearchProviderLink) > 0">
|
<a href ="{$SearchProviderLink}" title="{$SearchProviderText}" ><img style="vertical-align: middle;" border="0" src="/_layouts/images/searchfolder.png" alt=""/><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text><xsl:value-of select="$SearchProviderText"/></a>
</xsl:if>
</xsl:if>
</div>
<div class="srch-results" accesskey="W">
<span class="srch-description2" id="CSR_NO_RESULTS">
<p>
<xsl:value-of select="$ResultsNotFound" />
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
<strong><xsl:value-of select="$Keyword" /></strong>
<xsl:value-of select="$Period" />
</p>
<h3>
<xsl:value-of select="$NoResultsSuggestion" />
</h3>
<ul>
<li><xsl:value-of select="$NoResultsSuggestion1" /></li>
<li><xsl:value-of select="$NoResultsSuggestion2" /></li>
<li><xsl:value-of select="$NoResultsSuggestion3" /></li>
<xsl:if test="string-length($NoResultsSuggestion4) > 0">
<li><xsl:value-of select="$NoResultsSuggestion4" /></li>
</xsl:if>
<xsl:if test="string-length($NoResultsSuggestion5) > 0">
<li><xsl:value-of select="$NoResultsSuggestion5" /></li>
</xsl:if>
</ul>
<h3>
<xsl:value-of select="$AdditionalResources" />
</h3>
<ul>
<li><xsl:value-of select="$AdditionalResources1" /><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
<xsl:choose>
<xsl:when test="string-length($IsSearchServer) > 0">
<a href="javascript:HelpWindowKey('MSSEndUser_FindContent')" label="$SearchHelp"><xsl:value-of select="$SearchHelp" /></a>
</xsl:when>
<xsl:otherwise>
<a href="javascript:HelpWindowKey('WSSEndUser_FindContent')" label="$SearchHelp"><xsl:value-of select="$SearchHelp" /></a>
</xsl:otherwise>
</xsl:choose>
</li>
<li><xsl:value-of select="$AdditionalResources2" /></li>
</ul>
</span>
</div>
</xsl:template>
<!-- Main body template. Sets the Results view (Relevance or date) options -->
<xsl:template name="dvt_1.body">
<xsl:if test="$ShowActionLinks">
<div class="srch-sort-right2" accesskey="W">
<xsl:if test="$LangPickerNodeSet and count($LangPickerNodeSet) > 0">
<xsl:value-of select="$LangPickerHeading"/>
<select class="srch-dropdown" onchange="window.location.href=this.value" id="langpickerdd">
<xsl:for-each select="$LangPickerNodeSet">
<xsl:element name="option">
<xsl:attribute name="value"><xsl:value-of select="@url"/></xsl:attribute>
<xsl:if test="@selected = 'true'">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="@title"/>
</xsl:element>
</xsl:for-each>
</select>
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:if>
<xsl:if test="$ShowDropDown = 'true'">
<xsl:value-of select="$SortBy" />
<select id="dropdown" title="{$SortOptions}" onchange="PostToUrl(this.value)" class="srch-dropdown">
<xsl:if test="$DropDownOption = '0' or $ViewByUrl != ''">
<xsl:element name="option">
<xsl:attribute name="value"><xsl:value-of select="$ViewByUrl"/></xsl:attribute>
<xsl:if test="$DropDownOption = '0'"><xsl:attribute
name="selected">selected</xsl:attribute></xsl:if>
<xsl:value-of select="$Relevancy"/>
</xsl:element>
</xsl:if>
<xsl:if test="$DropDownOption = '1' or $ViewByUrl != ''">
<xsl:element name="option">
<xsl:attribute name="value"><xsl:value-of select="$ViewByUrl"/></xsl:attribute>
<xsl:if test="$DropDownOption = '1'"><xsl:attribute
name="selected">selected</xsl:attribute></xsl:if>
<xsl:value-of select="$ModifiedDate"/>
</xsl:element>
</xsl:if>
</select>
</xsl:if>
<xsl:if test="$AlertMeLink">
<xsl:if test="$ShowDropDown = 'true'">
</xsl:if>
<span class="srch-alertme" > <a href ="{$AlertMeLink}" id="CSR_AM2" title="{$AlertMeText}"><img style="vertical-align: middle;" src="/_layouts/images/bell.gif" alt="" border="0"/></a><xsl:text disable-output-escaping="yes"> </xsl:text>
</span>
</xsl:if>
<xsl:if test="string-length($SrchRSSLink) > 0">
<a type="application/rss+xml" href ="{$SrchRSSLink}" title="{$SrchRSSText}" id="SRCHRSSL"><img style="vertical-align: middle;" border="0" src="/_layouts/images/rss.gif" alt=""/></a><xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:if>
<xsl:if test="string-length($SearchProviderLink) > 0">
<a href ="{$SearchProviderLink}" title="{$SearchProviderAlt}" ><img style="vertical-align: middle;" border="0" src="/_layouts/images/searchfolder.png" alt=""/></a>
</xsl:if>
</div>
</xsl:if>
<div class="srch-results" accesskey="W">
<xsl:apply-templates />
</div>
<xsl:call-template name="DisplayMoreResultsAnchor" />
</xsl:template><!-- This template is called for each result -->
<xsl:template match="TotalResults">
</xsl:template>
<xsl:template match="NumberOfResults">
</xsl:template>
<xsl:template match="Result">
<xsl:variable name="id" select="id"/>
<xsl:variable name="currentId" select="concat($IdPrefix,$id)"/>
<xsl:variable name="url" select="url"/>
<xsl:choose>
<xsl:when test="string-length(picturethumbnailurl) > 0 and contentclass[. = 'STS_ListItem_PictureLibrary']">
<div style=" padding-top: 2px; padding-bottom: 2px;">
<div class="srch-picture1">
<img src="/_layouts/images/imageresult_16x16.png" />
</div>
<div class="srch-picture2">
<img class="srch-picture" src="{picturethumbnailurl}" alt="" />
</div>
<span><ul class="srch-picturetext">
<li class="srch-Title2 srch-Title5">
<a href="{$url}" id="{concat('CSR_',$id)}" title="{title}">
<xsl:choose>
<xsl:when test="hithighlightedproperties/HHTitle[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
</xsl:choose>
</a>
</li>
<li>
<xsl:if test="string-length(picturewidth) > 0 and string-length(pictureheight) > 0">
<xsl:value-of select="$Size" />
<xsl:value-of select="picturewidth" />
<xsl:value-of select="$Multiply" />
<xsl:value-of select="pictureheight" />
<xsl:if test="string-length(size) > 0">
<xsl:if test="number(size) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:choose>
<xsl:when test="round(size div 1024) < 1"><xsl:value-of select="size" /> Bytes</xsl:when>
<xsl:when test="round(size div (1024 *1024)) < 1"><xsl:value-of select="round(size div 1024)" />KB</xsl:when>
<xsl:otherwise><xsl:value-of select="round(size div (1024 * 1024))"/>MB</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
</xsl:if>
<xsl:if test="string-length(datepicturetaken) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:value-of select="$PictureTaken" />
<xsl:value-of select="datepicturetaken" />
</xsl:if>
<xsl:if test="string-length(author) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:value-of select="$Authors" />
<xsl:value-of select="author" />
</xsl:if>
<xsl:if test="string-length(write) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:value-of select="$Date" />
<xsl:value-of select="write" />
</xsl:if>
</li>
<li>
<span class="srch-URL2" id="{concat($currentId,'_Url')}">
<xsl:choose>
<xsl:when test="hithighlightedproperties/HHUrl[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedproperties/HHUrl" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="url"/>
</xsl:otherwise>
</xsl:choose>
</span>
</li></ul>
</span>
</div>
<div class="srch-clear">
<img alt="" src="/_layouts/images/blank.gif" />
</div>
</xsl:when>
<xsl:otherwise>
<div class="srch-Icon" id="{concat($currentId,'_Icon')}">
<img align="absmiddle" src="{imageurl}" border="0" alt="{imageurl/@imageurldescription}" />
</div>
<div class="srch-Title2">
<div class="srch-Title3">
<!-- links with the file scheme only work in ie if they are unescaped. For
this reason here we will render the link using disable-output-escaping if the url
begins with file.-->
<xsl:choose>
<xsl:when test="substring($url,1,5) = 'file:' and $IsDesignMode = 'False'">
<xsl:text disable-output-escaping="yes"><a href="</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="srwrt:HtmlAttributeEncode($url)" />
<xsl:text disable-output-escaping="yes">" id="</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="srwrt:HtmlAttributeEncode(concat($currentId,'_Title'))" />
<xsl:text disable-output-escaping="yes">" title="</xsl:text>
<xsl:value-of disable-output-escaping="yes" select="srwrt:HtmlAttributeEncode(title)" />
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:choose>
<xsl:when test="hithighlightedproperties/HHTitle[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise><xsl:value-of select="srwrt:HtmlEncode(title)"/></xsl:otherwise>
</xsl:choose>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</xsl:when>
<xsl:otherwise>
<a id="{concat($currentId,'_Title')}">
<xsl:attribute name="href">
<xsl:value-of select="$url"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="hithighlightedproperties/HHTitle[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedproperties/HHTitle" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise><xsl:value-of select="title"/></xsl:otherwise>
</xsl:choose>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<div class="srch-Description2">
<xsl:choose>
<xsl:when test="hithighlightedsummary[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedsummary" />
</xsl:call-template>
</xsl:when>
<xsl:when test="description[. != '']">
<xsl:value-of select="description"/>
</xsl:when>
<xsl:otherwise>
<img alt="" src="/_layouts/images/blank.gif" height="0" width="0"/>
</xsl:otherwise>
</xsl:choose>
</div >
<div class="srch-Metadata2">
<xsl:call-template name="DisplayAuthors">
<xsl:with-param name="author" select="author" />
</xsl:call-template>
<xsl:call-template name="DisplayDate">
<xsl:with-param name="write" select="write" />
</xsl:call-template>
<xsl:if test="string-length(popularsocialtag0) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
<xsl:value-of select="$Tags" />
<xsl:value-of select="popularsocialtag0"/>
<xsl:if test="string-length(popularsocialtag1) > 0">
::
<xsl:value-of select="popularsocialtag1"/>
</xsl:if>
<xsl:if test="string-length(popularsocialtag2) > 0">
::
<xsl:value-of select="popularsocialtag2"/>
</xsl:if>
</xsl:if>
<xsl:call-template name="DisplaySize">
<xsl:with-param name="size" select="size" />
</xsl:call-template>
<img style="display:none;" alt="" src="/_layouts/images/blank.gif"/>
</div>
<p class="srch-Metadata1">
<span><span class="srch-URL2" id="{concat($currentId,'_Url')}">
<xsl:choose>
<xsl:when test="hithighlightedproperties/HHUrl[. != '']">
<xsl:call-template name="HitHighlighting">
<xsl:with-param name="hh" select="hithighlightedproperties/HHUrl" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="url"/>
</xsl:otherwise>
</xsl:choose>
</span>
<xsl:call-template name="DisplayCollapsingStatusLink">
<xsl:with-param name="status" select="collapsingstatus"/>
<xsl:with-param name="workid" select="workid"/>
<xsl:with-param name="id" select="concat($currentId,'_CS')"/>
</xsl:call-template>
<xsl:call-template name="ViewInBrowser">
<xsl:with-param name="browserlink" select="serverredirectedurl" />
<xsl:with-param name="currentId" select="$currentId" />
</xsl:call-template>
</span>
</p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="HitHighlighting">
<xsl:param name="hh" />
<xsl:apply-templates select="$hh"/>
</xsl:template>
<xsl:template match="ddd">
…
</xsl:template>
<xsl:template match="c0">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c1">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c2">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c3">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c4">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c5">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c6">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c7">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c8">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template match="c9">
<strong><xsl:value-of select="."/></strong>
</xsl:template>
<xsl:template name="DisplayAuthors">
<xsl:param name="author" />
<xsl:if test="string-length($author) > 0">
<xsl:value-of select="$Authors" />
<xsl:choose>
<xsl:when test="string-length(author_multival) > 0">
<xsl:for-each select="author_multival">
<xsl:variable name="p" select="position()"/>
<xsl:if test="$p > 1">
<xsl:text disable-output-escaping="yes">,</xsl:text>
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:if>
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="author"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="DisplayDate">
<xsl:param name="write" />
<xsl:if test="string-length($write) > 0">
<xsl:if test="string-length(author) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:if>
<xsl:value-of select="$Date" />
<xsl:value-of select="write"/>
</xsl:if>
</xsl:template>
<!-- The size attribute for each result is prepared here -->
<xsl:template name="DisplaySize">
<xsl:param name="size" />
<xsl:if test="string-length($size) > 0">
<xsl:if test="number($size) > 0">
<xsl:if test="string-length(write) > 0 or string-length(author) > 0">
<xsl:text disable-output-escaping="yes"> </xsl:text>
</xsl:if>
<xsl:value-of select="$Size" />
<xsl:choose>
<xsl:when test="round($size div 1024) < 1"><xsl:value-of select="$size" /> Bytes</xsl:when>
<xsl:when test="round($size div (1024 *1024)) < 1"><xsl:value-of select="round($size div 1024)" />KB</xsl:when>
<xsl:otherwise><xsl:value-of select="round($size div (1024 * 1024))"/>MB</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template name="ViewInBrowser">
<xsl:param name="browserlink" />
<xsl:param name="currentId" />
<xsl:if test="string-length($browserlink) > 0">
<span class="srch-urllink"><a href="{$browserlink}" id="{concat($currentId,'_VBlink')}">
<xsl:value-of select="$ViewInBrowser" />
</a></span>
</xsl:if>
</xsl:template>
<!-- A generic template to display string with non 0 string length (used for author and lastmodified time -->
<xsl:template name="DisplayString">
<xsl:param name="str" />
<xsl:if test='string-length($str) > 0'>
-
<xsl:value-of select="$str" />
</xsl:if>
</xsl:template>
<!-- document collapsing link setup -->
<xsl:template name="DisplayCollapsingStatusLink">
<xsl:param name="status"/>
<xsl:param name="workid"/>
<xsl:param name="id"/>
<xsl:if test="$CollapsingStatusLink">
<xsl:choose>
<xsl:when test="$status=1">
<xsl:variable name="CollapsingStatusHref" select="concat(substring-before($CollapsingStatusLink, '$$COLLAPSE_PARAM$$'), 'duplicates:"', $workid, '"', substring-after($CollapsingStatusLink, '$$COLLAPSE_PARAM$$'))"/>
<span class="srch-urllink"><a href="{$CollapsingStatusHref}" id="$id" title="{$CollapseDuplicatesText}">
<xsl:value-of select="$CollapseDuplicatesText"/>
</a></span>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:template><!-- The "view more results" for fixed query -->
<xsl:template name="DisplayMoreResultsAnchor">
<xsl:if test="$MoreResultsLink">
<a href="{$MoreResultsLink}" id="{concat($IdPrefix,'_MRL')}">
<xsl:value-of select="$MoreResultsText"/>
</a>
</xsl:if>
</xsl:template>
<xsl:template match="All_Results/DiscoveredDefinitions">
<xsl:variable name="FoundIn" select="DDFoundIn" />
<xsl:variable name="DDSearchTerm" select="DDSearchTerm" />
<xsl:if test="$DisplayDiscoveredDefinition = 'True' and string-length($DDSearchTerm) > 0">
<script language="javascript">
function ToggleDefinitionSelection()
{
var selection = document.getElementById("definitionSelection");
if (selection.style.display == "none")
{
selection.style.display = "inline";
}
else
{
selection.style.display = "none";
}
}
</script>
<div class="srch-Description2 srch-definition2">
<a href="javascript:ToggleDefinitionSelection();" id="{concat($IdPrefix,'1_DEF')}" mss_definition="true">
<xsl:value-of select="$DefinitionIntro" /><strong><xsl:value-of select="$DDSearchTerm"/></strong></a>
<div id="definitionSelection" class="srch-Description2" style="display:none;">
<xsl:for-each select="DDefinitions/DDefinition">
<br/>
<xsl:variable name="DDUrl" select="DDUrl" />
<img style="display:inline" alt="" src="/_layouts/images/discovered_definitions_bullet.png" />
<xsl:value-of select="DDStart"/>
<strong>
<xsl:value-of select="DDBold"/>
</strong>
<xsl:value-of select="DDEnd"/>
<br/>
<span class="srch-definition">
<xsl:value-of select="$FoundIn"/>
<xsl:text disable-output-escaping="yes"> </xsl:text>
<a href="{$DDUrl}">
<xsl:value-of select="DDTitle"/>
</a>
</span>
</xsl:for-each>
</div>
</div>
</xsl:if>
</xsl:template>
<!-- XSL transformation starts here -->
<xsl:template match="/">
<xsl:if test="$AlertMeLink">
<input type="hidden" name="P_Query" />
<input type="hidden" name="P_LastNotificationTime" />
</xsl:if>
<xsl:choose>
<xsl:when test="$IsNoKeyword = 'True'" >
<xsl:call-template name="dvt_1.noKeyword" />
</xsl:when>
<xsl:when test="$ShowMessage = 'True'">
<xsl:call-template name="dvt_1.empty" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1.body"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- End of Stylesheet -->
</xsl:stylesheet>
이상입니다.
감사합니다.