Jan
06

XML in SharePoint Search Pt.1

This post is part of a series of notes that I’m putting together regarding XML within SharePoint. I’m afraid a bit of time has passed since Part 1 and 2 went up, so you might want to refresh yourself on those first, I know I had to!

  1. Intro and History of XML
  2. XML in SharePoint 101
  3. XML in SharePoint Search Pt. 1 (This post)

XML in SharePoint Search, Where do I find that?

One of the heaviest users of XML is the SharePoint Search centre and more to the point, the SharePoint core Search Results (including People results) web part.

For your general search results, you probably won’t need to make any changes, but it’s certainly helpful to understand why you might want to. The chance to really dig into making changes is when you get into the realms of Search Driven applications such as Search Driven Navigation, or Search driven roll-ups. Understanding the process of how to do this helps you understand how Search applies XML/XSLT to the results.

If you were lucky enough to go to the SharePoint Conference, Scott Hillier did a great session on building Search Applications that Matter, SPC393, and he covered a lot of what I’m going to talk about over the next few posts and in my SUGUK sessions in January and March. Find out if someone in your company went and get a copy of that Session video!

For this first look at XML/XSLT in search, we’re just going to understand where the various style sheets are pulled from, and what options you have when it comes to creating your own styles.

Just to set the scene, I’m using SharePoint Server Standard with the out of the box Search, NOT Fast Search. The techniques i use here could work with Foundation, but ONLY if you install Search Server Express (Which is free and works well with Foundation!)

Start at the beginning with what’s out of the box

If you install a Search centre or your activate the Search Web Parts feature in a site collection,

image

then this gives you access to web parts such as Search Summary, Search Paging and the main one that we’re interested in, Search Core Results Web Part.

If it’s not already active, Find this feature in your site collection features and turn it on, create a new page and drop a Search Core Results Web Part on it.

This is the bare minimum that you need to create a search application, although it get’s more value once you add paging and search summary to improve the user experience. The first thing to understand about the Core Search Results web part is that it works straight away out of the box without you having to do anything to the XML/XSLT. That’s because it already has a default set of columns and styling available to it from the Service Application.

To test this, add the querystring K=ContentClass:STS_ListItem to your URL.

http://sharepointaccessories/Pages/SearchPlay.aspx?k=ContentClass:STS_ListItem

This will issue a keyword query that finds all SharePoint list items. (I’ll look at keyword queries in a later post.)

To understand how these results are displayed, let’s take a look at the Web Part properties, and the Service Application management page.

Let’s open the Web Part properties first. The very first section of properties is ‘Location’, This is used to tell the Service Application ‘where’ the search results web part has been used and what results data to use when processing the search. if this is set to none, then it’s using the Localised defaults from the SharePoint root on the file system.image

The usual rules apply here and you should NOT edit these files (In fact, I haven’t been able to find them yet, so I’m assuming they’re buried in a feature file somewhere!). Instead if you want to use a custom XSLT across the whole of your site, then you can create a new Federated Location in the search service application.

image

In our case, I’m going to click on the drop down for local Search Results and choose copy. In the screen that opens up, I’m going to name it RawResults and give it a display name of “Raw Results”. Then scroll down and expand  “Display Information”, then scroll to “Core Search results Display Metadata

There are three boxes:-

  • XSL: Which contains the actually styl esheet to be applied.
  • Properties: An XML document describing what properties are to be passed in the search results
  • Sample Data: A Sample search result that I’ve never actually had cause to use.

Open the XSL box by clicking on the button to the right, and paste the following snippet of XSLT into it.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp><xsl:copy-of select="*"/></xmp>
</xsl:template>
</xsl:stylesheet>

Scroll to the bottom and click on OK. At this point, your new location will not appear right away, I’m assuming that there’s a timer job that processes this in the background, but either way, if we go back to our page with the Search WebPart and re-open the Web part properties, we can now select “Raw Results” as our location.

image

Click OK, and then take the page out of edit mode and refresh. What you’ll see appearing now is the raw XML as it is returned from the search service application to the data view web part for presentation. All our Raw Results XSLT is doing is telling the DVWP to copy the tags and contents word for word onto the screen.

