Home RSS 2.0 ATOM 1.0  CDF  
 
CodeSegment - Carlos Segura Sanz (blog)
 

With csegRollUp v3 you can use both namespaces in the xml stylesheet.

This example use msxsl namespace with a c# script function to transform a date in a month name:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
     xmlns:msxsl="urn:schemas-microsoft-com:xslt"
     xmlns:utils="urn:script-items">
 
<msxsl:script language="C#" implements-prefix="utils">
     <![CDATA[
     public string GetMonth(string sDate)
     {      
        if (sDate.Length > 0)
            {
           string[] monthNames = {null , "January" , "February" , "March" , "April", "May",
                      "June", "July", "August", "September", "October",
                      "November", "December"};
 
           DateTime d = DateTime.Parse(sDate);
           return monthNames[d.Month];
        }
        else 
            return "(Empty)";
     }
     ]]>
</msxsl:script>
 
<xsl:output method="html" encoding="utf-8" />
 
<xsl:template match="/Rows/Row">
    <li/><b><xsl:value-of select="Title" /></b> - <xsl:value-of select="utils:GetMonth(Fecha)" /><br/>
</xsl:template>
 
</xsl:stylesheet> 

Link with more info XSLT Stylesheet Scripting using <msxsl:script>

This example use exslt distinct function to show only rows with distinct values

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:set="http://exslt.org/sets" exclude-result-prefixes="set">
    <xsl:output method="html" encoding="utf-8" />
    <xsl:template match="/">
         <xsl:for-each select="set:distinct(Row/Estado)">
            <xsl:value-of select="." /><br/>   
         </xsl:for-each>
    </xsl:template>
</xsl:stylesheet>

You can find more information about exslt in exslt.org and Mvp-xml

Tuesday, November 29, 2005 9:46:52 AM (Hora estándar romance, UTC+01:00)   #    Comments [1]   csegRollUp  | 

La Semana:

- Son of SmartPart v1.0 is here! El magnifico webpart de Jan ahora para ASP.NET 2.0 con su Quickstart  y un buen artículo sobre como crear webparts con SmartPart y Visual Web Developer

- Un articulo de Arpan Shah's para ir preparandonos para el nuevo Office 12

- Para ir conociendo el nuevo Office 12 en Office Letter este articulo que examina la beta 1

- Y una cosita más a destacar, via Andrew Connell un gestor de servicios para el SQL 2005 que microsoft olvido. Podeís descargarlo aquí.

Saturday, November 26, 2005 7:19:07 PM (Hora estándar romance, UTC+01:00)   #    Comments [0]   SharePoint-es  | 

I have a site with some document libraries to store documentation based in multiple templates, to save each template in the correct folder, I have created a custom list thats contains the name of the template, the template and the folder where documents created with this tempalte must be stored.

Name - text - Template name

Template - hyperlink - The link to the template file

Folder - text - Folder where  the document must be stored (site based path)

In the site main page I have a custom view (frontpage data viewer) of the list, that I have modified to open the template with a link and at the same time redirect this to the correct folder. The result is impressive. Now I can use so many templates and libraries as I want. The modified part of dvwp

<TD Class="{$IDARYQJD}">
 <xsl:variable name="Field" select="@Template"/>
 <xsl:choose>
    <xsl:when test="substring-before(@Template, ', ')=''">
       <xsl:value-of select="substring-after(@Template, ', ')"/>
    </xsl:when>
    <xsl:otherwise>
       <A HREF="{@Folder}" onclick="OpenTemplateInFolder('{substring-before(@Template, ', ')}','{@Folder}');">
          <xsl:choose>
             <xsl:when test="substring-after(@Template, ', ')=''">
                <xsl:value-of disable-output-escaping="no" select="substring-before(@Template, ', ')"/>
             </xsl:when>
             <xsl:otherwise>
                <xsl:value-of select="substring-after(@Template, ', ')"/>
             </xsl:otherwise>
          </xsl:choose>
       </A>
    </xsl:otherwise>
 </xsl:choose>
</TD>

At the end of page I have introduced this small script thats get the template full path and the save path, I'm getting the path of site from context (ctx) and using the createNewDocumentWithProgId from ows.js.

<script>
function OpenTemplateInFolder(sTemplateWithFullPath,sSavePath)
{
    sTemplate = unescapeProperly(sTemplateWithFullPath);
    sSave = unescapeProperlyInternal(ctx.HttpRoot+'/'+sSavePath);
    createNewDocumentWithProgID(sTemplate, sSave, 'SharePoint.OpenDocuments', false);
}
</script>

