OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrf message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [wsrf] Clarification text for issue #24



Hi Jeff,

Here is an example. If the prefix "vbp" is mapped to
"http://vambenepe.com"; then

/descendant::*[local-name()='hello' and
namespace-uri()='http://vambenepe.com/']

is equivalent to:

//vbp:hello

The longer expression, while a bit less readable, has the advantage of
being self-contained and does not fall apart if someone remaps the
prefix "vbp" to another namespace.

Regards,

William

-----Original Message-----
From: Jeff Bohren [mailto:jbohren@opennetwork.com] 
Sent: Friday, October 22, 2004 1:03 PM
To: wsrf@lists.oasis-open.org
Subject: RE: [wsrf] Clarification text for issue #24

Would that mean that for every reference to a QNamed element, the
namespace-uri() function would be required?
 
Could you post an example of this for those of us who are not XPath
gurus?
 
Jeff Bohren

	-----Original Message----- 
	From: Vambenepe, William N [mailto:vbp@hp.com] 
	Sent: Mon 10/18/2004 11:24 PM 
	To: wsrf@lists.oasis-open.org 
	Cc: 
	Subject: [wsrf] Clarification text for issue #24
	
	

	Hi all,
	
	I had an action item to propose clarification text for issue #24
as well
	as explaining how to write a "Safe" Xpath statement. I just
noticed that
	Steve wrote such a clarification text for the benefit of the WSN
TC so I
	will borrow from this and just add the Xpath example:
	
	<proposed addition>
	
	If the value of the Xpath statement contains QNames, then the
namespace
	declarations that specify the mapping of the QName's prefix to
an actual
	namespace URI can be found amongst any namespace declaration in
scope
	for the element or attribute that contains the Xpath statement
in its
	value.  Note: Some XML processors may modify the namespace
declarations.
	Designers should be aware that such transforms exist and may
render the
	expression incoherent, as it is likely the change in namespace
	declaration will not update a QName embedded within a string.
	
	The way to write a "safe" Xpath statement that is not subject to
	breaking when XML processors modify namespace prefixes is to
test
	explicitly in the Xpath expression for local name and namespace,
using
	the Xpath functions local-name() and namespace-uri().
	
	</proposed addition>
	
	Regards,
	
	William
	



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]