[Openstack-docs] Use of XML xi:include with xpointer

Sean Roberts seanrob at yahoo-inc.com
Tue Aug 6 19:41:23 UTC 2013


oxygen is complaining about pointer scheme xpath is not supported and that a well-formed document requires a root element
maven fails with expression could not be evaluated.

<chapter xmlns="http://docbook.org/ns/docbook"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
  xml:id="bk001-ch003-associate-general">
  <title>Associate General</title>
 <xi:include href="../basic-install/src/basic-install_controller-common.xml" xpointer="xmlns(db=http://docbook.org/ns/docbook) xpath(//*[@xml:id = 'controller-os']/*[not(self::db::title)])">
    <xi:fallback/></xi:include>

source:
<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
    xml:id="basic-install_controller-common">
                <title>Common services</title>
          <section xml:id="controller-os">
        <title>Operating System</title>…..


Sean Roberts
Infrastructure Strategy
seanrob at yahoo-inc.com<mailto:seanrob at yahoo-inc.com> (925) 980-4729

On Aug 6, 2013, at 11:57 AM, David Cramer <david.cramer at rackspace.com<mailto:david.cramer at rackspace.com>>
 wrote:

Small correction to the example (I'd left the 'db=' out of the :

<xi:include href="test.xml"
 xpointer="xmlns(db=http://docbook.org/ns/docbook)
 xpath(//*[@xml:id = 'test']/*[not(self::db:title)])">
 <xi:fallback/>
</xi:include>

David

On 08/06/2013 01:48 PM, David Cramer wrote:
On 08/06/2013 12:25 PM, Shaun McCance wrote:
...
In my experiments, I haven't gotten Calabash to be namespace-aware when
handling the xpath expressions. I've posted a question to xproc-dev
about this to find out what's up.

Does it not respect the xmlns() scheme? That seems to be some sort of
standard, according to this page:

http://www.w3.org/2005/04/xpointer-schemes/

That was it. I hadn't declared the prefix in the xpointer attr. This works:

<xi:include href="test.xml"
 xpointer="xmlns(http://docbook.org/ns/docbook)
           xpath(//*[@xml:id = 'test']/*[not(self::db:title)])">
<xi:fallback/>
</xi:include>

So now to harangue the Oxygen folks to support xpath(), but there's
nothing to stop us from using it already. Just include the xi:fallback
to keep oxygen from freaking out.

David



_______________________________________________
Openstack-docs mailing list
Openstack-docs at lists.openstack.org<mailto:Openstack-docs at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs



_______________________________________________
Openstack-docs mailing list
Openstack-docs at lists.openstack.org<mailto:Openstack-docs at lists.openstack.org>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-docs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20130806/4483beb0/attachment-0001.html>


More information about the Openstack-docs mailing list