Monday, March 26, 2012

Labels

The labels are the function to create calculated field to ensure that important information about the document is included when it is printed, For example to insert the SharePoint Version Number. Setup an Information Management Policy on the Document library that enables Labels.

Define a Label:


Note: To enable versioning on this library: Go to Document Library > Settings > Versioning settings and choose "Create major and minor (draft) Versions Example: 1.0, 1.1, 1.2, and 2.0".
  1. Create a new Information Management Policy on the Document Library, if you have multiple Content Types select the Content Type where Version Numbers have been requested (The Default Content Type for a Document Library is Document). Go To Document Library > Settings > Information Management Policy Settings > Define Policy.
  2. There is a possibility to define it in the Content type level from the content type and not from the library.
  3. Define a new policy, check "Enable Labels". Do NOT check the "prompt users to insert a label before saving" or "printing or prevent changes to labels after they are added".
  4. Label format: Insert the following: “Version: {Version}”.  Note: {Version} is the field that will display the Version number.
  5. Modify the "Appearance" settings as necessary to design the label and Click "Refresh" to preview.
  6. Click "OK" to save.
Create a New Document
  1. Open Office Word document from the current library.
  2. In the Word Document, click the "insert" tab in the ribbon, then click "Quick Parts" in the "Text" button group. Under "Document Properties" click on "Label" to insert your SharePoint label as an Image.
  3. Save the Document, and close.
  4. Reopen the Document and you should see the label change to the actual SharePoint Version number of the Document.
  5. Now you can save it as template and for this content type.

Wednesday, March 14, 2012

Unique Item

If we have a list with items which one of the columns can be the same, like this for example:
Offices
Location
Office 1
Israel
Office 2
Italy
Office 3
Israel

And we need to select a distinct item from this list in a DVWP. Add this row to your dvt_1.body
<xsl:for-each select="$Rows[not(@Location = preceding-sibling::*/@Location)]">
This will check the preceding sibling if it has the same name, if true it won’t display that item if it is already exists.
For example:
1.   <xsl:template name=dvt_1.body>  
2.     <xsl:param name=Rows/>  
3.     <xsl:for-each select=$Rows[not(@Location = preceding-sibling::*/@Location)]>  
4.       <xsl:call-template name=dvt_1.rowview” />  
5.     </xsl:for-each>  
6.   </xsl:template>  

Substring In DVWP

