summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-03-25 20:59:50 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-03-26 09:07:59 +0100
commit1fcc08d5dccaf8280fa7709df6eb310b8f502fb2 (patch)
tree15296961f65194704890c1b6296a0fec55e77f7b /test
parent18aa2169c9adf41fa5c9a02ad81d4f68a34509e3 (diff)
Extract copy&pasted namespace list to XmlTestTools::registerODFNamespaces()
Both sw/ and xmloff/ can depend on test/, so no need to duplicate this. Change-Id: I93bfdb4422bdef9f8d28bc37548130fae49829e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113107 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'test')
-rw-r--r--test/source/xmltesttools.cxx74
1 files changed, 74 insertions, 0 deletions
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 16226a2e8845..45a57f5a22f6 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -278,4 +278,78 @@ int XmlTestTools::getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString
return nRet;
}
+void XmlTestTools::registerODFNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
+{
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("office"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("style"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:style:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("text"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:text:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("table"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:table:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("draw"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("fo"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("config"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:config:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xlink"), BAD_CAST("http://www.w3.org/1999/xlink"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dc"), BAD_CAST("http://purl.org/dc/elements/1.1/"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("meta"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:meta:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("number"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("svg"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("chart"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:chart:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dr3d"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("math"),
+ BAD_CAST("http://www.w3.org/1998/Math/MathML"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("form"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:form:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("script"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:script:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ooo"),
+ BAD_CAST("http://openoffice.org/2004/office"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ooow"),
+ BAD_CAST("http://openoffice.org/2004/writer"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("oooc"), BAD_CAST("http://openoffice.org/2004/calc"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dom"),
+ BAD_CAST("http://www.w3.org/2001/xml-events"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xforms"), BAD_CAST("http://www.w3.org/2002/xforms"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xsd"), BAD_CAST("http://www.w3.org/2001/XMLSchema"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xsi"),
+ BAD_CAST("http://www.w3.org/2001/XMLSchema-instance"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("rpt"),
+ BAD_CAST("http://openoffice.org/2005/report"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("of"),
+ BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:of:1.2"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xhtml"), BAD_CAST("http://www.w3.org/1999/xhtml"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("grddl"),
+ BAD_CAST("http://www.w3.org/2003/g/data-view#"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("officeooo"),
+ BAD_CAST("http://openoffice.org/2009/office"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("tableooo"),
+ BAD_CAST("http://openoffice.org/2009/table"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("drawooo"),
+ BAD_CAST("http://openoffice.org/2010/draw"));
+ xmlXPathRegisterNs(
+ pXmlXpathCtx, BAD_CAST("calcext"),
+ BAD_CAST("urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"));
+ xmlXPathRegisterNs(
+ pXmlXpathCtx, BAD_CAST("loext"),
+ BAD_CAST("urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"));
+ xmlXPathRegisterNs(
+ pXmlXpathCtx, BAD_CAST("field"),
+ BAD_CAST("urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"));
+ xmlXPathRegisterNs(
+ pXmlXpathCtx, BAD_CAST("formx"),
+ BAD_CAST("urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("css3t"),
+ BAD_CAST("http://www.w3.org/TR/css3-text/"));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */