No, we are doing a similar thing. The XMLNS in the XML is set to "Extract".
In the XSL we are specifying xmlns:olb="Extract", then we are fully
qualifying references such as,
"olb:Report/olb:table1/olb:Employee_Collection/olb:Employee[1]/olb:OrgName".
Here is a snippet of the XML file:
<?xml version="1.0" ?>
- <Report xmlns="Extract"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Extract
http://localhost/reportserver/folder?%2fExtract&rs%3aFormat=XML&rs%3aShowHideToggle%3aisnull=True&rc%3aSchema=True" Name="Extract">
- <table1>
- <Employee_Collection>
- <Employee>
Here is a snippet of the XSL file:
<?xml version="1.0" ?>
- <!-- This stylesheet transforms On Line Benefits XML content into valid
HR-XML content
-->
- <xsl:stylesheet version="1.0" xmlns="
http://ns.hr-xml.org/2004-08-02" xmlns:olb="Extract" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" xmlns:datetime="xalan://org.apache.xalan.lib.ExsltDatetime"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="datetime">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
- <!-- This key is used to support grouping of dependent data
-->
<xsl:key name="dependentGroup"
match="olb:Enrollment_Collection/olb:Enrollment/olb:Dependent_Collection/olb:Dependent[olb:DepRelation != 'Self']" use="olb:DepID" />
- <xsl:template match="/">
<xsl:call-template name="baseTemplate" />
</xsl:template>
- <!-- The base template transforms initial content and calls named
templates to expedite the transformation
-->
- <!-- The named templates represent elements defined in the HR-XML
schema
-->
- <xsl:template name="baseTemplate">
- <Enrollment>
- <xsl:attribute name="xsi:schemaLocation">
<xsl:text>
http://ns.hr-xml.org/2004-08-02 Enrollment.xsd</xsl:text>
</xsl:attribute>
- <xsl:choose>
- <xsl:when test="function-available('datetime:dateTime')">
- <xsl:attribute name="creationDate">
<xsl:value-of select="datetime:dateTime()" />
</xsl:attribute>
</xsl:when>
</xsl:choose>
- <Organization>
- <xsl:attribute name="organizationName">
<xsl:value-of
select="olb:Report/olb:table1/olb:Employee_Collection/olb:Employee[1]/olb:OrgName" />
</xsl:attribute>
- <xsl:attribute name="organizationId">
<xsl:value-of
select="olb:Report/olb:table1/olb:Employee_Collection/olb:Employee[1]/olb:FederalTaxID" />
</xsl:attribute>
- <xsl:for-each
select="olb:Report/olb:table1/olb:Employee_Collection/olb:Employee">
- <Subscriber>
[quoted text, click to view] "Teo Lachev [MVP]" wrote:
> This is probably because you haven't qualified your XSL with the Data Schema
> namespace. In the code sample below note that the n1 namespace equals the
> Data Schema setting and all elements are referenced by their fully qualified
> name.
>
>
> - <xsl:stylesheet version="1.0"
> xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" > xmlns:n1="
http://www.awc.com/sales" > xmlns:xs="
http://www.w3.org/2001/XMLSchema"> > - <xsl:template match="/">
> - <xsl:for-each select="n1:SalesPromotion/n1:Promotions/n1:Promotion">
> - <item>
> - <title>
> <xsl:value-of select="./@Description" />
> </title>
> <link>
http://www.adventure-workds.com/promotions</link>
> - <description>
> Great
> <xsl:value-of select="./@Description" />
> Items discounted
> <xsl:value-of select="./@DiscountPct" />
> percent! Offer expires on
> <xsl:value-of select="./@StartDate" />
> </description>
> - <pubDate>
> <xsl:value-of select="./@StartDate" />
> </pubDate>
> </item>
> </xsl:for-each>
> </xsl:template>
> </xsl:stylesheet>
>
> --
> Hope this helps.
>
> ---------------------------------------------
> Teo Lachev, MVP [SQL Server], MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website:
http://www.manning.com/lachev > Buy it from Amazon.com:
http://shrinkster.com/eq > Home page and blog:
http://www.prologika.com/ > ---------------------------------------------
>
> "khonerka" <khonerka@discussions.microsoft.com> wrote in message
> news:38621B97-FAF7-45A8-9727-EAD85354EB40@microsoft.com...
> > I am able to open the XML in Stylus Studio and apply the XSL
> transformation
> > without error. I am also able to do it in ASP .NET code. I just can't get
> it
> > to work directly through SQL Reporting Services.
> >
> > "Teo Lachev [MVP]" wrote:
> >
> > > Does it work when you assign the XSLT directly the report XML output. In
> > > other words, export the report as XML, save to file, assing the XSLT and
> run
> > > it. If this works, the XSLT in RS should work too.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ---------------------------------------------
> > > Teo Lachev, MVP [SQL Server], MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > Publisher website:
http://www.manning.com/lachev > > > Buy it from Amazon.com:
http://shrinkster.com/eq > > > Home page and blog:
http://www.prologika.com/ > > > ---------------------------------------------
> > >
> > > "khonerka" <khonerka@discussions.microsoft.com> wrote in message
> > > news:F5448834-D9B4-42A6-9EF3-FAFD92127A24@microsoft.com...
> > > > I generated a schema from my input XML. I deployed that schema to the
> > > report
> > > > server in the same folder as my report. I tried several different
> settings
> > > in
> > > > the Data schema textbox ("ExtractMini.xsd",
> > > > "http://lidevsql/reportserver/EMreports/Extracts/ExtractMini.xsd",
> > > > "http://lidevsql/reportserver/EMreports/Extracts"), none of which
> > > generated
> > > > anything new. So, I still have the same problem. Do you have anything
> else
> > > I
> > > > can try?
> > > >
> > > > "Teo Lachev [MVP]" wrote:
> > > >
> > > > > You have to explicitly set the Data schema textbox in the Data
> Output
> > > tab,
> > > > > e.g.
http://www.abc.com/myschema. If the "Data schema" setting is
> not
> > > > > specified, the Report Server will auto-generate the XML document
> global
> > > > > namespace to include the date when the report is processed.
> > > > >
> > > > > --
> > > > > Hope this helps.
> > > > >
> > > > > ---------------------------------------------
> > > > > Teo Lachev, MVP [SQL Server], MCSD, MCT
> > > > > Author: "Microsoft Reporting Services in Action"
> > > > > Publisher website:
http://www.manning.com/lachev > > > > > Buy it from Amazon.com:
http://shrinkster.com/eq > > > > > Home page and blog:
http://www.prologika.com/ > > > > > ---------------------------------------------
> > > > >
> > > > > "khonerka" <khonerka@discussions.microsoft.com> wrote in message
> > > > > news:0CCE95FB-3954-4204-8C50-AEAD6A44AFA2@microsoft.com...
> > > > > > I have tried this in 2 different wasy:
> > > > > > 1. By typing "onlinebenefits.xsl" in the Data Transform text box
> of
> > > the
> > > > > Data