Thursday, November 24, 2005 8:18:54 PM (Hora estándar romance, UTC+01:00)   #    Comments [2]   SharePoint  | 

Finally csegRollUp v3 is here, first I want to give to thanks to all beta testers and and special thanks to Florian Rossmark and Dor Rotman.

- New features

- Examples (using csegRollUp consumer and provider interfaces)

  - Lists - As in previous versions, List of comma delimited values that signify the sites and lists
Format: /site/subsite:ListName, /site/subsite/subsite:ListName

- Fields - As in previous versions, List of comma delimited values with the field names
Format: Title,Text,Comment,User

- Include List Data  (new) - If enabled the result xml data contains special fields

<_ListTitle/>   <!-- List Title -->
<_ListUrl/>     <!-- Url to default view -->
<_SiteTitle/>   <!-- Site title -->
<_SiteUrl/>     <!-- Url to site -->
<_ItemID/>      <!-- Item ID -->
<_ItemUrl/>     <!-- Url to list item view -->


- List in all subsites - If enabled the webpart will search these lists in all the subsites of a lower level, and show the results

- XSL - XSL to render the result (new this release supports exslt extensions)

- Debug XML - If checked you can view the collected xml data.

- Fix Lookups (new) - If enabled lookup fields thats contains key;#data are replaced only by data.

- CAML Query (new) - The caml query to retrieve items on each list.

Special values that you can use on queries:

    [Login] - the logged user
    [UserName] - the complete user name
    [UserID] - the user ID
    [Now] - the current date and time
    [Now+x] - the current date and time + x days
    [Now-x] - the current date and time  - x days

    [CellProvider] - the cell provide from other webpart

- CAML Query Row Limit (new) - The limit for the number of items returned in the query.

- Query recursive (new) - If enabled the makes the query recursive (search in subfoldes for documents libraries)

- Query Moderator (new) - If enabled you can check approval status.

- Debug query (new) - If checked you can view the result query.

Also I want to say that the offers that I had for my webparts, they have not been the sufficiently good thing. The license usage is as always free for no commercial usage. Contact with me first for other usages.

  csegRollUpV3.zip (76,54 KB)

Tuesday, November 22, 2005 12:12:52 AM (Hora estándar romance, UTC+01:00)   #    Comments [17]   csegRollUp | SharePoint  | 

La semana:

- Windows Desktop Search - enabled for the enterprise (habrá que verlo)

- James Milne SPStatus beta - gran utilidad para comprobar que todos los enlaces están al da.

- VS2005 con proyectos de VS2003 - Via Jon Galloway

- Sin duda de gran utilidad este webpart de Victor Vogelpoel (Makaw) para realizar seguimientos/rastreos usando system.diagnostic desde un webpart y que el resultado salga en otro webpart. Me ha encantado.

- Por último un webpart de Tony Bierman, un rollup para listados en areas dentro del portal. (voy a probarlo enseguida)

Saturday, November 19, 2005 7:03:01 PM (Hora estándar romance, UTC+01:00)   #    Comments [0]   SharePoint-es  | 

Buff, In the last two days I have received two offers to sell my new webpart csegRollUp (and others), at the moment I must think a little that I must do.

In any case the people who have received the beta will obtain the final product.

Thanks a lot to all.

Tuesday, November 15, 2005 8:15:25 PM (Hora estándar romance, UTC+01:00)   #    Comments [0]    | 

I am finishing csegRollUp v3, at the moment some examples.... 

1.- Using csegRollUp cell consumer interface.

Show all documents inside of a document library where Title contains data provider from other webpart.

 

Lists: Shared Documents
Fields: ID, LinkFilename,EncodedAbsUrl,Modified,DocIcon,FileRef,Author,Title

CAML query

   1:  <Where>
   2:     <Contains>
   3:        <FieldRef Name='Title' />
   4:        <Value Type='Text'>[CellProvider]</Value>
   5:     </Contains>
   6:  </Where>

Recursive: enabled