image

In Summary

What I’ve shown you here is how the basic search results are placed on the page, and how out of the box SharePoint displays the results in a form that a Human can easily read and interact with. We’ve also looked at how to make an XSLT style sheet available to all Search web parts anywhere within your farm.

In the next post I’m going to show you how we can manipulate the XSLT through SharePoint Designer using local Style Libraries to achieve more targeted content delivery and we’ll start touching on using Search to deliver functionality to the end user.

Dec
07

Usergroup Sessions

After a long period of self doubt and a lot of persuasion from other speakers on the SUGUK circuit, I’ve booked my first SUGUK Speaker sessions!

I’ll be talking about using Search to answer some basic issues with regards to Cross-Site navigation, data aggregation, collaboration and People Search from an intranet perspective in a session entitled “Sift Through Search And Deliver More

The first session is to the Southampton (Southern Region User Group) on January 25th (http://suguk.org/forums/thread/27815.aspx)

And the second to Cambridge User group (East Anglian Region user Group) on March 20th (Awaiting confirming and adverts to be posted.. watch this space..)

I’m really looking forward to running these sessions, Having been involved in the background of the SUGUK it’s nice to be stepping out there and sharing some of the good fun that I’ve been having with SharePoint recently.

Paul.

Nov
02

SUGUK East Anglia, Cambridge 2nd Nov

I went to my second East Anglian chapter event of the SUGUK this evening over in Cambridge. As usual, very capably organised by Peter and Randy with some great food and drink sponsored by Peter’s company ISC Software Solutions. Microsoft User Group Services sponsored the cost of the room, and Wrox publishing provided two SharePoint 2010 books, one of which I happily won!

John Timney, our very own SUGUK North East Organiser kicked off the evening with a cracking session on Virtualizing SharePoint, including debunking some of the myths around virtualizing SQL. One of the great recommendations he showed in this was having a SQL cluster made up of a Physical Active server and a virtualised passive server. I like that idea in providing HA with lower server costs.

John also pointed out that if you’re looking at virtualizing through hyper-V, there are some great cost savings to be had if you purchase Data Center edition Windows Server 2008 for your virtual hosts as these include unlimited Server licenses for guests.

One of the other important aspects John raised was around the idea of the NUMA (None Uniform Memory Access) threshold and the need to understand how this affects your virtual infrastructure. I didn’t fully grasp it during his session and it’s something I’m going to have to have a quick read up on, however as I understood it, if you have and 8 Core server with 64Gb of memory, then the NUMA threshold is 64/8 giving 8Gb. This is the maximum memory that you could give to a virtual instance server on that host.

As I said, something to be aware of and certainly to review further to help understand.

Following a short break for Pizza and chat, Benjamin Athawes (@benjaminathawes) proceeded to give us his views on 10 ways to avoid common mistakes in SharePoint Administration. This was brought about he said by seeing the same questions being raised time and again on the SharePoint forums around the community.

Overall, Ben gave us some great common sense viewpoints and some good quotes from well known community contributors, my favourite being Andrew Woodward’s “If you don’t have a test farm, you don’t have a production farm.”

I did like all the points that Ben raised, but also had a couple of comments.

  • Use the SharePoint Solutions Deployment Framework

I absolutely agree with Ben on this one, in fact in his slide I don’t think he went far enough as he focussed on things like deploying code directly to the GAC manually, but didn’t touch on the performance improvements brought about by deploying artefacts through the solution framework. Ben and I had a quick chat about this after his session and I pointed out the performance increases and benefits from caching that can be had by deploying things such as CSS, XSLT directly to the filesystem through solutions, rather than placing them into the Content Database through SharePoint designer.

  • PowerShell isn’t just for Developers.

Ok, the developer in me has some qualms about this one, Yes I agree that on the face of it, the PowerShell functionality is great for IT pros to use, however I don’t believe that IT Pros should be using the Object Model. The actions an IT Pro takes should be restricted to running cmdlets and scripting those cmdlets.

If you as a PowerShell user need to instantiate an SPWeb object, then I think that there is a good cause for a SharePoint developer to be writing a managed code cmdlet for you to use. (yes this is fairly simple to do and there is documentation on MSDN to do it..).

Unless you understand object disposal, you shouldn’t be allowed near SPWeb or SPSite, or perhaps a multitude of objects within SharePoint. A case in point is a client I worked with who couldn’t understand why their server kept crashing during backups. When I investigated the script, I found a whole cacophony of nested loops that instantiated SPWebs from the AllWebs collection, then opened the next SPWeb and instantiated them ALL again, slowly sucking up memory resources until the server couldn’t function and fell over.

All in all a great session and some good discussion points, I enjoyed myself and found both presentations very interesting and appealing.

Ben is running this same session and SharePoint Saturday in a couple of weeks time, so I would recommend you take a look.

Paul.

Oct
12

New look to the blog

I realised that the old style I was using for my blog was quite unreadable under certain conditions. I’ve therefore picked up a new wordpress theme which I hope makes things a lot easier to read.

I’ll be customising it slowly as I find things I’m not happy with, but in the meantime I hope to get back to more regular blog posting now.

Paul.

Oct
04

SPC11–Keynote overview and a few thoughts thrown in.

I first attended a Microsoft Conference in Las Vegas 2 years ago. It was the launch of Office 14 and Steve Ballmer bounded out onto the stage to lots of whoops and hollers. That particular keynote was all about the whizz and bang that Office 14 was brining to the party.

This years keynote didn’t start with quite as much pomp and circumstance, After all, Office 14 is now a mature product with over 18 months release time under it’s belt and i think that Jared Spataro was going to have a hard time getting anywhere near the reaction from the crowd that Steve Ballmer did 2 years ago.

He did come out with some great information, especially some nice looking info graphics around the chosen theme of Productivity Delivered.

One interesting point for me is that SharePoint has now shipped over 125,000,00 licenses to over 65000 companies around the world. if SharePoint was a standalone software company, that would place it in the top 50 software companies in the world.

The social side of the conference got a good mention, especially the phenomenon known as SharePint. An interesting X Factor style audition video featuring some well known actors such a Luke Perry and Carmen Electra added a light note of humour to the event.

Jared was followed by Jeff Teper, the Corporate vice president for the SharePoint product group to talk more about where the product team was focussing it’s attention at the present and the future. A short touch on vNext said we can expect it to grow on the good work done in 2010, but that no more details would be released this week!

Over all the keynote focussed heavily on Office 365 as I had expected, with some mentions to Windows Azure as a companion to the cloud based services supplied by Microsoft. there was also a touch on SQL Server Denali, with a live failover of a 14Tb SharePoint farm. The total failover took just 14 seconds. quite impressive.

Finally Kurt Delbene took to the stage with a quick nod to the British Engineering icon that is the Mini Cooper that he has lovingly restored.

The final part of the keynote focused on the work by NetHope, a company that pulls together 33 of the worlds aid organisation and helps organise relief efforts with SharePoint. A moving video showed the work being carried out in Haiti following the Jan 2010 earthquake. Microsoft announced a $50,000 donation that would be made following the conference and also demonstrated the application that went live to attendees right after the keynote, allowing them to vote which of the 33 organisations should get a share of the cash.

True to form, the entire application pulled in SharePoint, Windows Azure and SQL Denali to showcase what can be done.

Overall, the keynote didn’t light the fire under me had happened in November 2009, but that said, it was informative and did give me quite an insight as to where the focus is going to be over the new year for MS.

Until i get more clients wanting to send their data into the cloud though, I think my focus is going to remain firmly in the on premise arena, although I am going to have a closer look a Windows Azure and SharePoint working together.

Paul.

Sep
29

It’s the final countdown!

It’s Thursday evening and i’m approx 36 hours away from leaving to attend the Microsoft SharePoint conference in Anaheim, Los Angeles. Unfortunately I’m still in a hotel with one more day of client site work to get out the way before I can race home, finish packing and then leave for Heathrow.

The client I’m working with is quite interested in the conference and we were having a conversation today about exactly what I was intending to get out of the week ahead and exactly what benefits my attending the conference brings my business.

Well first and foremost there is a training element, The level 300/400 technical sessions available are some of the deepest dives into the technology that you can get and often go far beyond a training course session that you would see in a general SharePoint training course. In addition there is the ability to pick and choose the sessions that you attend over the course of the week, allowing me to tailor the ‘training’ aspect of the conference to my needs.

Now this approach to training would not suit everyone and I must admit if a client of mine was intending to attend a conference such as this or the Best Practices Conference in London, then I would caution them to attend a more structured course depending on their level of experience with SharePoint. However for a consultant like myself, this style of training is ideal, especially when you include the post-conference access to the recordings.

In my business case I calculated that a one week course with a well known training provider would cost approx £1650 for a non residential course. Averaging about 8 hours of training a day, this equated to about £41.25 per hour of training. The conference on the other hand provides access to around 241 hours of training (admittedly some of the sessions are of significantly less value to me than others) which after adding hotels and flights to the conference fee, worked out at less than £10 per hour of training.

But that’s a purely monetary analysis of the conference, in this day and age, certainly with SharePoint we’re being driven to notice the value add that comes from the Social side of computing. With the conference this aspect comes in the form of the events that surround the conference and the Social Network that evolves around it on networks such as Twitter and FaceBook. I know that after attending the 2009 conference, my SharePoint network had grown considerably and stretched across many international boundaries. I’m really looking forward to meeting those people again, sharing a Pint and generally catching up, and at the same time strengthening those ties that join us.

In addition to the personal relationships that we create, we gain exposure to third party vendors and the opportunity to strike up a relationship with those vendors. From a consultants point of view this can be invaluable as those contacts are great people to turn to when a client needs a recommendation or analysis of such tools.

Overall, it’s very difficult to come up with a value for the return on investment for all of the above, it’s easy to write up the cost of flights and a hotel, but how do you put a value on knowing there’s a friend in the business that you can fire off a question about the BDC (you know who you are!) at 3am when you’re stuck on a client issue? How can you put an ROI on a relationship?

I’m really looking forward to what the week ahead brings, I’ve got some hard choices to make about what sessions I finally attend, with some 2-3 choices for nearly every session. I do know hover that it’s going to be a cracking week with a lot of Social Networking thrown in. If you want to come say hi, watch out for the black twitter shirt with @cimares on it, I’ll be at the front of the Space Mountain queue,

Safe journey to all travelling and see you there!

Paul

Sep
20

SUGUK–Cambridge Sept 20 2011

So my first trip to the East Anglian chapter of the SharePoint user group didn’t start quite as well as I’d have liked. Traffic mean’t I turned up with a minute to spare. Luckily Symon Garfield was waiting for a few more, so I was’t the last to arrive by any shakes.

Coffee and tea on tap is always a great start and Peter certainly hadn’t dissapointed with the arrangements. The room was smaller than I’ve been used to for user group events, but i have to say the smaller room and more compact seating arrangements encouraged more audience discussion and participation than you sometimes see at the London meetings. I guess in small groups people are more prepared to put their hand up and speak out.

The audience themselves were a nice spread of Devs and ITPros with a sprinkling of End/Power users, as well as a few first time visitors to a user group which is always nice to see. One of the things that all the seasoned consultants, speakers and organisers need to do is try and encourage fresh blood to come to these events to keep the user group alive and constantly evolving.

The Secrets of Social Computing with SharePoint Server 2010

Once we got started, Symon Garfield (@symon_garfield) kicked off with a great presentation on “The secrets of social computing with SharePoint Server 2010”. Symon’s focus on SharePoint in his role as CTO for ICS Solutions is away from the technical hands on with a more pragmatic business focus as a Management Consultant.

One of the key takeaways I got from Symons talk was on the ‘Why should I care about Social Computing?”. One of the answers to this is ‘Because it’s happening whether you like it or not.” If you ban facebook on work PC’s, then people will use their smart phones. if you google your company/product/self, chances are there’s a blog on the subject somewhere.

So why is this? is Social Computing a fad for the first decade of the 21st century? Facebook would suggest not. Analysis for Placebook, a social analysis of Facebook users shows that the users of Facebook are spread across a multitude of age ranges with almost as many 40-50 year olds using it as those in their 20s. From an enterprise point of view the thought should perhaps be we’re doing it at home, so why not in our workplace? In SharePoint vNext there’s a distinct likelyhood of OfficeTalk, an in-house twitter style application that’s been developed in Redmond making it’s way into MySites and I’m sure that Microsoft will seek to expand on it’s already dominant position in the Gartner magic quadrant for Social Enterprise as the year progresses.

Symon alluded to a great webcast from Microsoft on how they implemented social computing internally, and you can see that and his analysis here.

Symon covered a great deal of information in his talk, especially around the writing of Business Cases for a social computing platform, pointing out that standard Fiscal focussed business case analysis may not be suitable for the less quantifiable goals of Social Computing. He did suggest however that you should focus on the long term goals, after all, a short discussion over a water cooler led to Sticky Notes, what would they have achieved with SharePoint?

I’ll finish talking about Symon’s presentation with a quote that really stayed with me, “When minds interact new ideas emerge”. Read from that what you will.

After the most excellent Domino’s pizzas (Thank you Peter and Randy, I never did ask who sponsored the food?) the second session kicked of with Giles Hamson (@ghamson) talking about Project Server and SharePoint working together.

Project Server 2010 and SharePoint

One of the key things that Giles was keen to point out is that Project Server isn’t just another service application that sits on SharePoint, It’s a whole new application stack that uses SharePoint for it’s presentation. And it requires ENTERPRISE! That came as a bit of a shock to me, after all, that’s no cheap license set-up that you’re working towards there. However it does mean that your project server implementation comes with a lot of bells and whistles from a Business Intelligence perspective.

It also makes any particular system very resource hungry. Giles quoted a system he had recently been involved with that server around 100 project managers and had dual WFE’s with 24 Gb of Ram and 4*Quad Core servers and a suitably large SQL infrastructure behind all that to support it. If you then couple in PerformancePoint and a few other Sharepoint Service Applications, I think you’d be talking about a pretty meaty farm!

There were a few eye openers along the way too where Project Server seems at odds with SharePoint, such as only support for IE7 & 8 in the RTM product with SP1 introducing IE9, but only limited support for other browsers that SharePoint considers Tier 1. In addition, branding of the Project Web Access sites through Custom Masterpages is not supported and turning on Publishing breaks stuff!

I think I can safely say that if I get involved in a Project Server for SharePoint installation, I shall be researching the subject thoroughly before popping that ISO onto a blank dvd!

Wrap up.

I had a great night at the SUGUK EA meeting. Peter and Randy do a great job running their area of the UK and I really hope to be back there again soon, with any luck presenting for them in the very near future.

Paul.

Sep
20

Top tips for the MS SharePoint Conference!

One of my SharePoint buddies @MarcyKellar has posted a great top 11 tips guide to the SharePoint Conference on her blog The SharePoint Muse.

If you’re attending this, or indeed any IT conference, it’s well worth taking some time out of your day for a quick read.

Read the whole article here…..

Paul.

Sep
18

XML in SharePoint 101

This post is part of a series of notes that I’m putting together regarding XML within SharePoint.

  1. Intro and History of XML
  2. XML in SharePoint 101 (This post)
  3. XML in SharePoint Search Pt1

So just where does XML feature in SharePoint?

The answer to this question is EVERYWHERE! You cannot escape XML even if you wanted to with SharePoint. Every role that interacts with SharePoint will have seen some XML data at some point along the line. The key thing is, you may not even have been aware that it’s XML being displayed.

In fact, we can safely say that the average end user of SharePoint should NEVER see XML data in it’s raw form. If they do, then something has gone wrong and the user is going to be scared! After all, they just wanted a simple people search, expecting a few pictures and some data, not a mass of angle brackets and seemingly gobbledy gook.

Our job as IT Pros and Devs (and even Power Users) in the SharePoint world is to make this data appear in a nice safe friendly manner that doesn’t scare the end user with hard to decipher data. And to do this, we have to employ XSLT (Extensible Stylesheet Language Transformations.. Glad you asked I bet??). XSLT is a method of taking XML data and applying a set of styling rules to the data, outputting that same data into a format that can be consumed by a user, another program, a screenreader or pretty much anything else that wants that XML data in a different format.

Luckily SharePoint brings a whole host of tools and WebParts to the party to make this a lot easier than we might think. For the ITPro’s/Power users, when you’re working with list and form data, SharePoint designer hides a lot of this XSLT away behind the scenes so that you don’t have to worry overly about what’s happening. There are times though when even SharePoint designer can’t help you and you have to start delving into the XSLT itself.

Foundation WebParts with XML and XSLT

As far as I’ve seen, foundation only has two webparts that actually use XML/XSLT, but that’s just personal experience in what I’ve worked with as most of my work is in SharePoint Server. These web parts are:-

  • XML Viewer (Mapped or Inline XSLT)
  • List Views (Mapped or Inline XSLT)

The XML viewer of course makes absolute sense, it takes a static XML file, applies an XSLT style sheet and then displays the resulting HTML inside the webpart. (Note the use of the word static here. One of the features I would love to have seen would be the ability to use a REST url with the XML viewer, and then apply the XSLT to the results of that. Unfortunately it doesn’t work, I’ve tested it. That’s on my list of web parts to code up and play with.)

The list view does much the same thing, however it uses a SharePoint list as the source of the data. The plus point for the List view is that it can be added and manipulated through SharePoint Designer, resulting in a nice code free implementation. I’m not going to delve heavily into using SPD to customise list views as there are many blogs that do this far deeper than I would be able to go. I heartily recommend checking out Laura Roger’s blog as she has some great posts on just this subject.. http://www.sharepoint911.com/blogs/laura/default.aspx (In particular the Data view Web part screencasts!)

You’ll note that I’ve also used the phrase Mapped or Inline XSLT. This comes from the Webpart properties and how SharePoint stores the XSLT that you’ve applied to it.

If we add the XML Viewer webpart to a page, choose Edit WebPart properties, you’ll see an XML and an XSLT section.

clip_image001

Firstly we can add some data to the XML section. Let’s go back to our tree data. Click on XML Editor and then cut & paste the tree data below into the pop-up text box.

<?xml version="1.0" encoding="utf-8"?>
<Trees>
<Tree Genus="Prunus" Subgenus="Amygdalus">
<CommonName>Almond</CommonName>
</Tree>
<Tree Genus="Taxus" Subgenus="Baccata">
<CommonName>Yew</CommonName>
<CommonName>English Yew</CommonName>
<CommonName>European Yew</CommonName>
</Tree>
<Tree Genus="Buxus" Subgenus="Sempervirens">
<CommonName>Boxwood</CommonName>
</Tree>
</Trees>

Now click Apply on the web part properties.

clip_image002

There’s our data, displayed nicely without the XML tags. But hang on, where are our attributes? All we’re seeing is the Common Names.

Well at this point, we don’t have any XSLT applied, so the XML viewer uses it’s most basic rendering pattern and just outputs the contents of the XML Tags, ignoring any of the attributes. As a Result, we’re not seeing our trees displayed by their Genus.

As the Genus has it’s name stored as an Attribute, we need a simple XSLT that will show us the data in a nice Tree form..(no pun intended!) with the Genus at the beginning of each branch.. (Ok it’s impossible to talk about XML with using trees and branches.. 8-} …)

