Skip to content

Instantly share code, notes, and snippets.

@spdustin
Last active August 29, 2015 14:18
Show Gist options
  • Save spdustin/d5b59e76a09c5ba510dc to your computer and use it in GitHub Desktop.
Save spdustin/d5b59e76a09c5ba510dc to your computer and use it in GitHub Desktop.
Announcements Sample
<dsQueryResponse>
<Rows>
<Row ID="1"
Title="Get Started with Microsoft SharePoint Foundation!"
Body="&lt;div class=&quot;ExternalClass7879AECA66014FDDB85450C1221CBCC4&quot;&gt;Microsoft SharePoint Foundation helps you to be more effective by connecting people, information, and documents. For information on getting started, see Help.&lt;/div&gt;"
Group="Group B"/>
<Row ID="2"
Title="Second announcement."
Body="&lt;div class=&quot;ExternalClass8297C2B34D8E4E958D2A0413F85229BC&quot;&gt;Bummer, there was already one there, so I couldn't claim &lt;strong&gt;FIRSTIES!&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;​&lt;/p&gt;&lt;/div&gt;"
Group="Group A"/>
<Row ID="3"
Title="Third"
Body="&lt;div class=&quot;ExternalClass7654F84804454ABFAF7EE95EC25CB53F&quot;&gt;Announcements like this are getting boring, eh?&lt;br /&gt;&lt;p&gt;​&lt;/p&gt;&lt;/div&gt;"
Group="Group B"/>
<Row ID="4"
Title="Another"
Body="&lt;div class=&quot;ExternalClass4ED5EA550300454CB7FB4FE0ECF3C4C8&quot;&gt;&lt;p&gt;announcement&lt;/p&gt;&lt;/div&gt;"
Group="Group A"/>
</Rows>
</dsQueryResponse>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
<!-- This is the actual wrapper element that will be emitted -->
<div>
<ul>
<!-- This will tell the data view to look for the actual content
and come back when it's done. -->
<xsl:apply-templates/>
</ul>
</div>
<!-- end wrapper -->
</xsl:template>
<xsl:template match="/dsQueryResponse/Rows/Row">
<!-- This markup is used for each item in the list -->
<li id="item-{@ID}">
<xsl:value-of select="@Title"/>
</li>
</xsl:template>
</xsl:stylesheet>
@spdustin
Copy link
Author

spdustin commented Apr 7, 2015

Accidentally pasted the purposefully broken one earlier. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment