I have on my SharePoint page an XSL List View Web Part linked to an XSLT file via the "XSL Link" property. Here is the content of the XSLT:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:ddwrt2="urn:frontpage:internal">

  <xsl:output method='html' indent='yes'/>

  <xsl:template match='dsQueryResponse'>
      <xsl:apply-templates select='Rows/Row'/>

  <xsl:template match='Row'>
          <xsl:value-of select='@Button' />

Basically, what it does is display the Title fields in a row instead of column.

This works fine on the Web Part itself. However as soon as I use it, some fields in other Web Parts on the page disappear. From what I've seen, the impacted fields are of type lookup.

Has anybody seen this weird issue before? Or is there anything wrong with my XSLT that breaks the page?

[Update] I did some more tests and the issue is specific to site lookups (lookups used in the current site but created in the parent site).

  • If you add the web part using a different XSL method (selecting the same data), does the issue recur? Also, is it possible to output the source XML from XSL? The before and after of that might give a clue.
    – Stu Pegg
    Aug 8, 2012 at 21:15
  • I tried different XSL transforms, the one in the question is the simplest one. And all the XSLTs actually work fine, the issue is in the Web Parts that don't use it...
    – Christophe
    Aug 8, 2012 at 21:38
  • I've seen similar where a Custom Field Type based on a Lookup was causing the CAML to not retrieve fields other lookups depended on (hence the source XML query). Could it be something to do with the columns you're selecting, and not the XSL at all?
    – Stu Pegg
    Aug 8, 2012 at 21:54
  • Well, when I remove the XSL link everything works fine. I am puzzled, the lists that break have no relationship with the list that has the XSL link (apart from being displayed on the same page).
    – Christophe
    Aug 8, 2012 at 23:42

1 Answer 1


Try adding the omit-xml-declaration attribute in your output, i.e.

<xsl:output method='html' indent='yes' omit-xml-declaration='yes' />

  • I tried, unfortunately it didn't make any difference.
    – Christophe
    Aug 8, 2012 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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