Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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'>
    <table>    
      <tr>    
      <xsl:apply-templates select='Rows/Row'/>
      </tr>
    </table>
  </xsl:template>

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

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).

share|improve this question
    
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. –  Stuart Pegg Aug 8 '12 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 '12 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? –  Stuart Pegg Aug 8 '12 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 '12 at 23:42
add comment

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' />

share|improve this answer
    
I tried, unfortunately it didn't make any difference. –  Christophe Aug 8 '12 at 21:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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