Code example for Comment

Methods: isDefaultNamespace

0
        assertTrue(option2Reference.isDefaultNamespace("http://food"));
        assertTrue(wafflemaker.isDefaultNamespace("http://food"));
        assertTrue(nutrition.isDefaultNamespace("http://food"));
        assertTrue(vitamins.isDefaultNamespace("http://food"));
        assertTrue(vitaminsXmlnsA.isDefaultNamespace("http://food"));
        assertTrue(comment.isDefaultNamespace("http://food"));
        assertTrue(vitaminc.isDefaultNamespace("http://food"));
        assertTrue(vitamincText.isDefaultNamespace("http://food"));
    } 
 
    /** 
     * Xerces fails this test. It returns false always for entity, notation, 
     * document fragment and document type nodes. This contradicts its own 
     * behaviour on lookupNamespaceURI(null). 
     */ 
    public void testIsDefaultNamespaceNull_XercesBugs() { 
        String message = "isDefaultNamespace() should be consistent with lookupNamespaceURI(null)";
        assertTrue(message, doctype.isDefaultNamespace(null));
        if (sp != null) {
            assertTrue(message, sp.isDefaultNamespace(null));
Experience pair programming with AI  Get Codota for Java