Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I was wondering, where I can find a list of the default xsl params available with the search core result webpart? When we use the default xsl stylesheet of the webpart, default params are defined at the beginning of the file like this:

<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" />

etc.

I will not put the entire list here. So my question is, by default, is the list of params in the default xsl is complete or are there hidden params? And more, where those params come from? Parameter Bindings (the parameter bindings property of the searchcoreresults wp seems empty by default)?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

XSL transformations in SharePoint work following way:

  1. XSLT webpart initializes XSL transformation ("XSLT webpart" can be XsltListViewWebPart, DataFormWebPart, CoreResultsWebPart, etc. - they all work the same way).
  2. During the initialization process, a list of parameters and their values is passed to some XSLT processor. The parameters list is formed by the webpart from its properties, from current context, etc. In SharePoint, all the parameters generally could be divided into two main categories: ParameterBindings (user) and Global parameters (internal).
  3. XSL transformation runs, executing the provided XSLT code
  4. XSLT code grabs needed parameters by their name, using <xsl:param> tag.
  5. Parameters referenced and used in the XSLT code, in XPath expressions

I hope the process is much more clear for you now.

So the answer to your question is possibly yes: there could be some hidden internal parameters, which aren't referenced in XSLT code. Only Reflector can tell precisely.

share|improve this answer
    
Strange that Microsoft is not communicating more on this type of information. It could be useful to have a clear and precise list of parameters available trough xsl. –  Win Jan 9 '12 at 10:32
1  
They have some documentations and examples of how to deal with CoreResultsWebPart XSLT, for example have a look at this article: msdn.microsoft.com/en-us/library/ms562390(office.12).aspx –  Andrey Markeev Jan 9 '12 at 10:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.