step 1. Created xslt file using following code.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" encoding="utf-8" />
<xsl:template match="Details">
<Details>
<xsl:for-each select="@*">
<xsl:element name="{name(.)}">
<xsl:value-of select="." />
</xsl:element>
</xsl:for-each>
</Details>
</xsl:template>
</xsl:stylesheet>
Step 2: set Property of report to "datafeed.xslt"
Without applying xslt to my ssrs report result appears like this,
<Report xsi:schemaLocation="pg_google_data_feed http://reportserver?%2Fpg_google_data_feed&rs%3AFormat=XML&rc%3ASchema=True" Name="pg_google_data_feed">
<Title>FeedTitle</Title>
<link>http://www.mydomain.com</link>
<description>My Products</description>
<ProductList>
<Details_Collection>
<Details>
<Id>1000</Id>
</Details>
<Details>
<Id>1000</Id>
</Details>
</Details_Collection>
</ProductList>
</Report>
if i attached above mentioned xslt to the report through DataTransform Property, am getting following output.
XML Parsing Error: syntax error
Location: file:///C:/Documents%20and%20Settings/Administrator/Desktop/pg_google_data_feed.xml
Line Number 1, Column 39:<?xml version="1.0" encoding="utf-8"?>1089010947109191093310895108921092406598115141151311512
--------------------------------------^
Thank you in advance Sudhakar
No comments:
Post a Comment