This is where we begin to build our XSLT. I’d really suggest using a nice XML aware text editor like SharePoint Designer, Visual Studio or similar as it make’s it much easier to see mistakes!

The XSLT we need is:-

<xsl:stylesheet
  version="1.0"
  xmlns:x="http://www.w3.org/2001/XMLSchema"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:template match="Tree">
<xsl:value-of select="@Genus"/><br/>
<xsl:for-each select="CommonName">
-----<xsl:value-of select="."/><br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Which gives us our rudimentary tree structure:-

clip_image003

Ok, at the moment that seems like an awful lot of effort just to output a few names onto a page. But imagine if there were 1500 names, how about displaying pictures using an HRef stored in the xml? Or showing links when they exist in the data. All of this is possible with XSLT. We’ll explore that further in the next part of this series of posts.

For now though, we’re going to return to the part where I mentioned Inline or Mapped XSLT. At the moment, when you add XSLT to the pop-up text box, this data is Saved into the Webpart properties and stored in your content database. The only way to get at this data is to edit the webpart, thus editing the page. The alternative is to place the XSLT file either within SharePoint through SharePoint designer, or on the file system through the use of a SharePoint solution (and a developer!)

For our purposes, we’ll use SharePoint Designer and the vary handy Site Assets library that forms part of every SharePoint site. You’ll spot this down the left hand side of SPD.

