I need to insert what my query returns where test is. I really have no idea how to do that. I have little to none experience in xml and just have been thrown into this by my employer. Thanks in advance,

httpwebwitch

2) pass it into your XSL template as a parameter (read more about that, here [ca3.php.net])

3) use that parameter within your XSLT just as though it was a variable, like this:

<xsl:value-of select='$myparametername'/>

andrewsmd

2:03 pm on Jul 20, 2009 (gmt 0)

Thank you for your response. Is there anywhere I can read about just xml. This site isn't doe in php.

httpwebwitch

6:29 pm on Jul 20, 2009 (gmt 0)

Then what is it done in? To do SQL queries, you must be building the site with a server-side scripting language, like PHP, C#.NET, ASP.NET, JSP, ColdFusion... ?

You can not interact with a database via client-side XML and XSLT alone.

andrewsmd

6:36 pm on Jul 20, 2009 (gmt 0)

It is an asp dot net storefront website that was custom built for us. We had a client call in and want the layout of this confirmation email sent changed. ASP is the server language used. This project is enormous and I was just thrown into it. I have managed to send the total order and test where they should be positioned. I just copied the syntax to create the query from another query already in the xml file. If I need to edit some asp page, then is there somewhere in the xml file that would point to that script so I would know which one to edit? I really have never worked with this at all and so it's rather daunting.

httpwebwitch

8:27 pm on Jul 20, 2009 (gmt 0)

Since it's custom-built, I'm guessing there is no documentation nor support, and the developer(s) who built it are long gone. Am I right.

If so, the only documentation you'll have is the XML template you've got that was left behind w/ the existing store. Do you see any other places where a <query> is defined, and the results are inserted into HTML?

For instance, skim through the XML looking at all places where the word "OrderSum" appears. Maybe the back-end is reading the XML, performing DB transactions, then rewriting the XML with data injected into it.

Since it's ASP.NET, it's possible you're dealing with a compiled DLL, not the raw source code. Do you have the entire .NET Solution available (a *.sln file), and/or all the little *.cs files that make up the project? (please say yes)! In Visual Studio, I'd start with a File-In-Files search for "XML" or "XSLT" or "transform" or "param" and see what turns up in the source code. Then you can put it in "debug mode", add breakpoints, and step through the methods a line at a time and watch what happens as the XML is parsed and turned into an email message.

I've used C# (ASP.NET) on quite a few projects, but it is not my primary language. If this turns out to be an ASP.NET problem, we may need to rope in some help from people in the ASP.NET forum.

andrewsmd

8:47 pm on Jul 20, 2009 (gmt 0)

I have all of the cs code behinds. It is a web project, but if I have to edit the cs files, I can just re publish it. I copied that query syntax following another query on the same page. I know quite a bit about asp.net but I develop in VB. If I need help in the cs, I can get that somewhere else. Right now, I don't even really know what I am supposed to change to make the xml do what I want to. I'll post a couple pieces of the file to see if that helps you any. Here is a query that was already in the file

<!-- ITEM_START --> <xsl:apply-templates select="/root/OrderItems/lineitem" /> <!-- ITEM_END --> <tr> <td></td> <td valign="top" align="left">Total Order</td> <td valign="top" align="left">test</td> </tr> </table> I notice the root/OrderItems/lineitem. Does that have anything to do with it? It was my assumption that xml files had to have a layout already defined and then they could populate that. I can't seem to find this layout anywhere though? I really don't know enough to make too many assumptions though :). Thanks for all of your help.