W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2002

Re: XPath on encoded SOAP documents

From: Jeni Tennison <jeni@jenitennison.com>
Date: Sat, 16 Mar 2002 13:03:14 +0000
Message-ID: <45276337993.20020316130314@jenitennison.com>
To: Mike Schilling <mschilling@edgility.com>
CC: www-xpath-comments@w3.org
Hi Mike,

> XPath 2.0 as currently defined cannot process encoded SOAP
> documents. It's possible to add a new type of axis to remedy this.
> The implementation costs are non-zero but not prohibitive. The
> definition of this axis is straightforward, result in something
> subtly different from the other axes.

I wonder whether the "general steps" in XPath 2.0
(http://www.w3.org/TR/xpath20/#id-general-steps) meet some of your
needs.

As you've said, it's possible to define an extension function that
dereferences encoded references, with a signature of:

  element soap:dereference(element)

The element argument is the element with the href attribute or nested
information. The element returned is the referenced element, or the
argument element itself if it contains nested information.

Implemented in XSLT, it might look like:

<xsl:function name="soap:dereference">
  <xsl:param name="element" type="element" />
  <xsl:result select="if ($element/@href)
                      then id(substring($element/@href, 2))
                      else $element" />
</xsl:function>

You could then perhaps do something like:

  n:getOrderStatusResult
    /soap:dereference(Result)
    /soap:dereference(shipToInfo)

to get from the n:getOrderStatusResult to the shipTo information.

Would that meet your requirement?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Saturday, 16 March 2002 08:03:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:54 GMT