XSLT

   1:  <?xml version='1.0' encoding='utf-8'?>
   2:  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   3:     <xsl:output method="html" />
   4:     <xsl:template match="/">
   5:        <table class="ms-summarycustombody">
   6:           <tbody>
   7:              <xsl:for-each select="Rows/Row">
   8:                 <xsl:sort select="Modified" order="descending" />
   9:                 <tr>
  10:                    <td>
  11:                       <img src="/_layouts/images/ic{DocIcon}.gif" />
  12:                    </td>
  13:   
  14:                    <td width="75%">
  15:                       <a href="{EncodedAbsUrl}">
  16:                          <xsl:value-of select="LinkFilename" />
  17:                       </a>
  18:                    </td>
  19:                 </tr>
  20:              </xsl:for-each>
  21:           </tbody>
  22:        </table>
  23:     </xsl:template>
  24:  </xsl:stylesheet>

2.- Using csegRollUp cell provider interface

With the same data, the XSL contains a __doPostBack used to provide a cell value.

XSLT

   1:  <?xml version='1.0' encoding='utf-8'?>
   2:  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   3:     <xsl:output method="html" />
   4:     <xsl:template match="/">
   5:        <table class="ms-summarycustombody">
   6:           <tbody>
   7:              <xsl:for-each select="Rows/Row">
   8:                 <xsl:sort select="Modified" order="descending" />
   9:                 <tr>
  10:                    <td>
  11:                       <img src="/_layouts/images/ic{DocIcon}.gif" />
  12:                    </td>
  13:                    <td width="75%">
  14:                       <a href="javascript:__doPostBack('','{LinkFilename}')">
  15:                          <xsl:value-of select="LinkFilename" />
  16:                       </a>
  17:                    </td>
  18:                 </tr>
  19:              </xsl:for-each>
  20:           </tbody>
  21:        </table>
  22:     </xsl:template>
  23:  </xsl:stylesheet>

3.- Finally csegRollUp as provider and consumer and csegRollUp as consumer the BIG ONE...

The first webpart for text entry, the second one locate documents thats contains the text entry in the title. The last webpart shows information about of file clicked in webpart 2.

XSL from webpart 2 (csegRollUp v3 RC1 as Consumer and Provider)

   1:  <?xml version='1.0' encoding='utf-8'?>
   2:  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   3:     <xsl:output method="html" />
   4:     <xsl:template match="/">
   5:        <table class="ms-summarycustombody">
   6:           <tbody>
   7:              <xsl:for-each select="Rows/Row">
   8:                 <xsl:sort select="Modified" order="descending" />
   9:                 <tr>
  10:                    <td>
  11:                       <img src="/_layouts/images/ic{DocIcon}.gif" />
  12:                    </td>
  13:                    <td width="75%">
  14:                       <a href="javascript:__doPostBack('','{ID}')">
  15:                          <xsl:value-of select="LinkFilename" />
  16:                       </a>
  17:                    </td>
  18:                 </tr>
  19:              </xsl:for-each>
  20:           </tbody>
  21:        </table>
  22:     </xsl:template>
  23:  </xsl:stylesheet>

CAML Query in webpart 3 (csegRollUp v3 RC1 as Consumer)

   1:  <Where>
   2:     <Eq>
   3:        <FieldRef Name="ID" />
   4:        <Value Type='Numeric'>[CellProvider]</Value>
   5:     </Eq>
   6:  </Where>

XSL in webpart 3

   1:  <?xml version='1.0' encoding='utf-8'?>
   2:  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   3:     <xsl:output method="html" />
   4:     <xsl:template match="/">
   5:        <xsl:for-each select="Rows/Row">File Details 
   6:        <table class="ms-summarycustombody">
   7:           <tbody>
   8:              <tr>
   9:                 <td>Icon</td>
  10:                 <td>
  11:                    <img src="/_layouts/images/ic{DocIcon}.gif" />
  12:                 </td>
  13:              </tr>
  14:              <tr>
  15:                 <td>File Name</td>
  16:                 <td>
  17:                    <xsl:value-of select="LinkFilename" />
  18:                 </td>
  19:              </tr>
  20:              <tr>
  21:                 <td>Author</td>
  22:                 <td>
  23:                    <xsl:value-of select="Author" />
  24:                 </td>
  25:              </tr>
  26:              <tr>
  27:                 <td>Modified</td>
  28:                 <td>
  29:                    <xsl:value-of select="Modified" />
  30:                 </td>
  31:              </tr>
  32:           </tbody>
  33:        </table>
  34:        </xsl:for-each>
  35:     </xsl:template>
  36:  </xsl:stylesheet>

