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

XPath - accessing nodes with a namespace with no prefi

Subject: XPath - accessing nodes with a namespace with no prefix
From: Philip Vallone <philip.vallone@xxxxxxxxxxx>
Date: Fri, 04 Dec 2009 17:04:26 -0500
 XPath - accessing nodes with a namespace with no prefi
Hi,

This is a pure xpath question.

Suppose I have a namespace declaration like this:

<organizations version="1.0" xmlns="http://www.imsglobal.org/xsd/imscp_v1p1">

The namespace does not have a prefix. I want to use local-name() to access the
nodes but not sure how. For example, how do I access a path like this:

XPATH:

/organizations/organization/title[2]/title

XML:
	<organizations version="1.0"
xmlns="http://www.imsglobal.org/xsd/imscp_v1p1">
		<organization>
			<title>SCORM 2004 4th Edition Manifest Basics Content Example 1.0</title>
			<item>
				<title>Introduction to Manifests</title>
				<adlnav:presentation>
					<adlnav:navigationInterface>
						<adlnav:hideLMSUI>continue</adlnav:hideLMSUI>
						<adlnav:hideLMSUI>previous</adlnav:hideLMSUI>
					</adlnav:navigationInterface>
				</adlnav:presentation>
			</item>
			<item>
				<title>Content Package and Manifest Analogy</title>
				<adlnav:presentation>
					<adlnav:navigationInterface>
						<adlnav:hideLMSUI>continue</adlnav:hideLMSUI>
						<adlnav:hideLMSUI>previous</adlnav:hideLMSUI>
					</adlnav:navigationInterface>
				</adlnav:presentation>
			</item>
		</organization>
	</organizations>


Thanks,

Phil

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.