473,407 Members | 2,359 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,407 software developers and data experts.

My XSL document causes my XML to disappear.

Stats:
Chrome 11.0
Notepad++

Basically i wrote some XSL and linked it to my XML and then Google Chrome won't display the XML file. The code is below.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  <xsl:template match="/">
  4. <html>
  5.          <body>
  6.              <xsl:for-each select="recipebook/recipe">
  7.                  <h1><xsl:value-of select="name"/></h1>
  8.                      <xsl:for-each select="ingredientlist/ingredient">
  9.                          <xsl:value-of select="."/>
  10.                      </xsl:for-each>
  11.                      <xsl:for-each select="preparation/step">
  12.                          <xsl:value-of select="."/>
  13.                      </xsl:for-each>
  14.  
  15.              </xsl:for-each>
  16.          </body>
  17.      </html>
  18. </xsl:template>
  19. </xsl:stylesheet>
  20.  
and there are no error codes that chrome 11 gave.
May 23 '11 #1
5 2454
Dormilich
8,658 Expert Mod 8TB
well, not sure if this is really your XSL, but if it is, it is invalid (missing closing tags of <xsl:template>, & <xsl:stylesheet>, invalid use of a second <xsl:stylesheet> tag, missing XML declaration)
May 23 '11 #2
i replaced the two final xsl tags with closing tags and i alredy added the declaration, but no.
oh, and it really is my XSL for a DTD i made.
May 24 '11 #3
Dormilich
8,658 Expert Mod 8TB
remove the second <xsl:template>, you can only have one root element.
May 24 '11 #4
where is the second template? i have only 1 template.
May 26 '11 #5
Dormilich
8,658 Expert Mod 8TB
it may have been in a previous display or I just nod had enough coffee …

anyways, are you sure your XPath expression matches?
May 26 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dom | last post by:
Hi, I am trying to get a dynamic table going. You click a button to add a row. In the newly created row a button to delete the row is placed (try the code example below). In Netscape, pressing...
4
by: Ike | last post by:
How can I make a textarea appear or disappear at the click of a button or link? Thanks, Ike
2
by: mja674s | last post by:
I'm making a date picker. It shows up fine. The problem is that I want it to disappear if I click outside the calendar itself. However, if I click *on* the calendar itself, it should not...
0
by: Sunil Menon | last post by:
Dear All, I have written an application in ASP.Net where clients can upload their document on the WebServer. <input type="file" id="FileToUpload" name="FileToUpload"> The function...
2
by: Jonathan Trevor | last post by:
Hi, For the last couple of releases of a product we're developing we've been running to very wierd behavior from IE and our ASP.NET web application which serves up various types of files and I'm...
5
by: Mitchell Vincent | last post by:
A picture says a thousand words, so here are 2! Design Time: http://www.ksoftware.net/examples/Clip1.jpg Run Time: http://www.ksoftware.net/examples/Clip2.jpg The problems started when I...
4
by: alternium | last post by:
Hi all, Thanks for providing this forum. I know every other poster tries to hammer the time-sensitivity point, so I'll forego that. Suffice to say, Monday is go-day. I'm having an issue getting my...
7
by: gnewsgroup | last post by:
In my asp.net 2.0 web application, in Web.config, I have timeout="30", s l i d i n g E x p i r a t i o n = "true" for the Authentication element. I suppose, this means that as long as we...
8
by: omlac | last post by:
im creating controls using javascript, but whenever there is a postback on the page all the controls created in javascript disappear. How do i fix this problem. the code below shows how im creating...
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
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
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...
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,...
0
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.