4.- Using csegRollUp as ComboBox Provider

This is great ... Render a combo with data from tasks list and provide the selected to another webpart

List: Tasks

Fields: ID, Title

XSLT

   1:  <?xml version='1.0' encoding='utf-8'?>
   2:  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   3:  <xsl:output method="html"/>
   4:  <xsl:template match="/">
   5:         <SCRIPT>
   6:         function combo_onchange(oSelect) {  
   7:                if(oSelect.selectedIndex != -1)  
   8:              __doPostBack('',oSelect.options[oSelect.selectedIndex].text);  
   9:         }  
  10:         </SCRIPT>
  11:         <select name="combo" onchange="javascript:combo_onchange(this)">
  12:          <xsl:for-each select="Rows/Row">
  13:               <option value="{ID}"><xsl:value-of select="Title"/></option>    
  14:          </xsl:for-each>
  15:          </select>
  16:       </xsl:template>
  17:  </xsl:stylesheet>

Today it is the first birthday of my daughter. Happy Birthday Patricia.

Saturday, November 12, 2005 9:17:10 AM (Hora estándar romance, UTC+01:00)   #    Comments [2]   csegRollUp | SharePoint  | 

Hace unos días necesitaba bloquear un campo en una lista de sharepoint, esto se puede hacer modificando las páginas newform.aspx y editform.aspx y añadiendo un pequeño script.

   1:  <script defer>
   2:  // tomar el campo y bloquearlo
   3:  var fld_anotacion = frm.FieldPost(frm.FindField("Anotaci_x00f3_n"));
   4:  fld_anotacion.readOnly = true;
   5:  // poner el foco en el campo descripcion
   6:  frm.FindField("Descripci_x00f3_n").FieldFocus();
   7:  </script>

En este caso en concreto, el campo bloqueado se rellena desde un nuevo formulario (una copia de editform.aspx que he modificado para albergar una nueva zona de webparts y dentro de esta he añadido un data viewer webpart) este formulario se utiliza para rellenar el campo que con los formularios iniciales se encuentra bloqueado.

He modificado el xslt del data viewer webpart de manera que cuando se hace click sobre uno de los enlaces el valor pasa al formulario.

   1:  <a href="javascript:Anotacion('{@Valor}')">
   2:  <xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(string(@Valor))"/>
   3:  </a>
El xslt usa la función "Anotacion" que es la que se encarga de pasar el valor seleccionado al formulario.

   1:  <script>
   2:  function Anotacion(valor)
   3:  {
   4:    var frm = this.frm
   5:    var fld_anotacion = frm.FieldPost(frm.FindField("Anotaci_x00f3_n"));
   6:   
   7:    fld_anotacion.readOnly = false;
   8:   
   9:    if ((valor != null))
  10:    {
  11:      fld_anotacion.value = unescape(valor);
  12:    }
  13:   
  14:    fld_anotacion.readOnly = true;
  15:   
  16:    frm.FindField("Descripci_x00f3_n").FieldFocus();
  17:  }
  18:  </script>

Recuperamos el campo, lo desbloqueamos (en este también esta bloqueado para evitar que se rellene a mano)  y si el valor no es nulo lo coloca en el formulario.

Thursday, November 10, 2005 7:58:52 PM (Hora estándar romance, UTC+01:00)   #    Comments [1]   SharePoint-es  | 

Al igual que otros usuarios de SharePoint, en su día me encontré con la limitación que tienen las búsquedas de SharePoint. Por ello desarrolle el csegSearchWebPart, añadiendo funcionalidad extra a las búsquedas del portal.

Como referencia tome Google, ya que es considerado “el mejor buscador del mundo”.

Estos días he pensando en ello, y he llegado algunas conclusiones interesantes.

Goggle tiene tres grandes rasgos que otros buscadores no tienen:

·         Cantidad de documentos indexados. (8.000 millones)
·         Flexibilidad en las búsquedas.
·         Motor de indexación / búsqueda distribuido.

Y un gran característica que lo diferencia de los demás buscadores

·         Sistema de puntuación de páginas (PageRank)

Sin duda esta diferencia es por la que es considerado el mejor buscador del mundo.

Ahora bien, mi pregunta es la siguiente ¿es efectivo un sistema como PageRank para buscar documentos en la empresa? Personalmente creo que no, ya que la documentación almacenada carece de la estructura de vínculos de la cual esta dotada Internet.

