473,799 Members | 3,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's wrong with my XSL ?

What am I doing wrong ?
Here is my XML:
<?xml version="1.0" standalone="yes "?>
<Specials xmlns="http://tempuri.org/Specials.xsd">
<Trip>
<ID>0</ID>
<Lieux>Canada </Lieux>
<Hotel>Clarendo n</Hotel>
<Depart>1er janvier</Depart>
<Duree>1 semaine</Duree>
<Prix>450$</Prix>
<ToutCompris>fa lse</ToutCompris>
<Rating>4.5</Rating>
<Description>Ho tel dans le vieux Québec</Description>
</Trip>
</Specials>

Here is my XSL
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="Special s/Trip">
<p><xsl:value-of select="Lieux"/></p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Nothing is output
Jul 20 '05 #1
2 1371
The expression

<xsl:for-each select="Special s/Trip">

matches nodes in the default namespace, but your "Specials" node is not in
the default namespace its in the xmlns="http://tempuri.org/Specials.xsd" so
there is no match.

You can confirm this by removing the
'xmlns="http://tempuri.org/Specials.xsd"' and the transform will then work.

Hope that helps.

John Farrow
"WebSLS" <fr************ *@sls.gouv.qc.c a> wrote in message
news:e8******** *************** **@posting.goog le.com...
What am I doing wrong ?
Here is my XML:
<?xml version="1.0" standalone="yes "?>
<Specials xmlns="http://tempuri.org/Specials.xsd">
<Trip>
<ID>0</ID>
<Lieux>Canada </Lieux>
<Hotel>Clarendo n</Hotel>
<Depart>1er janvier</Depart>
<Duree>1 semaine</Duree>
<Prix>450$</Prix>
<ToutCompris>fa lse</ToutCompris>
<Rating>4.5</Rating>
<Description>Ho tel dans le vieux Québec</Description>
</Trip>
</Specials>

Here is my XSL
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> <xsl:template match="/">
<xsl:for-each select="Special s/Trip">
<p><xsl:value-of select="Lieux"/></p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Nothing is output

Jul 20 '05 #2
Thanks you

"john farrow" <ge****@xmldpf. com> wrote in message news:<_F******* *************@n ews02.tsnz.net> ...
The expression

<xsl:for-each select="Special s/Trip">

matches nodes in the default namespace, but your "Specials" node is not in
the default namespace its in the xmlns="http://tempuri.org/Specials.xsd" so
there is no match.

You can confirm this by removing the
'xmlns="http://tempuri.org/Specials.xsd"' and the transform will then work.

Hope that helps.

John Farrow
"WebSLS" <fr************ *@sls.gouv.qc.c a> wrote in message
news:e8******** *************** **@posting.goog le.com...
What am I doing wrong ?
Here is my XML:
<?xml version="1.0" standalone="yes "?>
<Specials xmlns="http://tempuri.org/Specials.xsd">
<Trip>
<ID>0</ID>
<Lieux>Canada </Lieux>
<Hotel>Clarendo n</Hotel>
<Depart>1er janvier</Depart>
<Duree>1 semaine</Duree>
<Prix>450$</Prix>
<ToutCompris>fa lse</ToutCompris>
<Rating>4.5</Rating>
<Description>Ho tel dans le vieux Québec</Description>
</Trip>
</Specials>

Here is my XSL
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0"

xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="Special s/Trip">
<p><xsl:value-of select="Lieux"/></p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Nothing is output

Jul 20 '05 #3

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

Similar topics

125
14863
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
5
2839
by: titan0111 | last post by:
#include<iostream> #include<iomanip> #include<cstring> #include<fstream> using namespace std; class snowfall { private: int ft;
72
5900
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for example, between a C/C++ programmers with a few weeks of experience and a C/C++ programmer with years of experience. You don't really need to understand the subtle details or use the obscure features of either language
121
10188
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
28
3283
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr(); fopen("c:\\autoexec.bat","r")&&printf("success") || printf("error opeing
56
4345
by: Cherrish Vaidiyan | last post by:
Frinds, Hope everyone is doing fine.i feel pointers to be the most toughest part in C. i have just completed learning pointers & arrays related portions. I need to attend technical interview on C. wat type of questions should be expected? Which part of C language do the staff give more concern? The interviewers have just mentioned that .. i will have interview on C. Also can anyone can help me with sites where i can go thru sample
46
4263
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do believe MSFT should do to improve C#, however. I know that in the "Whidbey" release of VS.NET currently
13
5061
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
9
2126
by: Pyenos | last post by:
import cPickle, shelve could someone tell me what things are wrong with my code? class progress: PROGRESS_TABLE_ACTIONS= DEFAULT_PROGRESS_DATA_FILE="progress_data" PROGRESS_OUTCOMES=
3
2150
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when Record (i) is shown and modified, the change will come to Record (i+1). Can anyone provide suggestion? thanks.
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10259
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7570
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
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 we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.