I have a public website on which I need to display a simplified version of a list view I have set up in SharePoint.
I am successfully using the techniques described on here 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.
I have written the following XSLT but am encountering issues. Forgive in advance as as I am a XSLT newbie.
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<activeRFPs>
<xsl:for-each select="z:row">
<rfp>
<title>
<xsl:value-of select="@ows_RFP_x0020_Link" />
</title>
<applicationStart>
<xsl:value-of select="@ows_Application_x0020_Period_x0020_S" />
</applicationStart>
<applicationEnd>
<xsl:value-of select="@ows_Application_x0020_Period_x0020_E" />
</applicationEnd>
<programStart>
<xsl:value-of select="@ows_Program_x0020_Start_x0020_Date" />
</programStart>
<publicURL>
<xsl:value-of select="@ows_Public_x0020_Guidelines_x0020_Do" />
</publicURL>
</rfp>
</xsl:for-each>
</activeRFPs>
</xsl:template>
The source XML from SharePoint looks like this:
<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'>
What am I doing wrong?
EDIT: Here is the source XML:
<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'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'>
<s:AttributeType name='ows_RFP_x0020_Link' rs:name='RFP Link' rs:number='1'>
<s:datatype dt:type='string' dt:maxLength='512' />
</s:AttributeType>
<s:AttributeType name='ows_Application_x0020_Period_x0020_S' rs:name='Application Period Start Date' rs:number='2'>
<s:datatype dt:type='datetime' dt:maxLength='8' />
</s:AttributeType>
<s:AttributeType name='ows_Application_x0020_Period_x0020_E' rs:name='Application Period End Date' rs:number='3'>
<s:datatype dt:type='datetime' dt:maxLength='8' />
</s:AttributeType>
<s:AttributeType name='ows_Program_x0020_Start_x0020_Date' rs:name='Program Start Date' rs:number='4'>
<s:datatype dt:type='datetime' dt:maxLength='8' />
</s:AttributeType>
<s:AttributeType name='ows_Public_x0020_Guidelines_x0020_Do' rs:name='Public Guidelines Doc URL' rs:number='5'>
<s:datatype dt:type='string' dt:maxLength='512' />
</s:AttributeType>
</s:ElementType>
</s:Schema>
<rs:data>
<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' />
</rs:data>
</xml>