Entonces, suprimiendo esa característica de Google y comparándolo con el motor de búsqueda de SharePoint ¿Qué tenemos?

Google

SharePoint

8.000 millones de urls

Los documentos de la empresa (los documentos que me interesan)

Flexibilidad en las búsquedas

Flexibilidad con csegSearch

Motor de indexación / búsqueda distribuido

Motor de indexación / búsqueda distribuido

Bueno, tengo un mini google …

Bien, después de esta pequeña reflexión, y de comprobar que tenemos un buscador tan bueno, ¿Por qué siempre encontrar lo que queremos nos lleva tanto tiempo?, ¿cuantas veces cambiamos por termino medio las palabras de búsqueda para dar con lo que queremos?, en mi caso lo he comprobado y lo he medido (soy un tío raro que le voy hacer) como termino medio en Google modifico 3,5 veces los términos de la búsqueda hasta dar con el resultado que deseo y generalmente desecho los resultados que figuran a partir de la tercera pantalla, como tengo configurado Google para mostrar 25 resultados por hoja, a partir del resultado 75 desecho toda la información que Google me devuelve. (¿Será por los 8.000 millones de páginas?)

Los resultados que nos son devueltos en ambos buscadores  son aquellos que cumplen los criterios de búsqueda que hemos especificado, el modo más usado, el de teclear una frase o conjunto de palabras, nos devuelve todas aquellas páginas que contienen dichos términos. Bien, los dos hacen lo que le pedimos.

Entonces si no encontramos lo que buscamos, es debido a que no hemos introducido todos términos, es decir, no hemos refinado lo suficiente la búsqueda y debido a la generalidad de los términos hemos encontrado más de lo que queríamos, así que refinamos una y otra vez, añadiendo frases exactas, palabras sueltas o eliminando algún término.

Este procedimiento simple de refinamiento nos permite concretar más los resultados, pero en el ámbito empresarial es un poco más complejo. Me explicaré. Por lo general algunos de los términos pueden ser muy frecuentes ya que la terminología empleada en una empresa no suele ser muy amplia piense en un simple “Informe de Ventas” ó en un “Plan de Marketing”.

SharePoint cuenta con un sistema llamado “Probabilistic relevance scoring” (Okapi), puntuación de relevancia por probabilidades, de manera que aunque un documento contenga las mismas palabras que otro, uno aparecerá en primer lugar y otro en segundo lugar, en función del número de veces que aparece un término y el lugar en el que aparece.

Peso

Medida

Motivo

Frecuencia en los documentos

El número de documentos que contienen un determinado termino sobre el total de documentos.
 

Es más probable que se busquen términos ya refinados, es decir que figuran en menos documentos.

Frecuencia del Termino

El número de apariciones de un término dentro del documento.
 

El documento que contiene más veces el término es más importante que en el que aparece menos veces.

Tamaño del documento.

El tamaño del documento.

Un término que aparece el mismo número de veces en un documento grande y en uno pequeño, hace suponer que es más importante para el documento pequeño.

Posición del Termino

La posición del término en el documento, por ejemplo si el término está en el título.
 

Si un termino figura en el título es que es importante por lo tanto aparecerá en el ranking antes de que lo haga el que no lo tiene.

Sin duda parece lógico. Examinando el webpart de los resultados de la búsqueda podemos observar el sistema de puntuación

"DAV:contentclass":0,
"urn:schemas.microsoft.com:fulltextqueryinfo:description":0,
"urn:schemas.microsoft.com:fulltextqueryinfo:sourcegroup":0,
"urn:schemas.microsoft.com:fulltextqueryinfo:cataloggroup":0,
"urn:schemas-microsoft-com:office:office#Keywords":1.0,
"urn:schemas-microsoft-com:office:office#Title":0.9,
"DAV:displayname":0.9,
"urn:schemas-microsoft-com:publishing:Category":0.8,
"urn:schemas-microsoft-com:office:office#Subject":0.8,
"urn:schemas-microsoft-com:office:office#Author":0.7,
"urn:schemas-microsoft-com:office:office#Description":0.5,
"urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName":0.2,
"urn:schemas-microsoft-com:publishing:HomeBestBetKeywords":0.0,
contents:0.1,*:0.05

