@Override public short compareDocumentPosition(Node other) throws DOMException { return element.compareDocumentPosition(other); }
@Override public short compareDocumentPosition(Node other) throws DOMException { return element.compareDocumentPosition(soapDocument.getDomNode(other)); }
/** * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) */ @Override public short compareDocumentPosition(Node other) throws DOMException { return original.get().compareDocumentPosition(other); }
/** * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) */ @Override public short compareDocumentPosition(Node other) throws DOMException { return original.get().compareDocumentPosition(other); }
/** * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) */ public short compareDocumentPosition(Node other) throws DOMException { return getCurrentInternal().compareDocumentPosition(other); }
/** * @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) */ public short compareDocumentPosition(Node other) throws DOMException { return getAtualInterno().compareDocumentPosition(other); }
@Override public short compareDocumentPosition(Node other) throws DOMException { final Element elem = getElement(); return elem != null ? elem.compareDocumentPosition(other) : 0; }
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Document doc2; NodeList nameList; NodeList positionList; Element strong; Element code; int documentPosition; doc = (Document) load("hc_staff", false); doc2 = doc; nameList = doc.getElementsByTagName("strong"); strong = (Element) nameList.item(0); positionList = doc2.getElementsByTagName("code"); code = (Element) positionList.item(0); documentPosition = (int) strong.compareDocumentPosition(code); assertEquals("nodecomparedocumentpositionFollowing32", 4, documentPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList nameList; NodeList positionList; Element strong; Element code; Element newElem; int namePosition; int elemPosition; Node appendedChild; doc = (Document) load("hc_staff", true); nameList = doc.getElementsByTagName("strong"); strong = (Element) nameList.item(0); positionList = doc.getElementsByTagName("code"); code = (Element) positionList.item(1); newElem = doc.createElementNS("http://www.w3.org/1999/xhtml", "br"); appendedChild = code.appendChild(newElem); namePosition = (int) strong.compareDocumentPosition(newElem); assertEquals("nodecomparedocumentpositionFollowing31", 4, namePosition); elemPosition = (int) newElem.compareDocumentPosition(strong); assertEquals("nodecomparedocumentpositionPRECEDING31", 2, elemPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList nameList; NodeList positionList; Element strong; Element code; int namePosition; doc = (Document) load("hc_staff", false); nameList = doc.getElementsByTagName("strong"); strong = (Element) nameList.item(0); positionList = doc.getElementsByTagName("code"); code = (Element) positionList.item(0); namePosition = (int) code.compareDocumentPosition(strong); assertEquals("nodecomparedocumentpositionFollowing30", 2, namePosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elemName; Node entRef; int elementPosition; int entRefPosition; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("var"); elemName = (Element) elemList.item(2); entRef = elemName.getFirstChild(); elementPosition = (int) elemName.compareDocumentPosition(entRef); assertEquals("nodecomparedocumentpositionIsContainedFollowing25", 20, elementPosition); entRefPosition = (int) entRef.compareDocumentPosition(elemName); assertEquals("nodecomparedocumentpositionContainsPRECEDING25", 10, entRefPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element elem; Element newElem; NodeList elemList; int documentPosition; int documentElementPosition; Node appendedChild; doc = (Document) load("hc_staff", true); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(3); newElem = doc.createElementNS("http://www.w3.org/1999/xhtml", "br"); appendedChild = elem.appendChild(newElem); documentPosition = (int) doc.compareDocumentPosition(newElem); assertEquals("nodecomparedocumentpositionIsContainedFollowing09", 20, documentPosition); documentElementPosition = (int) newElem.compareDocumentPosition(doc); assertEquals("nodecomparedocumentpositionContainsPRECEDING09", 10, documentElementPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; NodeList elemListFollows; Element elemFollows; Attr attr; int attrPosition; int elemFollowsPosition; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(3); attr = elem.getAttributeNode("dir"); elemListFollows = doc.getElementsByTagName("strong"); elemFollows = (Element) elemListFollows.item(3); attrPosition = (int) attr.compareDocumentPosition(elemFollows); assertEquals("nodecomparedocumentpositionFollowing36", 4, attrPosition); elemFollowsPosition = (int) elemFollows.compareDocumentPosition(attr); assertEquals("nodecomparedocumentpositionPRECEEDING36", 2, elemFollowsPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; Attr attr; int elementPosition; int attrPosition; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(3); attr = elem.getAttributeNode("dir"); elementPosition = (int) elem.compareDocumentPosition(attr); assertEquals("nodecomparedocumentpositionIsContainedFollowing35", 20, elementPosition); attrPosition = (int) attr.compareDocumentPosition(elem); assertEquals("nodecomparedocumentpositionPRECEDINGContains35", 10, attrPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element docElem; Element newElem; int documentPosition; int documentElementPosition; Node appendedChild; doc = (Document) load("hc_staff", true); docElem = doc.getDocumentElement(); newElem = doc.createElementNS("http://www.w3.org/1999/xhtml", "br"); appendedChild = docElem.appendChild(newElem); documentPosition = (int) doc.compareDocumentPosition(newElem); assertEquals("nodecomparedocumentpositionIsContainedFollowing07", 20, documentPosition); documentElementPosition = (int) newElem.compareDocumentPosition(doc); assertEquals("nodecomparedocumentpositionContainedPRECEDING07", 10, documentElementPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element elem; NodeList elemList; int documentPosition; int elementPosition; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(3); documentPosition = (int) doc.compareDocumentPosition(elem); assertEquals("nodecomparedocumentpositionIsContainedFollowing08", 20, documentPosition); elementPosition = (int) elem.compareDocumentPosition(doc); assertEquals("nodecomparedocumentpositionContainsPRECEDING08", 10, elementPosition); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element docElem; int documentPositionDoc; int documentPositionDocElem; doc = (Document) load("hc_staff", false); docElem = doc.getDocumentElement(); documentPositionDoc = (int) doc.compareDocumentPosition(docElem); assertEquals("nodecomparedocumentpositionIsContainedFollowing06", 20, documentPositionDoc); documentPositionDocElem = (int) docElem.compareDocumentPosition(doc); assertEquals("nodecomparedocumentpotionContainsPRECEDING06", 10, documentPositionDocElem); } /**
entRefPosition = (int) entRef.compareDocumentPosition(entRefChild1); assertEquals("nodecomparedocumentpositionIsContainedFollowing26", 20, entRefPosition); entRefChild1Position = (int) entRefChild1.compareDocumentPosition(entRef); assertEquals("nodecomparedocumentpositionContainsPRECEDING26", 10, entRefChild1Position);
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element docElem; EntityReference entRef1; EntityReference entRef2; Element entRefChild1; ProcessingInstruction entRefChild2; int entRefChild1Position; int entRefChild2Position; Node appendedChild; doc = (Document) load("hc_staff", true); entRef1 = doc.createEntityReference("ent4"); entRef2 = doc.createEntityReference("ent4"); docElem = doc.getDocumentElement(); appendedChild = docElem.appendChild(entRef1); appendedChild = docElem.appendChild(entRef2); entRefChild1 = (Element) entRef1.getFirstChild(); assertNotNull("entRefChild1NotNull", entRefChild1); entRefChild2 = (ProcessingInstruction) entRef2.getLastChild(); assertNotNull("entRefChild2NotNull", entRefChild2); entRefChild1Position = (int) entRefChild1.compareDocumentPosition(entRefChild2); assertEquals("nodecomparedocumentpositionFollowing29", 4, entRefChild1Position); entRefChild2Position = (int) entRefChild2.compareDocumentPosition(entRefChild1); assertEquals("nodecomparedocumentpositionPRECEDING29", 2, entRefChild2Position); } /**
entRefChild2 = (ProcessingInstruction) entRef.getLastChild(); assertNotNull("entRefChild2NotNull", entRefChild2); entRefChild1Position = (int) entRefChild1.compareDocumentPosition(entRefChild2); assertEquals("nodecomparedocumentpositionFollowing28", 4, entRefChild1Position); entRefChild2Position = (int) entRefChild2.compareDocumentPosition(entRefChild1);