![]() |
|
Resolving xinclude statements with xpointer using xmllint
You want to use the
Example 1, “Bad Example 1. Bad <!-- This is INCORRECT -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="filename.xml"
xpointer="xpointer(//title[1])"/>
However, with DocBook 5.0, this statement will not work
correctly because
Give the Example 2. Good <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="filename.xml"
xpointer="xmlns(db=http://docbook.org/ns/docbook)xpointer(//db:title)"/>
Namespaces are powerful constructs, but they require attention to detail, especially when you move from a non-namespaced to a namespaced environment.
| |