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

RE: simpler matching of qnames in content?

Subject: RE: simpler matching of qnames in content?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 5 Dec 2005 11:53:40 -0000
soap11
I imagine that your

build-QName-from-the-context-of-XPath-processor('wsa:foo')

is just 

xs:QName('wsa:foo')

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: Paul Downey [mailto:paul.downey@xxxxxxxxxxxxxx] 
> Sent: 05 December 2005 10:14
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  simpler matching of qnames in content?
> 
> 
> I'm building a series of XPath 2.0 tests to check the validity
> of SOAP messages (I'm using a Saxon 8.3 processor).
> 
> I'm testing content containing a qname, e.g.:
> 
>   <env:Envelope
>     xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
>     xmlns:addr="http://www.w3.org/2005/08/addressing">
>     <env:Header>
>       <addr:QNameRef>addr:foo</addr:QNameRef>
>       ...
> 
> 
> and I've a bunch of XPaths in my stylesheet which look like:
> 
>    resolve-QName(soap11:Envelope/soap11:Header/wsa:QNameRef,
> 	soap11:Envelope/soap11:Header/wsa:QNameRef)
> 
>    = QName('http://www.w3.org/2005/08/addressing', 'foo')
> 
> 
> and work fine, but are a bit wordy.
> 
> given that the prefixes 'soap11', 'wsa', etc are already known to
> the XPath processor, is there a way of saying:
> 
>    resolve-QName(soap11:Envelope/soap11:Header/wsa:QNameRef,
> 	soap11:Envelope/soap11:Header/wsa:QNameRef)
> 
>    = build-QName-from-the-context-of-XPath-processor('wsa:foo')
> 
> or even
> 
>    resolve-QName(soap11:Envelope/soap11:Header/wsa:QNameRef, .)
>         = build-QName('wsa:foo')
> 
> I guess if not, I could resort to using entities to save duplication,
> but can see that getting messy too.
> 
> TIA
> Paul
> --
> http://blog.whatfettle.com

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.