clip_image004

Selcting the Site Assets library brings up the Assets button in the ribbon. Click on the dropdown and choose XML. Then name the file Treestyle.xsl (XSL not XML!)

You’ll notice the icon change to denote an XSL file.

clip_image005

Edit this file and drop our XML from above into it. Then save and close. Back in our SharePoint web browser window, open the XSL editor window and erase the XSL we pasted in there earlier. Click apply and make sure the text displayed returns to just displaying the Common Names in one line.

Once you’re happy it’s all back to how it was at the start, set the following relative link in the XSL Link text box.

clip_image006

Click apply and you’ll see the displayed text return to our almost sexy tree view!

If you see this error:

clip_image007

Then you’ve made a mistake in one of two places, either the file is inaccessible because the URL is wrong, or the XSLT itself is invalid.

Use the Test Link option in the dialog. If the URL is valid, then IE will prompt you to save the file Treestyle.xsl in which case it’s the contents of the file that are at fault.

If the data has displayed properly, we’re now in a nice position to save the contents of our web page and close the editing session. If you’re lucky enough to have dual screens at this point, You can Drag IE onto a spare screen and carry on working in SharePoint Designer. Flicking across to the other screen, a quick Ctrl-F5 (I always use Ctrl-F5 to reload the page fully) and you can see the impact of your changes right away.

