473,395 Members | 1,574 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,395 software developers and data experts.

errors in xslt

i have an xml file that looks like this..

<CustOrder>
<OrderInfo>
<Customer>
<Name>Me</Name>
<Address>1 anystreet ave</Address>
<Apt>1</Apt>
<City>anytown</City>
<State>CT</State>
<Zip>06450</Zip>
<eMail>a@b.com</eMail>
</Customer>
<Order>
<Items>2</Items>
<Total>$9.90</Total>
</Order>
</OrderInfo>
<Cart>
<Item>
<ItemDesc>Scout Jokes</ItemDesc>
<ItemKey>ScoutJokes</ItemKey>
<ItemQty>1</ItemQty>
</Item>
<Item>
<ItemDesc>Scoutmaster's Minutes</ItemDesc>
<ItemKey>ScoutMastMin</ItemKey>
<ItemQty>1</ItemQty>
</Item>
</Cart>
</CustOrder>

my xsl file looks like this..
<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<template match="/CustOrder/OrderInfo/Customer">
<apply-templates select="Customer" />
<h1><text>Order Form</text></h1>
<h2><value-of select="Name" /></h2>
<h2><value-of select="Address" /></h2>
<h2><value-of select="Apt" /></h2>
<h2><value-of select="City" /> <value-of select="State" /> <value-of
select="Zip" /></h2>
<h2><value-of select="eMail" /></h2>
</template>
<template match="/CustOrder/OrderInfo/Order">
<apply-templates select="Order" />
</template>
</stylesheet>

i get the following error when assigning my xsl file to the TransformSource
attribute of the xml control..

'h1' cannot be a child of 'template' element

can anyone give me a clue as to what's wrong??
Nov 18 '05 #1
0 779

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

Similar topics

2
by: ted | last post by:
Was wondering if XSLT alone is appropriate for the following situation. From XML, I'm creating a small website (around 50 pages) with pages that link to each other through a nav menu and a...
1
by: Mohit | last post by:
Hi Friends I have to call 1 of the 2 child XSLT files from the Main XSLT file based on some criteria. I want one child XSLT file will be executed by version 1 of XSLT processor and the other by...
0
by: Rolf Kemper | last post by:
Dear All, I'm facing the problem below and need some advice/help on it. I'm loading various XML files via the document function into my XSLT. As long all files exist, it's fine. But when a...
3
by: Teksure | last post by:
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about...
2
by: Daniel | last post by:
how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo"
1
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT...
6
by: quanghoc | last post by:
Hi all, I used XMLSpy to validate my XML but it catched one error at a time. Is there anyway to make XMLSpy to catch all errors at once. If XMLSpy does not have this feature, what software out...
28
by: Neo Geshel | last post by:
NOTE: PAST EXPERIENCE HAS SHOWN ME THAT MANY ON USENET FAIL TO READ ARTICLES PROPERLY PRIOR TO ANSWERING. I AM LOOKING FOR VERY SPECIFIC INFORMATION, THEREFORE PLEASE READ AND UNDERSTAND...
12
by: Chris | last post by:
Hi, Just wondering if anyone out there knows if it is possible to convert a CSV to xml using XSLT? I've seen a lot of examples of xml to CSV, but is it possible to go back the other way? I...
2
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.