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

xPath and default namespaces.

Subject: xPath and default namespaces.
From: dwight funk <dfunk@xxxxxxxxxxxxxxx>
Date: Wed, 11 Apr 2001 13:25:04 -0500
xpath and default namespaces
I'm having some problems with resolving an xPath expression on some XML that
sets a default namespace like this XHTML code.

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Testing Title</title>
	</head>

	<body bgcolor="#FFFFFF" text="#000000">
		<p>Test</p>
	</body>
</html>

The XPath expression will not work : "//body".  Why not ?
I've noticed it works if I include an extra colon in the xmlns or give the
namespace a name.

	<html xmlns:xhtml="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">

I assume this is not syntactically correct and a deviation from the XHTML
standard
I've been told that this behavior is part of the xPath specification.  xPath
doesn't like default namespaces.

What is going on here ???

Dwight Funk
POWERWAY, Inc.
(317) 566-5401
MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT
IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL
AND EXEMPT FROM DISCLOSURE. If the reader of this message is not the
recipient or an employee or agent responsible  for delivering the message to
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.  If
you have received this communication in error, please notify the sender
immediately by E-Mail and return the original message to the sender.  Thank
you.

 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.