use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DOMImplementationHasFeature method testHasFeatureXml.
public void testHasFeatureXml() throws Throwable {
Document doc;
DOMImplementation domImpl;
boolean state;
doc = (Document) load("staff", builder);
domImpl = doc.getImplementation();
state = domImpl.hasFeature("xml", "2.0");
assertTrue("domimplementationFeaturexmlVersion2Assert", state);
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DOMImplementationHasFeature method testHasFeatureCore.
/**
* Runs the test case.
*
* @throws Throwable
* Any uncaught exception causes test to fail
*/
public void testHasFeatureCore() throws Throwable {
Document doc;
DOMImplementation domImpl;
boolean state;
doc = (Document) load("staff", builder);
domImpl = doc.getImplementation();
state = domImpl.hasFeature("core", "2.0");
assertTrue("domimplementationFeaturecoreAssert", state);
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DocumentCreateAttributeNS method testCreateAttributeNS6.
public void testCreateAttributeNS6() throws Throwable {
Document doc;
Document newDoc;
DocumentType docType = null;
DOMImplementation domImpl;
String namespaceURI = "http://www.w3.org/XML/1998 /namespace";
String qualifiedName = "xml:root";
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test", "dom:doc", docType);
{
boolean success = false;
try {
newDoc.createAttributeNS(namespaceURI, qualifiedName);
} catch (DOMException ex) {
success = (ex.code == DOMException.NAMESPACE_ERR);
}
assertTrue("documentcreateattributeNS06", success);
}
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DocumentCreateAttributeNS method testCreateAttributeNS5.
public void testCreateAttributeNS5() throws Throwable {
Document doc;
Document newDoc;
DocumentType docType = null;
DOMImplementation domImpl;
String namespaceURI = null;
String qualifiedName = "abc:def";
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
newDoc = domImpl.createDocument("http://www.w3.org/DOM/Test", "dom:doc", docType);
{
boolean success = false;
try {
newDoc.createAttributeNS(namespaceURI, qualifiedName);
} catch (DOMException ex) {
success = (ex.code == DOMException.NAMESPACE_ERR);
}
assertTrue("documentcreateattributeNS05", success);
}
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DocumentTypeInternalSubset method testGetInternalSubset.
/**
* Runs the test case.
*
* @throws Throwable
* Any uncaught exception causes test to fail
*/
public void testGetInternalSubset() throws Throwable {
Document doc;
DocumentType docType;
DOMImplementation domImpl;
String internal;
String nullNS = null;
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
docType = domImpl.createDocumentType("l2:root", nullNS, nullNS);
internal = docType.getInternalSubset();
assertNull("internalSubsetNull", internal);
}
Aggregations