提交 2e2710ca 编写于 作者: J Ján Tomko

xml: virXMLNamespace: add prefix

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: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 126ac61e
......@@ -256,6 +256,7 @@ struct _virXMLNamespace {
virXMLNamespaceParse parse;
virXMLNamespaceFree free;
virXMLNamespaceFormat format;
const char *prefix;
virXMLNamespaceHref href;
};
typedef struct _virXMLNamespace virXMLNamespace;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册