I've got a problem with a XSLT code in SharePoint 2010. I'm not very expierienced with XSLT, but I think, I am able to read the code. From the SharePoint query I got this XML code:
<Result>
<id>2</id>
<workid>160</workid>
<rank>67119018</rank>
<title>Angebot.pdf</title>
<author_multival>User, Name</author_multival>
<author>User, Name</author>
<size>440631</size>
<url>http://ift.tt/1vyKqya;
<urlEncoded>http%3A%2F%2Fportal%2Eurl%2Ede%2Fsites%2FIT%2FProjects%2FAngebot%2Epdf</urlEncoded>
<description></description>
<write>21.03.2014</write>
<sitename>http://ift.tt/1EQhRfF;
<collapsingstatus>0</collapsingstatus>
<hithighlightedsummary>User, Name <ddd /> <c0>SharePoint</c0>:Z-Drive <ddd /> Costs</hithighlightedsummary>
<hithighlightedproperties>
<HHTitle>Angebot.pdf</HHTitle>
<HHUrl>http://ift.tt/1vyKnT4;
</hithighlightedproperties>
<contentclass>STS_ListItem_DocumentLibrary</contentclass>
<isdocument>True</isdocument>
<picturethumbnailurl></picturethumbnailurl>
<serverredirectedurl></serverredirectedurl>
<sharepoint-invalid>False</sharepoint-invalid>
<fileextension_multival>PDF</fileextension_multival>
<fileextension>PDF</fileextension>
<ows_metadatafacetinfo>Projectx0020Name|Project Name|o3PIYhfa0kOegAKxi60qtQ==|S7ZoMTb2ikCAhuSFlC+sGA==|#43318cf9-39f5-461c-a4d0-bd2653612092|SharePoint:Z-Drive;#Projectx0020Documentx0020Category0|Project Document Category|o3PIYhfa0kOegAKxi60qtQ==|zRewJpp710mnJ0bWknAb2Q==|#d8f09524-a0dc-4324-97c3-1d566e4af75f|Costs;#</ows_metadatafacetinfo>
<popularsocialtags />
<imageurl imageurldescription="">/_layouts/images/pdf16.gif</imageurl>
Now I need to check the value of
<sharepoint-invalid>False</sharepoint-invalid>
in XSLT. I tried the following code, but it won't work. I don't know how to check the boolean values correctly, because in the search is always "Valid" displayed.
Here is my XSLT code:
<xsl:choose>
<xsl:when test="$SharePoint-Invalid = 'True'">
<span style="color:#EF1317;font-weight:bold;">Invalid</span>
</xsl:when>
<xsl:otherwise>
<span style="color:#199039;font-weight:bold;">Valid</span>
</xsl:otherwise> </xsl:choose>
Can anyone help? Thanks in advance.
No comments:
Post a Comment