473,503 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLT example does not work?

I am trying to work the example on
http://support.microsoft.com/default...;EN-US;q315888 .

I follow esxactly the advice (I beleive):
Here are the files:
WebForm1.aspx:
--
....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Xml id="XmlTransform" runat="server"></asp:Xml>
</form>
</body>
</HTML>
--
(Code Behind for page)
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here

XmlTransform.DocumentSource = Request.QueryString("xml")

XmlTransform.TransformSource = Request.QueryString("xls")

End Sub

----------------------------------------------------------------------------
---------------------

Books.xml

<?xml version="1.0" encoding="utf-8" ?>

<Books>

<Book>

<Title>Beginning XML</Title>

<Author>John</Author>

</Book>

<Book>

<Title>Mastering XML</Title>

<Author>Peter</Author>

</Book>

</Books>

----------------------------------------------------------------------------
---------------------------------

Books.xslt:

<?xml version="1.0" encoding="UTF-8" ?>

<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="Books">

<HTML>

<BODY>

<TABLE BORDER="2">

<TR>

<TD>Title</TD>

<TD>Author</TD>

</TR>

<xsl:for-each select="Book">

<TR>

<TD><xsl:value-of select="Title"/></TD>

<TD><xsl:value-of select="Author"/></TD>

</TR>

</xsl:for-each>

</TABLE>

</BODY>

</HTML>

</xsl:template>

</stylesheet>

------------------------------------------------

the link to see the result in browser ....

http://localhost/SlideShow1/WebForm1...xsl=Books.xslt

but this is the result :

JohnPeter

*It is missing information and is totally unformatted. *

What am I doing wrong?

TIA,

Paolo

Nov 12 '05 #1
2 1823


Paolo Pignatelli wrote:

XmlTransform.TransformSource = Request.QueryString("xls") ^^^
http://localhost/SlideShow1/WebForm1...xsl=Books.xslt

^^^

Those two need to match that is you need to use either xls in both
places or xsl in both places.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
Thanks!!
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:#E**************@tk2msftngp13.phx.gbl...


Paolo Pignatelli wrote:

XmlTransform.TransformSource = Request.QueryString("xls")

^^^
http://localhost/SlideShow1/WebForm1...xsl=Books.xslt

^^^

Those two need to match that is you need to use either xls in both
places or xsl in both places.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #3

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

Similar topics

1
2332
by: David | last post by:
I would like to be able to re-sort data in an HTML table on the without returning to the server. It seems like an XSLT should be able to accomplish this, but I can't find enough information... ...
4
21185
by: Son KwonNam | last post by:
In XSLT, is this possible to get value from xml using XPath which is in XSLT variable? I mean XPath strings can be dynamic while XSL Transforming. If possible, How?? Because I'm not a...
14
24185
by: David Blickstein | last post by:
I have some XML documents that I want to open in a web browser and be automatically translated to HTML via XSLT. I'm using an xml-stylesheet processing command in a file called "girml.xml". ...
4
5227
by: Stephen | last post by:
I have the following that outputs an xml file to a div using ajax: <script type="text/javascript"> function ajaxXML(url,control_id){ if (document.getElementById) { var x =...
3
2228
by: Jack Fox | last post by:
I've never had the need to work with XML, but I believe I now have an appropriate application. I have time-series data in objects organized as a tree that I want an ASP.NET program to write out to...
7
2828
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
3
1996
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as...
18
2043
by: yinglcs | last post by:
Hi, I have a newbie XSLT question. I have the following xml, and I would like to find out the children of feature element in each 'features' element. i.e. for each <featuresI would like to...
1
3787
by: qbp90x5lb | last post by:
I'm using an XSLT transform to output the element value contents from a simple XML file into a new .TXT file. Everything works fine except for certain XML files, when calling msxsl with the .xslt, I...
0
7199
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
7074
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...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5572
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,...
0
4667
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...
0
3161
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...
0
1501
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 ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
374
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...

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.