Por si alguien no se ha fijado hay que tener en cuenta que a excepción del “DAV:displayname”, el resto de datos puntuados forman parte del esquema “urn:schemas-microsoft-com:office:office#”, como la gran mayoría no rellena estas propiedades en sus documento de office, estas generalmente son ignoradas.

¿A donde nos lleva todo esto?

Bueno, tanto PageRank como Okapi, son sistemas validos, cada uno en su ámbito, (he omitido aquí algunas cosas que tiene también SharePoint como los metadatos de los que hablaré otro día).

Esto nos lleva a la idea que he tenido en mente durante la última semana, ¿Cuál sería la manera más adecuada de recuperar información empresarial?.

Para ello he ideado un programa llamado “SiPaBu”, SIstema PAranoico de BUsqueda que realiza sucesivas búsquedas sobre SharePoint a través del servicio de búsqueda (osease usando “search.asmx”), el programa con la ayuda del parser que escribí para csegSearch, busca los términos que le pedimos limitando la búsqueda a 10 resultados (cuestión de pruebas), para cada uno de los resultados mostrados busca a su vez 10 resultados usando el nombre del archivo encontrado en primera instancia ó la descripción del mismo.

Existen también otras posibilidades de búsqueda como :

  • “generalizarla por fechas”, generalizar es decir cambiar los nexos “and” por “near” y acotar los resultados usando las fechas en que se produjo el primer documento. Por que es lógico pensar que puede haber documentos donde se hable de esos mismos términos en unas fechas determinadas.
  • “generalizarla por autor”, igual que la anterior, usando el autor del primer documento, La persona que escribió el primer documento pude referirse a ese mismo tema en otros.
  • “generalizarla por sitio”, usando el sitio
  • Etc…

Por el momento es sorprendente el resultado, y aún tengo que pulir muchas cosas, es un experimento,  pero seguro que existen patrones que permitan mejorar los resultados de las búsquedas. Ale otro entretenimiento más.

Monday, November 07, 2005 9:57:27 PM (Hora estándar romance, UTC+01:00)   #    Comments [0]   NET Development | SharePoint-es  | 

This last long weekend I'm playing with spqery to show recurrent events from one of my lists after spent too many hours and the only think I have got are frustrations.

The query.ViewAttributes, with RecurrenceRowset='TRUE' or with ModerationType='Moderator' modifiers are ignored totally.

My sample query for recurrence without results :  (RecurrenceRowset='TRUE')

   1:  <Where>
   2:    <DateRangesOverlap>
   3:      <FieldRef Name="EventDate" />
   4:      <FieldRef Name="EndDate" />
   5:      <FieldRef Name="RecurrenceID" />
   6:      <Value Type="DateTime">
   7:        <Now />
   8:      </Value>
   9:    </DateRangesOverlap>
  10:  </Where>

Today trying get the pending documents: (ModerationType='Moderator')

   1:  <Where>
   2:    <Eq>
   3:      <FieldRef Name="_ModerationStatus" />
   4:      <Value Type="Integer">0</Value>
   5:    </Eq>
   6:  </Where>

After read the wsssdk, there is only a example with "ModerationType" is in "SPModerationInformation" class

   1:  if (!docLibrary.IsCatalog && docLibrary.EnableModeration == true)
   2:  {
   3:     SPQuery allItemsQuery = new SPQuery();
   4:   
   5:     allItemsQuery.ViewAttributes = "ModerationType='Moderator'";
   6:   
   7:     SPListItemCollection docLibItems = docLibrary.GetItems(allItemsQuery);
   8:   
   9:     foreach (SPListItem docLibItem in docLibItems)
  10:     {
  11:         if (docLibItem.ModerationInformation.Status == SPModerationStatusType.Pending)
  12:         {
  13:             Response.Write(site.Url + "/" + docLibItem.File.Url);
  14:         }
  15:     }
  16:  }

 

In the sdk help the entry "View Element" dont refer to ModerationType, but this has at least reference to "RecurrentRowset". At the moment I think that the two cases require hand prog, the first one using a parser to get data from "RecurrenceData" and the second one at is said the sdk example.

Update: Thanks to Stephen Muller tip in "Using the _ModerationStatus field in CAML" of course for Spanish is Aprobado, Pendiente and Denegado.

 

Wednesday, November 02, 2005 10:58:45 PM (Hora estándar romance, UTC+01:00)   #    Comments [0]   SharePoint  | 


Copyright © 2008 Carlos Segura. All rights reserved.