[Openstack-docs] Use of XML xi:include with xpointer
Sean Roberts
seanrob at yahoo-inc.com
Tue Sep 17 04:44:00 UTC 2013
I was able to get <xi:include href="../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:include href="../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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-docs/attachments/20130917/5ed34dcb/attachment-0001.html>
More information about the Openstack-docs
mailing list