W3C home > Mailing lists > Public > xproc-dev@w3.org > August 2013

Re: Is the xpath() xpointer scheme namespace-aware?

From: David Cramer <david@thingbag.net>
Date: Tue, 06 Aug 2013 09:14:03 -0500
Message-ID: <520104AB.1080309@thingbag.net>
To: Geert Josten <geert.josten@dayon.nl>
CC: XProc Dev <xproc-dev@w3.org>
On 08/06/2013 01:57 AM, Geert Josten wrote:
> Sounds like it should be possible in principle. Are you observing
> unexpected output or errors?

Sorry, neglected to mention those details:

If I refer to an element unprefixed, *[not(self::title)], it doesn't
match the element (i.e. the title elements appear in the result doc).

If I use a prefix, *[not(self::db:title)] where 'db' is bound to
http://docbook.org/ns/docbook, I get the error:

XD0023:Expression could not be evaluated

Reading http://www.w3.org/TR/xproc/#err.inline.D0023, it seems like both
of these should work: "When the XProc processor evaluates an XPath
expression using XPath 1.0, unless otherwise indicated by a particular
step, it does so with the following initial context...in-scope
namespaces...The namespace bindings in-scope on the element where the
expression occurred."


> Kind regards,
> Geert
>> -----Oorspronkelijk bericht-----
>> Van: David Cramer [mailto:david@thingbag.net]
>> Verzonden: maandag 5 augustus 2013 23:04
>> Aan: XProc Dev
>> Onderwerp: Is the xpath() xpointer scheme namespace-aware?
>> Hi there,
>> I'm processing DocBook xml with Calabash and using xinclude with the
>> xpath() scheme to pull in all the children of a section EXCEPT for the
>> title. The following works fine, but is inelegant:
>> <xi:include
>> href="test.xml"
>> xpointer="xpath(//*[@xml:id = 'test']/*[not(local-name(.) = 'title')])">
>> I was expecting to be able to do:
>> //*[@xml:id = 'test']/*[not(self::title)]
>> or (assuming I'd bound http://docbook.org/ns/docbook to 'db'):
>> //*[@xml:id = 'test']/*[not(self::db:title)]
>> Is the xpath scheme namespace-aware?
>> Regards,
>> David
Received on Tuesday, 6 August 2013 14:14:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:13 UTC