Allow XIncludes in xml documents we read.
authorDana Jansens <danakj@orodu.net>
Sun, 10 Oct 2010 00:11:28 +0000 (20:11 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 24 Jan 2011 19:19:22 +0000 (14:19 -0500)
Add the XInclude namespace in the default config file (named "xi")

data/rc.xml
doc/rc-mouse-focus.xml
obt/xml.c

index 21b0c87..7faa255 100644 (file)
@@ -3,7 +3,8 @@
 <!-- Do not edit this file, it will be overwritten on install.
         Copy the file to $HOME/.config/openbox/ instead. -->
 
 <!-- Do not edit this file, it will be overwritten on install.
         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>
   <strength>10</strength>
 
 <resistance>
   <strength>10</strength>
index e045321..06c3ce5 100644 (file)
@@ -3,7 +3,8 @@
 <!-- Do not edit this file, it will be overwritten on install.
         Copy the file to $HOME/.config/openbox/ instead. -->
 
 <!-- Do not edit this file, it will be overwritten on install.
         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>
   <strength>10</strength>
 
 <resistance>
   <strength>10</strength>
index ffff150..69810d7 100644 (file)
--- a/obt/xml.c
+++ b/obt/xml.c
@@ -135,7 +135,8 @@ static gboolean load_file(ObtXmlInst *i,
             /* XML_PARSE_BLANKS is needed apparently, or the tree can end up
                with extra nodes in it. */
             i->doc = xmlReadFile(path, NULL, (XML_PARSE_NOBLANKS |
             /* XML_PARSE_BLANKS is needed apparently, or the tree can end up
                with extra nodes in it. */
             i->doc = xmlReadFile(path, NULL, (XML_PARSE_NOBLANKS |
-                                              XML_PARSE_RECOVER));
+                                              XML_PARSE_RECOVER |
+                                              XML_PARSE_XINCLUDE));
             if (i->doc) {
                 i->root = xmlDocGetRootElement(i->doc);
                 if (!i->root) {
             if (i->doc) {
                 i->root = xmlDocGetRootElement(i->doc);
                 if (!i->root) {