XInclude and XPointer

In yesterday's meeting, we discussed putting some credits into a
common file that could be references from page files.  I talked
about a few ways this could be done, but my favorite was using
XInclude with XPointer.  I just wasn't sure whether libxml2
supported this feature.

I'm happy to report that Daniel Veillard is made of awesome.
<page xmlns="";>
    <include xmlns="";
      href="info.xml" xpointer="xpointer(*/*)"/>

<info xmlns="";>
  <license><p>Some license terms</p></license>
  <revision pkgversion="2.28"/>

xmllint --xinclude --format
<page xmlns="";>
    <license xmlns="";>
      <p>Some license terms</p>
    <credit xmlns="";>
    <revision xmlns=""; pkgversion="2.28"/>

Have fun.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]