473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem with XmlDataSource TransformFile property

I am using an XmlDataSource in VS2005Beta1 and setting the TransformFile
property in my ASCX and it is finding both files. However, the resulting
data does not contain any of the sub nodes of the generated document. I have
tested my XSL by viewing the generated XML and it properly transforms the
DataFile in the UI editor for the XSL. I have verified the XmlDataSource is
finding the DataFile by removing the TransformFile property which allows my
TreeView to display the nodes of the DataFile XML. I have made sure the
XmlDataSource is finding the TransformFile (XSL file) by changing the path to
an invalid value and verifying there is an error if it is invalid. The
results of the transformation looks like the DataFile could not be loaded.
Any ideas on what I might be doing wrong?

Nov 12 '05 #1
2 1958
Here are the various parts (I truncated the XML down to the elements that
apply because it is a lot larger - But I know for sure the full XML is well
formed):

ASCX Code:

<%@ Control Language="C#" CompileWith="ProcessFolders.ascx.cs"
ClassName="ProcessFolders_ascx" Debug="true"%>
<table width="200px">
<tr>
<td height="100%">
<asp:XmlDataSource
ID="FolderDefs"
Runat="server"
DataFile="~/Data/VerticleProcessInterface.xml"
TransformFile="~/Data/Folders.xsl">
</asp:XmlDataSource>
<asp:TreeView
ID="ProcessFolders"
Runat="server"
DataSourceID="FolderDefs"
OnSelectedNodeChanged="ProcessFolders_SelectedNode Changed">
<DataBindings>
<asp:treenodebinding
datamember="ProfileName"
textfield="text"
depth="0">
</asp:treenodebinding>
</DataBindings>
</asp:TreeView>
</td>
</tr>
</table>

The XML:

<VerticleProcessInterfaceConfig>
<FrameData name="Folders">
<FolderDefinitions>
<FolderDefinition showCaptions="true" inUse="true" caption="Follow Up"
profileName="FollowUp">
<DisplayedFields>
<DisplayedField caption="ID">PkgRecID</DisplayedField>
<DisplayedField caption="Company">Company</DisplayedField>
<DisplayedField caption="Amount"
justify="right">Amount</DisplayedField>
<DisplayedField caption="PODate"
justify="right">PODate</DisplayedField>
</DisplayedFields>
</FolderDefinition>
<FolderDefinition showCaptions="true" inUse="true" caption="Non-PO"
profileName="NonPO">
<DisplayedFields>
<DisplayedField caption="ID">PkgRecID</DisplayedField>
<DisplayedField caption="Company">Company</DisplayedField>
<DisplayedField caption="Amount"
justify="right">Amount</DisplayedField>
<DisplayedField caption="PODate"
justify="right">PODate</DisplayedField>
</DisplayedFields>
</FolderDefinition>
<FolderDefinition showCaptions="true" inUse="true" caption="Non PO
Approved" profileName="NonPOApproved">
<DisplayedFields>
<DisplayedField caption="ID">PkgRecID</DisplayedField>
<DisplayedField caption="Company">Company</DisplayedField>
<DisplayedField caption="Amount"
justify="right">Amount</DisplayedField>
<DisplayedField caption="PODate"
justify="right">PODate</DisplayedField>
</DisplayedFields>
</FolderDefinition>
<FolderDefinition showCaptions="true" inUse="true" caption="PO"
profileName="PO">
<DisplayedFields>
<DisplayedField caption="ID">PkgRecID</DisplayedField>
<DisplayedField caption="Company">Company</DisplayedField>
<DisplayedField caption="Amount"
justify="right">Amount</DisplayedField>
<DisplayedField caption="PODate"
justify="right">PODate</DisplayedField>
</DisplayedFields>
</FolderDefinition>
<FolderDefinition showCaptions="true" inUse="true" caption="Priority"
profileName="Priority">
<DisplayedFields>
<DisplayedField caption="ID">PkgRecID</DisplayedField>
<DisplayedField caption="Company">Company</DisplayedField>
<DisplayedField caption="Amount"
justify="right">Amount</DisplayedField>
<DisplayedField caption="PODate"
justify="right">PODate</DisplayedField>
</DisplayedFields>
</FolderDefinition>
</FolderDefinitions>
</FrameData>
</VerticleProcessInterfaceConfig>

The XSL File:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<ProfileNames>
<xsl:apply-templates
select="//FrameData[@name='Folders']/FolderDefinitions/FolderDefinition[@inUse='true']"/>
</ProfileNames>
</xsl:template>
<xsl:template
match="//FrameData[@name='Folders']/FolderDefinitions/FolderDefinition[@inUse='true']" >
<xsl:text disable-output-escaping="yes"><ProfileName text="</xsl:text>
<xsl:value-of select="@caption"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="@profileName"/>
<xsl:text disable-output-escaping="yes"></ProfileName></xsl:text>
</xsl:template>
</xsl:stylesheet>

Nov 12 '05 #2
Just a note...Looks like the news group display has taken som of my XSL and
replaced it with the literals instead of displaying my "& l t ;" and "& g t
;" text...
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mike | last post by:
can somebody please show me some code that will let me populate a checkboxlist from the xmldatasource, and have the text property set to the names in the xml file thanks you can also email me...
3
by: Brian | last post by:
Using external XML, I'm trying to build a quiz, but I can't seem to specify the DataSource for the RadioButtonList within a Repeater ItemTemplate. I've tried a number of approaches, but I haven't...
2
by: sck10 | last post by:
Hello, How do you set the website proxy using the XmlDataSource control? Thanks, sck10
0
by: Charlie | last post by:
Hi: If I point my XmlDataSource control at an xml file on server, databindings work fine. If I take same file, copy to a string, and use it to intitalize Data property of XmlDataSource control,...
2
by: rote | last post by:
I have a code below i'm trying to test It had a DataSetDatasource but i thinks its deprecated if yes what can i use in this scenario below? I used XmlDatasource but its saying it can't find the...
0
by: mazdotnet | last post by:
Hi all, I have trying to test an XML file with a XSLT file. However, I don't know how to dump the content (generate page to the screen). What control do I need to bind to display the generate...
2
by: mazdotnet | last post by:
Hi all, I have trying to test an XML file with a XSLT file. However, I don't know how to dump the content (generate page to the screen). What control do I need to bind to display the generate...
0
by: =?ISO-8859-1?Q?Arint=E9?= | last post by:
I have an xml that looks like this: <miniblog xmlns:s="miniblog.xsd"> <Blog> <Date>2007-10-10T12:00:00</Date> <Diary>This is a journey into sound 10/10</Diary> </Blog> <Blog>...
8
by: Wessel Troost | last post by:
We are using an XML data source in the Page_Load event of an ASP.NET page, like: protected void Page_Load(object sender, EventArgs e) { // Retrieve XML from web service for product idea in URL...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.