[PATCH 09/21] xml: virXMLNamespace: add prefix

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

 



We have hardcoded the namespace prefix in various places:
1) the xmlns string stored in the 'href' function
2) the xmlXPathRegisterNs call in each parser
3) all the parsing and formatting code actually dealing
   with these elements

While eliminating the third one is probably a job for an
actual XML-aware formatter, let's store the prefix separately
here in the virXMLNamespace structure so that future patches
can get rid of the first two bullets.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/util/virxml.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/virxml.h b/src/util/virxml.h
index 5b209bb040..ea0c3d3ab3 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -256,6 +256,7 @@ struct _virXMLNamespace {
     virXMLNamespaceParse parse;
     virXMLNamespaceFree free;
     virXMLNamespaceFormat format;
+    const char *prefix;
     virXMLNamespaceHref href;
 };
 typedef struct _virXMLNamespace virXMLNamespace;
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux