[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

AW: Namespace ?

Subject: AW: Namespace ?
From: Costantino.Sertorio@xxxxxxxxxxxx
Date: Thu, 25 Jul 2002 14:39:02 +0200
hr xml john doe
That's because your XML has a default namespace. 
You have to change a few things in your stylesheet to select elements in a
default namespace.
You can find the answer to your problem here:
http://www.topxml.com/people/bosley/defaultns.asp

Costantino

-----Ursprüngliche Nachricht-----
Von: stephane [mailto:sbirot@xxxxxxxxxxxxxx]
Gesendet am: Donnerstag, 25. Juli 2002 14:28
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff:  Namespace ?

I want to extract the FormattedName from the following XML file:

<?xml version="1.0" encoding="UTF-8"?>
<Resume xmlns="http://ns.hr-xml.org/RecruitingAndStaffing/SEP-2_0">
	<StructuredXMLResume>
		<ContactInfo>
			<PersonName>
				<FormattedName>John Doe</FormattedName>
			</PersonName>
		</ContactInfo>
	</StructuredXMLResume>
</Resume>

I use the following XSL file:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<html>
<head>
    <title>
        <xsl:value-of
select="Resume/StructuredXMLResume/ContactInfo/PersonName/FormattedName"
/>
    </title>
</head>
<body>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

But this does not work.
In the XML file if I replace
<Resume xmlns="http://ns.hr-xml.org/RecruitingAndStaffing/SEP-2_0">
By
<Resume>
This work fine

Could anybody explain me why ?

---
Stéphane



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.