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

XSLT: not matching anything

Ian
Would someone please take a look at http://www.otima.ca/XML/auto.xslt
and tell me why I am not getting to the

<xsl:template match="auto">
<p><xsl:value-of select="."/></p>
</xsl:template>

Let me say, I am building this xslt document one step and a time ...
and at this point I haven't got up to the baby step yet. The
associated XML file is in the same folder and is called auto.xml.

Signed a student in need.

Ian
Jul 20 '05 #1
2 1717
On 27 Jan 2005 20:53:19 -0800, Ian <ia*********@gmail.com> wrote:
The associated XML file is in the same folder and is called
auto.xml.


The file at:

http://www.otima.ca/XML/auto.xml

is not well-formed. (There's a '</auto>' on line 64 with no
corresponding start tag.) Further, you've specified a namespace for
your source document (http://www.otima.ca), but not for the elements
to match in your template in the XSLT. You need to declare the
namespace in your XSLT, and then qualify the element names with it.
For example,

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:foo="http://www.otima.ca">
....
<xsl:apply-templates select="foo:dealership/foo:auto"/>
....
--
Paul.

Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
Jul 20 '05 #2
Hi Paul,

Thank you for pointing out the extra </auto> tag, I am working on a
localhost and then I pasting it (incorrectly) over to my net copy when
I need help.

I have made the changes as indicated and life is good. (I am taking
XML at a local university and the teacher is not a subject matter
expert. Luckily, due to class complaints, he won't be teaching the
advanced XML).

Thanks for the lesson!

Ian

Paul A. Hoadley wrote:
On 27 Jan 2005 20:53:19 -0800, Ian <ia*********@gmail.com> wrote:
The associated XML file is in the same folder and is called
auto.xml.


The file at:

http://www.otima.ca/XML/auto.xml

is not well-formed. (There's a '</auto>' on line 64 with no
corresponding start tag.) Further, you've specified a namespace for
your source document (http://www.otima.ca), but not for the elements
to match in your template in the XSLT. You need to declare the
namespace in your XSLT, and then qualify the element names with it.
For example,

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:foo="http://www.otima.ca">
...
<xsl:apply-templates select="foo:dealership/foo:auto"/>
...
--
Paul.

Logic Squad -- Technical Publishing with XML --

http://logicsquad.net/

Jul 20 '05 #3

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

Similar topics

1
by: Joachim Spoerhase | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I am a XSLT-beginner and i read the XSLT-recommendation of the W3C through. But I did'nt really understand section 5.5 of the latest...
7
by: Kofi Sarfo | last post by:
Wondering what I'd use to evaluate the following to return 'Easy' <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="Answers.xsl"?> <answers> <answer>...
5
by: Brett conklin | last post by:
I would like to not use the google groups as a crutch in my XSLT journey. What is the best xslt reference out there? Is it a book? Is it a web site? I am finding that I can come up with nearly...
4
by: Moogy | last post by:
I'm pulling my hair out here. First, I'm new to XML, so that doesn't help, but none of this makes any sense to me. All I'm trying to do is take a simple source XML file and translate it with an...
6
by: Mike P | last post by:
I am quite new to XML and XSLT, and I know you can apply XSLT to XML to display data in an XML file according to the XSLT file, but is it possible to apply an XSLT file to page/s of HTML, so that...
4
by: | last post by:
Hi Guys, I am using XSLT to render my XML dataset at the client side to HTML code. When I am trying to load the XslTransform with an Xslt file, it gives me the following error. >>>> The...
3
by: abhishek.smu | last post by:
Given an XML like: <root> <node>8</node> <node>21</node> <node>-7</node> <node>13</node> <node>43</node> <node>2</node> </root>
2
by: Efi Merdler | last post by:
Hello, As I understand it is impossible in xslt to change the value of a variable after you assigned a value to it. I would like to simulate a flag. For example if something happens in template...
3
by: z1 | last post by:
hi- i am fooling around with soap and weather templates. for some reason either this if or select is failing. i am very new to xml and found this code at another site. i can show you the xml...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.