Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL
Html5/XML-XSL Html5/XML-XSL
Html5/XML-XSL
Go Back  Xtreme Visual Basic Talk > > > Html5/XML-XSL


Reply
 
Thread Tools Display Modes
  #1  
Old 04-16-2013, 10:47 AM
dmccarthy259 dmccarthy259 is offline
Newcomer
 
Join Date: Apr 2013
Posts: 2
Default Html5/XML-XSL


I just want to start off by saying that I am very new to web programming, but I have been doing a lot of reading from my public library on this topic. So any help at all is greatly appreciated!

I have made a table in XML along with a XSL file and when I view the XML file the table looks like I want it to. The trouble I am having is that when I view the XML table inside my html page all the data is there but the format is gone. I know it is the way I am putting it into my html page that is not correct. I will include screen shots of my code.





Thanks
dmccarthy259
Attached Images
File Type: png pic3.png (29.0 KB, 3 views)
File Type: png garden_page.png (28.5 KB, 3 views)
File Type: png pic1.png (20.3 KB, 3 views)
File Type: png pic2.png (34.9 KB, 3 views)
Reply With Quote
  #2  
Old 04-18-2013, 08:00 AM
dmccarthy259 dmccarthy259 is offline
Newcomer
 
Join Date: Apr 2013
Posts: 2
Default

Ok,

So on my own I figured out I had my xsl file incorrect, I still don't know how use the "href" command in my html file to link to the xml file (Specials.xml), and where I can put it like can it be inside <section> tags? Both the files (xml and xsl are located with the .html files). Any help would again be greatly appreciated.







XML below


<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<?xml-stylesheet type="text/xsl" href="Special.xsl" ?>
<Specials>
<deal>
<name>1TB Harddrive </name>
<price>$85.95</price>
<description>Great way to back-up all those pictures! </description>
<day>** Tuesday's Only **</day>
</deal>
</Specials>


XSL below


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

<xsl:template match="/">
<html>
<body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
<table border="5">
<tr bgcolor="#6599FF">
<th> Name </th>
<th> Price </th>
<th> Description </th>
<th> Day </th>
</tr>
<xsl:for-each select="Specials/deal">
<xsl:sort select="price"/>
<tr>
<td> <xsl:value-of select="name"/></td>
<td> <xsl:value-of select="price"/></td>
<td> <xsl:value-of select="description"/></td>
<td> <xsl:value-of select="day"/></td>
</tr>

</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>


Thanks dmccarthy259
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL Html5/XML-XSL
Html5/XML-XSL
Html5/XML-XSL
 
Html5/XML-XSL
Html5/XML-XSL
 
-->