title: XSLT and namespaces
body: <p>I have a public website on which I need to display a simplified version of a list view I have set up in SharePoint.</p>
  
  <p>I am successfully using the techniques described on <a href="http://blogs.msdn.com/b/kaevans/archive/2009/05/01/getting-xml-data-from-a-sharepoint-list-the-easy-way.aspx" rel="nofollow">here</a> to get the XML of the view, but it is overly complicated and I can't get my jQuery AJAX code to handle the namespaces properly.</p>
  
  <p>I have written the following XSLT but am encountering issues. Forgive in advance as as I am a XSLT newbie.</p>
  
  <p>My XLST looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;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:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
       xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
       xmlns:rs='urn:schemas-microsoft-com:rowset'
       xmlns:z='#RowsetSchema'
  &gt;
  
  &lt;xsl:output method="xml" indent="yes"/&gt;
  
  &lt;xsl:template match="/"&gt;
      &lt;activeRFPs&gt;
      &lt;xsl:for-each select="/xml/rs:data/z:row"&gt;
          &lt;rfp&gt;
              &lt;title&gt;
                  &lt;xsl:value-of select="@ows_RFP_x0020_Link" /&gt;
              &lt;/title&gt;
              &lt;applicationStart&gt;
                  &lt;xsl:value-of select="@ows_Application_x0020_Period_x0020_S" /&gt;
              &lt;/applicationStart&gt;
              &lt;applicationEnd&gt;
                  &lt;xsl:value-of select="@ows_Application_x0020_Period_x0020_E" /&gt;
              &lt;/applicationEnd&gt;
              &lt;programStart&gt;
                  &lt;xsl:value-of select="@ows_Program_x0020_Start_x0020_Date" /&gt;
              &lt;/programStart&gt;
              &lt;publicURL&gt;
                  &lt;xsl:value-of select="@ows_Public_x0020_Guidelines_x0020_Do" /&gt;
              &lt;/publicURL&gt;
          &lt;/rfp&gt;
      &lt;/xsl:for-each&gt;
      &lt;/activeRFPs&gt;
  &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The source XML looks like this:</p>
  
  <pre><code>&lt;xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
   xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
   xmlns:rs='urn:schemas-microsoft-com:rowset'
   xmlns:z='#RowsetSchema'&gt;
  &lt;s:Schema id='RowsetSchema'&gt;
  &lt;s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'&gt;
    &lt;s:AttributeType name='ows_RFP_x0020_Link' rs:name='RFP Link' rs:number='1'&gt;
       &lt;s:datatype dt:type='string' dt:maxLength='512' /&gt;
    &lt;/s:AttributeType&gt;
    &lt;s:AttributeType name='ows_Application_x0020_Period_x0020_S' rs:name='Application Period Start Date' rs:number='2'&gt;
       &lt;s:datatype dt:type='datetime' dt:maxLength='8' /&gt;
    &lt;/s:AttributeType&gt;
    &lt;s:AttributeType name='ows_Application_x0020_Period_x0020_E' rs:name='Application Period End Date' rs:number='3'&gt;
       &lt;s:datatype dt:type='datetime' dt:maxLength='8' /&gt;
    &lt;/s:AttributeType&gt;
    &lt;s:AttributeType name='ows_Program_x0020_Start_x0020_Date' rs:name='Program Start Date' rs:number='4'&gt;
       &lt;s:datatype dt:type='datetime' dt:maxLength='8' /&gt;
    &lt;/s:AttributeType&gt;
  &lt;s:AttributeType name='ows_Public_x0020_Guidelines_x0020_Do' rs:name='Public Guidelines Doc URL' rs:number='5'&gt;
  &lt;s:datatype dt:type='string' dt:maxLength='512' /&gt;
  &lt;/s:AttributeType&gt;
  &lt;/s:ElementType&gt;
  &lt;/s:Schema&gt;
  &lt;rs:data&gt;
  &lt;z:row ows_RFP_x0020_Link='http://www.google.com, Google Search Engine' ows_Application_x0020_Period_x0020_S='2012-06-22 00:00:00' ows_Application_x0020_Period_x0020_E='2012-07-20 00:00:00' ows_Program_x0020_Start_x0020_Date='2012-10-01 00:00:00' ows_Public_x0020_Guidelines_x0020_Do='http://www.yahoo.com' /&gt;
  &lt;/rs:data&gt;
  &lt;/xml&gt;
  </code></pre>
  
  <p>All values are attributes on the z:row element. I am a bit turned around on how to work with namespaces.</p>
  
  <p>When I run in Visual Studio, all that is outputted is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;activeRFPs xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" /&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>I would like this structure:</p>
  
  <pre><code>&lt;rfp&gt;
  &lt;title&gt;value&lt;/title&gt;
  &lt;applicationStart&gt;value&lt;/applicationStart&gt;
  &lt;applicationEnd&gt;value&lt;/applicationEnd&gt;
  ...
  &lt;/rfp&gt;
  </code></pre>