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

David Cramer david.cramer at rackspace.com
Tue Sep 17 05:23:32 UTC 2013


On 09/17/2013 12:13 AM, Sean Roberts wrote:
> xpointer="xpointer(//chapter[@id='basic-install_architecture']/title/following-sibling::*)"/>

That won't work. The clouddocs-maven-plugin doesn't support the
xpointer() scheme.

> fails on build with same SEVERE: 100:40:err:XD0023:Expression could not
> be evaluated
> 
> *David and Shaun: **Should we just dump trying to use xpointer and
> xpath?  I'd really like to be able to include and parse content, but
> maybe this "working draft" isn't the way to go.  *
> *
> *
> *Shaun: should the training-guides just make it simple by using a solid
> release version of the install guide and scrape content while providing
> a backllink to the original?*

Where are you trying to pull this into? Which doc? I'll try to get it
set up and send you a working example.

David

> 
> Sean Roberts
> Infrastructure Strategy
> seanrob at yahoo-inc.com <mailto:seanrob at yahoo-inc.com> (925) 980-4729
> 
> On Sep 16, 2013, at 9:44 PM, Sean Roberts <seanrob at yahoo-inc.com
> <mailto:seanrob at yahoo-inc.com>>
>  wrote:
> 
>> I was able to
>> get <xi:includehref="../install-guide/basic-install-files/basic-install_architecture.xml"xpointer="xmlns(db=http://docbook.org/ns/docbook)
>> xpath(//*[@xml:id = 'basic-install_architecture'])"> to work where the
>> xml:id matches an xml:id in the included file. 
>>
>> but what I really like to do is something like 
>> <xi:includehref="../install-guide/basic-install-files/basic-install_architecture.xml"xpointer="xmlns(db=http://docbook.org/ns/docbook)
>> xpath(//*[@xml:id =
>> 'basic-install_architecture']/*[not(self:db:chapter)])">
>>
>> where I could include content, but strip out the source path hierarchy
>> and replace it with new. 
>> The reasoning is to change source chapters or sections into just raw
>> content that could be inserted into an existing section or chapter. 
>>
>>
>> Sean Roberts
>> Infrastructure Strategy
>> seanrob at yahoo-inc.com <mailto:seanrob at yahoo-inc.com> (925) 980-4729
>>
>> On Aug 6, 2013, at 1:37 PM, David Cramer <david.cramer at rackspace.com
>> <mailto:david.cramer at rackspace.com>> wrote:
>>
>>> On 08/06/2013 02:41 PM, Sean Roberts wrote:
>>>> 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.
>>>>
>>>> <chapterxmlns="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:includehref="../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)])">
>>>
>>> Ok, change self::db::title to self::db:title (just a single colon
>>> between the namespace prefix and the element name).
>>>
>>> You will see that warning in Oxygen, but it's just a warning (not a
>>> validation error). This is because Oxygen doesn't recognize the xpointer
>>> schemes. I'll contact Oxygen to ask if they plan to add support for the
>>> xmlns and xpath schemes.
>>>
>>> Btw., it looks like the content you're including uses conditional
>>> text/profiling. So you'll want to add to the configuration section of
>>> your pom a param to indicate which profile you want (e.g. ubuntu).
>>> Otherwise you get all conditions:
>>>
>>> <profileOs>ubuntu</profileOs>
>>>
>>> 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
> 




More information about the Openstack-docs mailing list