xsl-list
[Top] [All Lists]

RE: simpler matching of qnames in content?

2005-12-05 04:53:40
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(_dot_)downey(_at_)whatfettle(_dot_)com] 
Sent: 05 December 2005 10:14
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--