The other good reason to store your XSL in a document library is that you can switch on Versioning and Publishing and reap all the goodness that this brings!

In the next post, I’ll look at some of the other places in SharePoint where XSL starts to appear, before returning to the XML viewer to demonstrate a custom Navigation solution I created for a client using XML and XSLT.

Regards

Paul.

Sep
18

I’m off to Anaheim! and I’ll be live blogging too..

So with only 3 weeks to go, I got the nod to say that I could go to Anaheim and attend the biggest and best SharePoint Conference in the world!

I’m really pleased about this and excited too, this conference represents the biggest meeting of SharePoint enthusiasts, IT pros, Devs, End Users and all round geeks that LA and the world has ever seen. I had the great fortune to attend SPC09 shortly before the 2010 version was released, and as my first and only MS Conference I have to say it was an awesome experience. Some of the people I met at that conference have become great friends and colleagues across the miles that separate us and I know that when we meet up at SharePint in the ESPN Zone in Anaheim, it’ll be like it was only yesterday when we shook hands/hugged/kissed whatever and parted.

The value the conference brings isn’t only measurable as a return on investment, The contacts and friends that I’ve med have over the years helped me out when I’ve been in sticky SharePoint situations, a quiet tweet here, a facebook post there and I’ve been helped and hopefully helped others through the social network that we’ve created and grown from that Conference.

This year will be no different I’m sure, an opportunity to catch up with old friends as well as make some new ones and to help with bringing information from SPC22 to the masses, I’ve agreed to live blog onto the SharePoint EduTech blog site as well! So you can catch my posts on here or there. Many thanks to Dave Coleman for having me on-board!

You can read the EduTech blog here:- www.sharepointedutech.com

Remember to catch all the latest gossip on twitter, #SPC11, #SharePint are probably the best tags to monitor at the moment.. I’ll post more as they appear!

Cheers!

Paul.

Older posts «