use of org.custommonkey.xmlunit.NamespaceContext in project wcomponents by BorderTech.
the class ValidatorApp method main.
/**
* Main entry method.
*
* @param args the program command-line arguments (ignored).
*/
public static void main(final String[] args) {
// Need to register the "ui" prefix with XMLUnit so that we can use it in XPath expressions
NamespaceContext context = XMLUnit.getXpathNamespaceContext();
context = new XmlLayoutTestNamespaceContext(context);
XMLUnit.setXpathNamespaceContext(context);
new ValidatorApp();
}
use of org.custommonkey.xmlunit.NamespaceContext in project wcomponents by BorderTech.
the class AbstractWebXmlRendererTestCase method registerUINamespace.
/**
* We need to register the "ui" prefix with XMLUnit so that we can use it in XPath expressions.
*/
@BeforeClass
public static void registerUINamespace() {
NamespaceContext context = XMLUnit.getXpathNamespaceContext();
context = new XmlLayoutTestNamespaceContext(context);
XMLUnit.setXpathNamespaceContext(context);
}
use of org.custommonkey.xmlunit.NamespaceContext in project ddf by codice.
the class TestAtomTransformer method setupTestClass.
@BeforeClass
public static void setupTestClass() {
// makes xpaths easier to write when prefixes are declared beforehand.
HashMap map = new HashMap();
map.put("gml", "http://www.opengis.net/gml");
map.put("georss", "http://www.georss.org/georss");
map.put("", "http://www.w3.org/2005/Atom");
map.put("atom", "http://www.w3.org/2005/Atom");
map.put("relevance", "http://a9.com/-/opensearch/extensions/relevance/1.0/");
map.put("os", "http://a9.com/-/spec/opensearch/1.1/");
map.put("fs", "http://a9.com/-/opensearch/extensions/federation/1.0/");
NamespaceContext ctx = new SimpleNamespaceContext(map);
XMLUnit.setXpathNamespaceContext(ctx);
}
Aggregations