If we have column with link in the code, like this for example:
<xsl:value-of select=”@Title” />
But in the page it looks like this:
30;#Dolev
We need to set in the code to take only the string after the #. So we will write:
<xsl:value-of select=”{substring-after(@Title,’;#’)}” />.
As same as if it reversed: Dolev#;21 – we will write:
<xsl:value-of select=”{substring-before(@Title,’#;’)}” />.

Format Date

If we want to filter DVWP to: Created Date > Today, we need to format the Created and format the Today().  In addition we need to “tell” the DVWP that the string is number. So it will look like this in the XPath editor:
[(number(ddwrt:FormatDateTime(ddwrt:FormatDate(string(@Created),1033,1),1033,’ddMMyyyy’))= number(ddwrt:FormatDateTime(ddwrt:FormatDate(string(ddwrt:Today()),1033,1),1033, ’ddMMyyyy’)))]
@Created The selected column.
'ddMMyyyy' The selected format of date (29/07/1989 -> 29071989)

In this XPath code we have to format both of them so they will be able to communicate with each other.

By this format of ddwrt:FormatDate(@Created),1033,’ddMMyyyy’) you can format the date to be as you wish. For example:
ddMMyyyy – 29071989
dd/mm/yy – 29/07/89
dd MMM yyyy – 29 Jul 1989
dd, MMMM – MM, yyyy – 29, July – 07, 1989

CAML

CAML (Collaborative Application Markup Language) is an XML based markup language used with the family of Microsoft SharePoint technologies. Each markup will start with <View> tag. The classes are:
<View>
 <Query>
  <Where> - Used to specify a filter.
   <And> - Group filters in a query for view. Contain only two filters, if we want to add another we need to wrap both of the element with another <And> element.
   <Or> - Group filters in a query. Contain only two filters, if we want to add another we need to wrap both of the element with another <Or> element.
    <BeginsWith> - Searches for a string at the start of a column that holds Text or Note field type values.
    <Contains> - Searches for a string anywhere within a column that holds Text or Note field type values.
    <DateRangesOverlap> - Used in queries to compare the dates in a recurring event with a specified Date Time value, to determine whether they overlap.
    <Eq> - Arithmetic operator that means "equal to" and is used within a query.
    <Geq> - Arithmetic operator that means "greater than or equal to".
    <Gt> - Arithmetic operator that means "greater than".
    <In> - Specifies whether the value of a list item for the field specified by the FieldRef element is equal to one of the values specified by the Values element.
    <Includes> - If the specified field is a Lookup field that allows multiple values, specifies that the Value element is included in the list item for the field that is specified by the FieldRef element.
    <IsNotNull> - return items that are not empty (Null).
    <IsNull> - return items that are empty (Null).
    <Leq> - Arithmetic operator that means "less than or equal to”.
    <Lt> - Arithmetic operator that means "less than".
    <Neq> -  Arithmetic operator that means "not equal to".
    <NotIncludes> - If the specified field is a Lookup field that allows multiple values, specifies that the Value element is excluded from the list item for the field that is specified by the FieldRef element.

1.       There are two elements for ordering:
<OrderBy> - Determines the sort order for a query. Ordering by defining the elements  “Override” (Optional Boolean) and “UseIndexForOrderBy” (Optional Boolean). For example:
<OrderBy  Override = "TRUE" | "FALSE"  UseIndexForOrderBy = "TRUE" | "FALSE">
  <FieldRef
    Ascending = "TRUE" | "FALSE"
    Name = "Text" />
    ...
</OrderBy>
<GroupBy> - Contains a Group By section for grouping the data returned through a query in a list view .Grouping by defining the element “Collapse”, Optional Boolean. TRUE, for the Group By section in the list view to be collapsed by default. For example:
<GroupBy
  Collapse = "TRUE" | "FALSE">
  <FieldRef Name = "FieldName"/>
</GroupBy>
If we want to group by content type:
<Where>
 <Eq>
  <FieldRef Name='ContentType'/>
  <Value Type='Text'>{ContentTypeName}</Value>
 </Eq>
</Where>
2.       For example, if we want to create a list view that will show us the Title field and the Name field, sort by ID field, and filtered by (Field1 >= 1500) or (field2 <= 500), it will look like this:
<View>
 <Query>
  <OrderBy>
   <FieldRef Name='ID'/>
  </OrderBy>
  <Where>
   <Or>
    <Geq>
     <FieldRef Name='Field1'/>
     <Value Type='Number'>1500</Value>
    </Geq>
    <Leq>
     <FieldRef Name='Field2'/>
     <Value Type='Number'>500</Value>
    </Leq>
   </Or>
  </Where>
 </Query>
 <ViewFields>
  <FieldRef Name='Title'/>
  <FieldRef Name='Name'/>
 </ViewFields>
 <RowLimit>10</RowLimit>
</View>

3.       As I mentioned before about the limit of the <And> and <Or> tags. If we want three filters we will add another <And> / <Or> tag. For example, this is the regular script:
<And>
 <Leq>
 </Leq>
 <Geq>
 <Geq>
</And>
But if we want three, it will look like this:
<And>
 <And>
  <Leq>
  </Leq>
  <Geq>
  <Geq>
 </And>
 <And>
  <Contains>
  </Contains>
 </And>
</And>

Cleaning XSLT Data View Web Part

SharePoint, as default, gives a lot of parameters to be rander in the XSL code.
After creating a new DVWP, we can clean the DVWP from unwanted parameters and functions, and convert it from <table> to <div> tags to be designed.
As for a start the XSL code can be at least 178 rows that we can remove and to be 31 rows tops. Sounds better and look better. The least rows we have, the faster the page will load.
There are many options and functions we can remove from the code that SharePoint Designer creates by default in a DVWP:
  • Creating a new Data View from “Empty Data View” (by the “Data View” button) – when creating a new Data View, SPD will generate the web part with parameters and the values already in the code. By creating an empty one, you will control most of the values and parameters to be added.
  • “Display all items” option (in the “Paging button), will remove some of the code.
  • <xsl:when test="($ManualRefresh = 'True')"> - This function builds a table with “Refreshing” option. In many DVWP we don’t use it – so we can erase this.
  • <xsl:call-template name="dvt_1.empty"/> and <xsl:template name="dvt_1.empty"> - Empty template
  • “ms-alternating” class function – there is a function to design all of the rows which divided by 2. When designing a web part with styles and classes there is no need for it because we are overwriting it with our styles.
  • <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"> - the automode is a function is used to switch modes, usually between display and edit.
1.  <XSL>
2.  <xsl:stylesheet xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
3.   <xsl:output method="html" indent="no"/>
4.   <xsl:decimal-format NaN=""/>
5.   <xsl:param name="dvt_apos">'</xsl:param>
6.   <xsl:param name="ManualRefresh"></xsl:param>
7.   <xsl:param name="dvt_firstrow">1</xsl:param>
8.   <xsl:param name="dvt_nextpagedata" />
9.   <xsl:variable name="dvt_1_automode">0</xsl:variable>
10.  <xsl:template match="/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"   xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
11.
This function builds a table with “Refreshing” option. In many DVWP we don’t use it – so we can erase this.
  <xsl:choose>

12.    <xsl:when test="($ManualRefresh = 'True')">
13.     <table width="100%" border="0" cellpadding="0" cellspacing="0">
14.      <tr>
15.       <td valign="top">
16.        <xsl:call-template name="dvt_1"/>
17.       </td>
18.       <td width="1%" class="ms-vb" valign="top">
19.        <img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh"
20. border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}"
21. alt="Click here to refresh the dataview."/>
22.       </td>
23.     </tr>
24.    </table>
25.   </xsl:when>
26.   <xsl:otherwise>
27.    <xsl:call-template name="dvt_1"/>
28.   </xsl:otherwise>
29.  </xsl:choose>
30. </xsl:template>
31.  
32. <xsl:template name="dvt_1">
33. <xsl:variable name="dvt_StyleName">Table</xsl:variable>
34. <xsl:variable name="Rows" select=”Data Source”/>
35. <xsl:variable name="dvt_RowCount" select="count($Rows)"/>
36. <xsl:variable name="RowLimit" select="10" />
37. <xsl:variable name="FirstRow" select="$dvt_firstrow" />
38.
This function is testing if there are items to display – if there are, it will run the dvt_1.empty. If not, it will run the dvt_1.body. Because we don’t use the function Empty and the table header, so we can erase the Yellow part and leave the “Call” to dvt_1.body.
<xsl:variable name="LastRow">

39. <xsl:choose>
40. <xsl:when test="($FirstRow + $RowLimit - 1) > $dvt_RowCount">
41. <xsl:value-of select="$dvt_RowCount" />
42. </xsl:when>
43. <xsl:otherwise>
44. <xsl:value-of select="$FirstRow + $RowLimit - 1" />
45. </xsl:otherwise>
46. </xsl:choose>
47. </xsl:variable>
48. <xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
49. <xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
50.  
51. <xsl:choose>
52. <xsl:when test="$dvt_IsEmpty">
53. <xsl:call-template name="dvt_1.empty"/>
54. </xsl:when>
55. <xsl:otherwise>
56. <table border="0" width="100%" cellpadding="2" cellspacing="0">
57. <tr valign="top">
58. <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
59. <th class="ms-vh" width="1%" nowrap="nowrap"></th>
60. </xsl:if>
61. <th class="ms-vh" nowrap="nowrap">ows_Title</th>
62. </tr>
63. <xsl:call-template name="dvt_1.body">
64. <xsl:with-param name="Rows" select="$Rows[position() >= $FirstRow and
65. position() <= $LastRow]"/>
66. <xsl:with-param name="FirstRow" select="1" />
67. <xsl:with-param name="LastRow" select="$dvt_RowCount" />
68. </xsl:call-template>
69. </table>
70. </xsl:otherwise>
71. </xsl:choose>
72. <xsl:call-template name="dvt_1.commandfooter">
73. <xsl:with-param name="FirstRow" select="$FirstRow" />
74. <xsl:with-param name="LastRow" select="$LastRow" />
75. <xsl:with-param name="RowLimit" select="$RowLimit" />
76. <xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
77. <xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" />
78. </xsl:call-template>
79. </xsl:template>
80. <xsl:template name="dvt_1.body">
81. <xsl:param name="Rows"/>
82. <xsl:param name="FirstRow" />
83. <xsl:param name="LastRow" />
84. <xsl:for-each select="$Rows">
85. <xsl:variable name="dvt_KeepItemsTogether" select="false()" />
86. <xsl:variable name="dvt_HideGroupDetail" select="false()" />
87. <xsl:if test="(position() >= $FirstRow and position() <= $LastRow) or
88. $dvt_KeepItemsTogether">
89. <xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
90. <xsl:call-template name="dvt_1.rowview" />
91. </xsl:if>
92.
This test is testing if there is more than one item. If true it will give the second item another class (ms-alternating) to make it look good.
</xsl:if>
93. </xsl:for-each>
94. </xsl:template>
95. <xsl:template name="dvt_1.rowview">
96. <tr>
97. <xsl:if test="position() mod 2 = 1">
98. <xsl:attribute name="class">ms-alternating</xsl:attribute>
99.
This is checking once again for the value of $dvt_1_automode. If it is enabled, the contained table detail cell is rendered. Even Marc D Anderson is not sure, but we erase it.
</xsl:if>
100.          <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
101.          <td class="ms-vb" width="1%" nowrap="nowrap">
102.          <span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)"
103.          ddwrt:ammode="view"></span>
104.          </td>
105.          </xsl:if>
106.         
This is where we enter the values to display
<td class="ms-vb">
107.          <xsl:value-of select="@ows_Title"/>
108.          </td>
109.          </tr>
110.          </xsl:template>
111.          <xsl:template name="dvt_1.empty">
112.          <xsl:variable name="dvt_ViewEmptyText">There are no items to show in this
113.         
This is where we define the parameters for the Empty Template.
view.</xsl:variable>
114.          <table border="0" width="100%">
115.          <tr>
116.          <td class="ms-vb">
117.          <xsl:value-of select="$dvt_ViewEmptyText"/>
118.          </td>
119.          </tr>
120.          </table>
121.          </xsl:template>
122.           
123.         
This is the Command footer and the navigation templates. If we don’t want paging with “Next” and “Previous” options, you can erase it.
<xsl:template name="dvt_1.commandfooter">
124.          <xsl:param name="FirstRow" />
125.          <xsl:param name="LastRow" />
126.          <xsl:param name="RowLimit" />
127.          <xsl:param name="dvt_RowCount" />
128.          <xsl:param name="RealLastRow" />
129.          <table cellspacing="0" cellpadding="4" border="0" width="100%">
130.          <tr>
131.          <xsl:if test="$FirstRow > 1 or $LastRow < $dvt_RowCount">
132.          <xsl:call-template name="dvt_1.navigation">
133.          <xsl:with-param name="FirstRow" select="$FirstRow" />
134.          <xsl:with-param name="LastRow" select="$LastRow" />
135.          <xsl:with-param name="RowLimit" select="$RowLimit" />
136.          <xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" />
137.          <xsl:with-param name="RealLastRow" select="$RealLastRow" />
138.          </xsl:call-template>
139.          </xsl:if>
140.          </tr>
141.          </table>
142.          </xsl:template>
143.          <xsl:template name="dvt_1.navigation">
144.          <xsl:param name="FirstRow" />
145.          <xsl:param name="LastRow" />
146.          <xsl:param name="RowLimit" />
147.          <xsl:param name="dvt_RowCount" />
148.          <xsl:param name="RealLastRow" />
149.          <xsl:variable name="PrevRow">
150.          <xsl:choose>
151.          <xsl:when test="$FirstRow - $RowLimit < 1">1</xsl:when>
152.          <xsl:otherwise>
153.          <xsl:value-of select="$FirstRow - $RowLimit" />
154.          </xsl:otherwise>
155.          </xsl:choose>
156.          </xsl:variable>
157.          <xsl:variable name="LastRowValue">
158.          <xsl:choose>
159.          <xsl:when test="$LastRow > $RealLastRow">
160.          <xsl:value-of select="$LastRow"></xsl:value-of>
161.          </xsl:when>
162.          <xsl:otherwise>
163.          <xsl:value-of select="$RealLastRow"></xsl:value-of>
164.          </xsl:otherwise>
165.          </xsl:choose>
166.          </xsl:variable>
167.          <xsl:variable name="NextRow">
168.          <xsl:value-of select="$LastRowValue + 1"></xsl:value-of>
169.          </xsl:variable>
170.          <td nowrap="nowrap" class="ms-paging" align="right">
171.          <xsl:if test="$dvt_firstrow > 1" ddwrt:cf_ignore="1">
172.          <a>
173.          <xsl:attribute name="href">javascript:
174.          <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1}')" />
175.          ;
176.          </xsl:attribute>
177.          Start</a>
178.          <xsl:text disable-output-escaping="yes" ddwrt:nbsp
179.          preserve="yes">&nbsp;</xsl:text>
180.          <a>
181.          <xsl:attribute name="href">javascript:
182.          <xsl:value-of
183.          select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$PrevRow,'}'))”/>
184.          ;</xsl:attribute>
185.          <img src="/_layouts/images/prev.gif" border="0" alt="Previous" />
186.          </a>
187.          <xsl:text disable-output-escaping="yes" ddwrt:nbsp-
188.          preserve="yes">&nbsp;</xsl:text>
189.          </xsl:if>
190.          <xsl:value-of select="$FirstRow" />
191.          <xsl:value-of select="$LastRowValue" />
192.          <xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">&nbsp;</xsl:text>
193.           
194.          <xsl:if test="$LastRowValue < $dvt_RowCount or string length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1">
195.          <a>
196.          <xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'}'))" />;</xsl:attribute>
197.          <img src="/_layouts/images/next.gif" border="0" alt="Next" />
198.          </a>
199.          </xsl:if>
200.          </td>

201.          </xsl:template>

202.          </xsl:stylesheet></XSL>
Pretty big code, and with a lot unused decelerated functions. But after we clean it, it looks like this:
1.  <XSL><xsl:stylesheet xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
2.  <xsl:output method="html" indent="no"/>
3.  <xsl:decimal-format NaN=""/>
4.  <xsl:param name="dvt_apos">'</xsl:param>
5.  <xsl:param name="dvt_firstrow">1</xsl:param>
6.  <xsl:param name="dvt_nextpagedata" />
7.  <xsl:template match="/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
8.  <xsl:call-template name="dvt_1"/>
9.  </xsl:template>
10.  
11. <xsl:template name="dvt_1">
12. <xsl:variable name="dvt_StyleName">Table</xsl:variable>
13. <xsl:variable name="Rows" select=”Data Source”/>
14. <xsl:variable name="dvt_RowCount" select="count($Rows)"/>
15. <xsl:variable name="RowLimit" select="10" />
16. <xsl:variable name="FirstRow" select="$dvt_firstrow" />
17. <xsl:variable name="LastRow">
18. <xsl:choose>
19. <xsl:when test="($FirstRow + $RowLimit - 1) > $dvt_RowCount">
20. <xsl:value-of select="$dvt_RowCount" />
21. </xsl:when>
22. <xsl:otherwise>
23. <xsl:value-of select="$FirstRow + $RowLimit - 1" />
24. </xsl:otherwise>
25. </xsl:choose>
26. </xsl:variable>
27. <div>
28. <xsl:call-template name="dvt_1.body">
29. <xsl:with-param name="Rows" select="$Rows[position() >= $FirstRow and
30. position() <= $LastRow]"/>
31. <xsl:with-param name="FirstRow" select="1" />
32. <xsl:with-param name="LastRow" select="$dvt_RowCount" />
33. </xsl:call-template>
34. </div>
35. </xsl:template>
36. <xsl:template name="dvt_1.body">
37. <xsl:param name="Rows"/>
38. <xsl:param name="FirstRow" />
39. <xsl:param name="LastRow" />
40. <xsl:for-each select="$Rows">
41. <xsl:variable name="dvt_KeepItemsTogether" select="false()" />
42. <xsl:variable name="dvt_HideGroupDetail" select="false()" />
43. <xsl:if test="(position() >= $FirstRow and position() <= $LastRow) or
44. $dvt_KeepItemsTogether">
45. <xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1">
46. <xsl:call-template name="dvt_1.rowview" />
47. </xsl:if>
48. </xsl:if>
49. </xsl:for-each>
50. </xsl:template>
51. <xsl:template name="dvt_1.rowview">
52. <div>
53. <xsl:value-of select="@Title"/>
54. </div>
55. </xsl:template>
</xsl:stylesheet></XSL>
Now, the only thing have left is to insert out classes and styles and the DVWP is ready.
Good Luck!