Allow XIncludes in xml documents we read.

Add the XInclude namespace in the default config file (named "xi")
This commit is contained in:
Dana Jansens 2010-10-09 20:11:28 -04:00
parent 6dedf8f37e
commit 4f8503c2c5
3 changed files with 6 additions and 3 deletions

View file

@ -3,7 +3,8 @@
<!-- Do not edit this file, it will be overwritten on install. <!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. --> Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc"> <openbox_config xmlns="http://openbox.org/3.4/rc"
xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance> <resistance>
<strength>10</strength> <strength>10</strength>

View file

@ -3,7 +3,8 @@
<!-- Do not edit this file, it will be overwritten on install. <!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. --> Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc"> <openbox_config xmlns="http://openbox.org/3.4/rc"
xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance> <resistance>
<strength>10</strength> <strength>10</strength>

View file

@ -135,7 +135,8 @@ static gboolean load_file(ObtXmlInst *i,
/* XML_PARSE_BLANKS is needed apparently, or the tree can end up /* XML_PARSE_BLANKS is needed apparently, or the tree can end up
with extra nodes in it. */ with extra nodes in it. */
i->doc = xmlReadFile(path, NULL, (XML_PARSE_NOBLANKS | i->doc = xmlReadFile(path, NULL, (XML_PARSE_NOBLANKS |
XML_PARSE_RECOVER)); XML_PARSE_RECOVER |
XML_PARSE_XINCLUDE));
if (i->doc) { if (i->doc) {
i->root = xmlDocGetRootElement(i->doc); i->root = xmlDocGetRootElement(i->doc);
if (!i->root) { if (!i->root) {