473,667 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1973
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="Pr ocessFolders.as cx.cs"
ClassName="Proc essFolders_ascx " Debug="true"%>
<table width="200px">
<tr>
<td height="100%">
<asp:XmlDataSou rce
ID="FolderDefs "
Runat="server"
DataFile="~/Data/VerticleProcess Interface.xml"
TransformFile=" ~/Data/Folders.xsl">
</asp:XmlDataSour ce>
<asp:TreeView
ID="ProcessFold ers"
Runat="server"
DataSourceID="F olderDefs"
OnSelectedNodeC hanged="Process Folders_Selecte dNodeChanged">
<DataBindings >
<asp:treenodebi nding
datamember="Pro fileName"
textfield="text "
depth="0">
</asp:treenodebin ding>
</DataBindings>
</asp:TreeView>
</td>
</tr>
</table>

The XML:

<VerticleProces sInterfaceConfi g>
<FrameData name="Folders">
<FolderDefiniti ons>
<FolderDefiniti on showCaptions="t rue" inUse="true" caption="Follow Up"
profileName="Fo llowUp">
<DisplayedField s>
<DisplayedFie ld caption="ID">Pk gRecID</DisplayedField>
<DisplayedFie ld caption="Compan y">Company</DisplayedField>
<DisplayedFie ld caption="Amount "
justify="right" >Amount</DisplayedField>
<DisplayedFie ld caption="PODate "
justify="right" >PODate</DisplayedField>
</DisplayedFields >
</FolderDefinitio n>
<FolderDefiniti on showCaptions="t rue" inUse="true" caption="Non-PO"
profileName="No nPO">
<DisplayedField s>
<DisplayedFie ld caption="ID">Pk gRecID</DisplayedField>
<DisplayedFie ld caption="Compan y">Company</DisplayedField>
<DisplayedFie ld caption="Amount "
justify="right" >Amount</DisplayedField>
<DisplayedFie ld caption="PODate "
justify="right" >PODate</DisplayedField>
</DisplayedFields >
</FolderDefinitio n>
<FolderDefiniti on showCaptions="t rue" inUse="true" caption="Non PO
Approved" profileName="No nPOApproved">
<DisplayedField s>
<DisplayedFie ld caption="ID">Pk gRecID</DisplayedField>
<DisplayedFie ld caption="Compan y">Company</DisplayedField>
<DisplayedFie ld caption="Amount "
justify="right" >Amount</DisplayedField>
<DisplayedFie ld caption="PODate "
justify="right" >PODate</DisplayedField>
</DisplayedFields >
</FolderDefinitio n>
<FolderDefiniti on showCaptions="t rue" inUse="true" caption="PO"
profileName="PO ">
<DisplayedField s>
<DisplayedFie ld caption="ID">Pk gRecID</DisplayedField>
<DisplayedFie ld caption="Compan y">Company</DisplayedField>
<DisplayedFie ld caption="Amount "
justify="right" >Amount</DisplayedField>
<DisplayedFie ld caption="PODate "
justify="right" >PODate</DisplayedField>
</DisplayedFields >
</FolderDefinitio n>
<FolderDefiniti on showCaptions="t rue" inUse="true" caption="Priori ty"
profileName="Pr iority">
<DisplayedField s>
<DisplayedFie ld caption="ID">Pk gRecID</DisplayedField>
<DisplayedFie ld caption="Compan y">Company</DisplayedField>
<DisplayedFie ld caption="Amount "
justify="right" >Amount</DisplayedField>
<DisplayedFie ld caption="PODate "
justify="right" >PODate</DisplayedField>
</DisplayedFields >
</FolderDefinitio n>
</FolderDefinitio ns>
</FrameData>
</VerticleProcess InterfaceConfig >

The XSL File:

<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<ProfileNames >
<xsl:apply-templates
select="//FrameData[@name='Folders']/FolderDefinitio ns/FolderDefinitio n[@inUse='true']"/>
</ProfileNames>
</xsl:template>
<xsl:template
match="//FrameData[@name='Folders']/FolderDefinitio ns/FolderDefinitio n[@inUse='true']" >
<xsl:text disable-output-escaping="yes"> <ProfileName text="</xsl:text>
<xsl:value-of select="@captio n"/>
<xsl:text disable-output-escaping="yes"> "></xsl:text>
<xsl:value-of select="@profil eName"/>
<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
3158
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 at i_am_the_freshmaka@hotmail.com
3
9163
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 really had any success. I'm pretty sure I should be casting my XPathSelect() call to something so I can get at its attributes. This seems like it should be easy, and maybe I'm missing something obvious. Does anyone have any ideas? Here is the...
2
7450
by: sck10 | last post by:
Hello, How do you set the website proxy using the XmlDataSource control? Thanks, sck10
0
922
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, databindings blow up. However, with data binding removed, it works both ways. The reason I'm doing this is I would like xmldatasource to bind to a sql query rather than a file on hard drive so I need to provide xml as a string.
2
1835
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 property url in the xml which is there Any ideas? ** XML datasource file below
0
2022
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 html page? I just have <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/ my.xml" TransformFile="~/my.xsl"></asp:XmlDataSource>
2
1207
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 html page? I just have <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/ my.xml"
0
971
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> <Date>2007-10-03T12:00:00</Date> <Diary>This is a journey into sound 10/9</Diary> </Blog>
8
2067
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 string sXML = GetXmlFromWebService(Request); XmlDataSource ds = new XmlDataSource(); ds.Data = sXML;
0
8457
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8365
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8788
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7390
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.