use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DocumentBuilderTest method testGetImplementation.
public void testGetImplementation() {
DOMImplementation d;
try {
d = dbf.newDocumentBuilder().getDOMImplementation();
} catch (Exception e) {
throw new RuntimeException("Unexpected exception", e);
}
assertNotNull(d);
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DOMImplementationCreateDocumentType method testCreateDocumentType2.
public void testCreateDocumentType2() throws Throwable {
Document doc;
DOMImplementation domImpl;
DocumentType newDocType;
Document ownerDocument;
String publicId = "http://www.w3.org/DOM/Test/dom2.dtd";
String systemId = "dom2.dtd";
String qualifiedName;
List<String> qualifiedNames = new ArrayList<String>();
qualifiedNames.add("_:_");
qualifiedNames.add("_:h0");
qualifiedNames.add("_:test");
qualifiedNames.add("_:_.");
qualifiedNames.add("_:a-");
qualifiedNames.add("l_:_");
qualifiedNames.add("ns:_0");
qualifiedNames.add("ns:a0");
qualifiedNames.add("ns0:test");
qualifiedNames.add("ns:EEE.");
qualifiedNames.add("ns:_-");
qualifiedNames.add("a.b:c");
qualifiedNames.add("a-b:c.j");
qualifiedNames.add("a-b:c");
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
for (int indexN10077 = 0; indexN10077 < qualifiedNames.size(); indexN10077++) {
qualifiedName = (String) qualifiedNames.get(indexN10077);
newDocType = domImpl.createDocumentType(qualifiedName, publicId, systemId);
assertNotNull("domimplementationcreatedocumenttype02_newDocType", newDocType);
ownerDocument = newDocType.getOwnerDocument();
assertNull("domimplementationcreatedocumenttype02_ownerDocument", ownerDocument);
}
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DOMImplementationCreateDocumentType method testCreateDocumentType4.
public void testCreateDocumentType4() throws Throwable {
Document doc;
DOMImplementation domImpl;
DocumentType newDocType;
Document ownerDocument;
String publicId = "http://www.w3.org/DOM/Test/dom2.dtd";
String systemId = "dom2.dtd";
String qualifiedName;
List<String> qualifiedNames = new ArrayList<String>();
qualifiedNames.add("_:_");
qualifiedNames.add("_:h0");
qualifiedNames.add("_:test");
qualifiedNames.add("_:_.");
qualifiedNames.add("_:a-");
qualifiedNames.add("l_:_");
qualifiedNames.add("ns:_0");
qualifiedNames.add("ns:a0");
qualifiedNames.add("ns0:test");
qualifiedNames.add("ns:EEE.");
qualifiedNames.add("ns:_-");
qualifiedNames.add("a.b:c");
qualifiedNames.add("a-b:c.j");
qualifiedNames.add("a-b:c");
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
for (int indexN10077 = 0; indexN10077 < qualifiedNames.size(); indexN10077++) {
qualifiedName = (String) qualifiedNames.get(indexN10077);
newDocType = domImpl.createDocumentType(qualifiedName, publicId, systemId);
assertNotNull("domimplementationcreatedocumenttype02_newDocType", newDocType);
ownerDocument = newDocType.getOwnerDocument();
assertNull("domimplementationcreatedocumenttype02_ownerDocument", ownerDocument);
}
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DOMImplementationHasFeature method testHasFeature1.
public void testHasFeature1() throws Throwable {
Document doc;
DOMImplementation domImpl;
String version = "";
String version1 = "1.0";
String version2 = "2.0";
String featureCore;
String featureXML;
boolean success;
List<String> featuresXML = new ArrayList<String>();
featuresXML.add("XML");
featuresXML.add("xmL");
List<String> featuresCore = new ArrayList<String>();
featuresCore.add("Core");
featuresCore.add("CORE");
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
for (int indexN10063 = 0; indexN10063 < featuresXML.size(); indexN10063++) {
featureXML = (String) featuresXML.get(indexN10063);
success = domImpl.hasFeature(featureXML, version);
assertTrue("domimplementationhasfeature01_XML_1", success);
success = domImpl.hasFeature(featureXML, version1);
assertTrue("domimplementationhasfeature01_XML_2", success);
}
for (int indexN1007C = 0; indexN1007C < featuresCore.size(); indexN1007C++) {
featureCore = (String) featuresCore.get(indexN1007C);
success = domImpl.hasFeature(featureCore, version);
assertTrue("domimplementationhasfeature01_Core_1", success);
success = domImpl.hasFeature(featureCore, version1);
success = domImpl.hasFeature(featureCore, version2);
assertTrue("domimplementationhasfeature01_Core_3", success);
}
}
use of org.w3c.dom.DOMImplementation in project robovm by robovm.
the class DOMImplementationHasFeature method testHasFeature2.
public void testHasFeature2() throws Throwable {
Document doc;
DOMImplementation domImpl;
boolean success;
doc = (Document) load("staffNS", builder);
domImpl = doc.getImplementation();
success = domImpl.hasFeature("Blah Blah", "");
assertFalse("domimplementationhasfeature02", success);
}
Aggregations