org.w3c.dom.TypeInfo#com.sun.org.apache.xerces.internal.xs.ItemPSVI源码实例Demo

下面列出了org.w3c.dom.TypeInfo#com.sun.org.apache.xerces.internal.xs.ItemPSVI 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@Test
public void testSettingSimpleType() throws Exception {
    try {
        reset();
        fValidator.setProperty(ROOT_TYPE, typeString);
    } catch (SAXException e1) {
        fail("Problem setting property: " + e1.getMessage());
    }

    try {
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("string", fRootNode.getTypeDefinition().getName());
}
 
@Test
public void testSettingInvalidSimpleType() throws Exception {
    try {
        reset();
        fValidator.setProperty(ROOT_TYPE, typeNonNegInt);
    } catch (SAXException e1) {
        fail("Problem setting property: " + e1.getMessage());
    }

    try {
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertError(INVALID_TYPE_ERROR);
    assertError(MININCLUSIVE_DERIVATION_ERROR);
    assertValidity(ItemPSVI.VALIDITY_INVALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("nonNegativeInteger", fRootNode.getTypeDefinition().getName());
}
 
源代码3 项目: openjdk-jdk9   文件: Xerces1128doc2Test.java
private void checkResult() {
    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("X", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("anyType", child.getTypeDefinition().getName());
    assertTypeNamespace("http://www.w3.org/2001/XMLSchema",
            child.getTypeDefinition().getNamespace());

}
 
源代码4 项目: openjdk-jdk9   文件: Xerces1128doc1Test.java
private void checkResult() {
    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("anyType", child.getTypeDefinition().getName());
    assertTypeNamespace("http://www.w3.org/2001/XMLSchema",
            child.getTypeDefinition().getNamespace());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("X", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
源代码5 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
/**
 * XERCESJ-1141 root-type-definition property not read by XMLSchemaValidator during reset()
 */
@Test
public void testUsingDocumentBuilderFactory() throws Exception {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setAttribute(ROOT_TYPE, typeX);
    dbf.setAttribute(DOCUMENT_CLASS_NAME,"com.sun.org.apache.xerces.internal.dom.PSVIDocumentImpl");
    dbf.setNamespaceAware(true);
    dbf.setValidating(false);

    SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    dbf.setSchema(sf.newSchema(fSchemaURL));

    DocumentBuilder db = dbf.newDocumentBuilder();
    Document document = db.parse(fDocumentURL.toExternalForm());
    ElementPSVI rootNode = (ElementPSVI) document.getDocumentElement();

    assertValidity(ItemPSVI.VALIDITY_VALID, rootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, rootNode
            .getValidationAttempted());
    assertElementNull(rootNode.getElementDeclaration());
    assertTypeName("X", rootNode.getTypeDefinition().getName());
}
 
源代码6 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_C.java
private void checkFalseResult() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
/**
 * The purpose of this test is to check if setting the USE_GRAMMAR_POOL_ONLY
 * feature to true causes external schemas to not be read. This
 * functionality already existed prior to adding the XSLT 2.0 validation
 * features; however, because the class that controlled it changed, this
 * test simply ensures that the existing functionality did not disappear.
 * -PM
 */
@Test
public void testUsingOnlyGrammarPool() {
    try {
        reset();
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertElementNamespace("xslt.unittests", fRootNode
            .getElementDeclaration().getNamespace());
    assertTypeName("W", fRootNode.getTypeDefinition().getName());
    assertTypeNamespace("xslt.unittests", fRootNode.getTypeDefinition()
            .getNamespace());
}
 
/**
 * The purpose of this test is to check if setting the USE_GRAMMAR_POOL_ONLY
 * feature to true causes external schemas to not be read. This
 * functionality already existed prior to adding the XSLT 2.0 validation
 * features; however, because the class that controlled it changed, this
 * test simply ensures that the existing functionality did not disappear.
 * -PM
 */
@Test
public void testUsingOnlyGrammarPool() {
    try {
        reset();
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertAnyType(fRootNode.getTypeDefinition());
}
 
源代码9 项目: openjdk-jdk9   文件: FixedAttrTest.java
@Test
public void testDefault() {
    try {
        reset();
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("B", child.getElementDeclaration().getName());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("D", child.getElementDeclaration().getName());
}
 
源代码10 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_CA.java
private void checkTrueResult() {
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_PARTIAL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertAnyType(fRootNode.getTypeDefinition());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertAnyType(child.getTypeDefinition());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
源代码11 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_CA.java
private void checkFalseResult() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
源代码12 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_AC.java
private void checkTrueResult() {
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_PARTIAL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertAnyType(fRootNode.getTypeDefinition());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertAnyType(child.getTypeDefinition());
}
 
源代码13 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_AC.java
private void checkFalseResult() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
源代码14 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_A_A.java
private void checkResult() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
源代码15 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
@Test
public void testSettingToEqualType() {
    try {
        reset();
        fValidator.setProperty(ROOT_TYPE, typeX);
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("X", fRootNode.getTypeDefinition().getName());
}
 
源代码16 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
@Test
public void testSettingToDerivedType() {
    try {
        reset();
        // this is required to make it a valid type Y node
        ((PSVIElementNSImpl) fRootNode).setAttributeNS(null, "attr", "typeY");
        fValidator.setProperty(ROOT_TYPE, typeY);
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
}
 
源代码17 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
@Test
public void testSettingToNonDerivedType() {
    try {
        reset();
        fValidator.setProperty(ROOT_TYPE, typeZ);
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Z", fRootNode.getTypeDefinition().getName());
}
 
源代码18 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
@Test
public void testSettingToOtherSchemaType() {
    try {
        reset();
        ((PSVIElementNSImpl) fRootNode).setAttributeNS(SchemaSymbols.URI_XSI,
            SchemaSymbols.XSI_SCHEMALOCATION,
            "xslt.unittests otherNamespace.xsd");
        fValidator.setProperty(ROOT_TYPE, typeOtherNamespace);
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("W", fRootNode.getTypeDefinition().getName());
    assertTypeNamespace("xslt.unittests", fRootNode.getTypeDefinition()
            .getNamespace());
}
 
源代码19 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
@Test
public void testSettingTypeAndXSIType() {
    try {
        reset();
        // this is required to make it a valid type Y node
        ((PSVIElementNSImpl) fRootNode).setAttributeNS(null, "attr", "typeY");
        ((PSVIElementNSImpl) fRootNode).setAttributeNS(SchemaSymbols.URI_XSI,
                SchemaSymbols.XSI_TYPE, "Y");
        fValidator.setProperty(ROOT_TYPE, typeX);
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
}
 
源代码20 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
@Test
public void testSettingTypeAndInvalidXSIType() {
    try {
        reset();
        ((PSVIElementNSImpl) fRootNode).setAttributeNS(SchemaSymbols.URI_XSI,
                SchemaSymbols.XSI_TYPE, "Z");
        fValidator.setProperty(ROOT_TYPE, typeX);
        validateDocument();
    } catch (Exception e) {
        fail("Validation failed: " + e.getMessage());
    }

    assertError(INVALID_DERIVATION_ERROR);
    assertValidity(ItemPSVI.VALIDITY_INVALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Z", fRootNode.getTypeDefinition().getName());
}
 
源代码21 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_A_C.java
private void checkResult() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertTypeName("Y", child.getTypeDefinition().getName());
    assertTypeNamespaceNull(child.getTypeDefinition().getNamespace());
}
 
源代码22 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
private void checkDefault() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertTypeName("X", fRootNode.getTypeDefinition().getName());
}
 
源代码23 项目: openjdk-jdk9   文件: BasicTest.java
private void doValidityAsserts() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertElementNamespaceNull(fRootNode.getElementDeclaration()
            .getNamespace());
    assertTypeName("X", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());
}
 
private void checkValidResult() {
    assertNoError(DUPLICATE_UNIQUE);
    assertNoError(DUPLICATE_KEY);
    assertNoError(INVALID_KEYREF);

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("itemList", fRootNode.getElementDeclaration()
            .getName());
    assertTypeName("itemListType", fRootNode.getTypeDefinition().getName());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("item", child.getElementDeclaration().getName());
    assertTypeName("itemType", child.getTypeDefinition().getName());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("item", child.getElementDeclaration().getName());
    assertTypeName("itemType", child.getTypeDefinition().getName());

    child = super.getChild(3);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("item", child.getElementDeclaration().getName());
    assertTypeName("itemType", child.getTypeDefinition().getName());

    child = super.getChild(4);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("itemRef", child.getElementDeclaration().getName());
    assertTypeName("string", child.getTypeDefinition().getName());
}
 
源代码25 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_C.java
private void checkTrueResult() {
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertAnyType(fRootNode.getTypeDefinition());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child
            .getValidationAttempted());
    assertElementNull(child.getElementDeclaration());
    assertAnyType(child.getTypeDefinition());
}
 
源代码26 项目: openjdk-jdk9   文件: BasicTest1.java
private void doValidityAsserts() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertElementNamespaceNull(fRootNode.getElementDeclaration()
            .getNamespace());
    assertTypeName("X", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());
}
 
源代码27 项目: openjdk-jdk9   文件: IdIdrefCheckingTest.java
private void checkDefault() {
    assertError(DUPLICATE_ID);
    assertError(NO_ID_BINDING);

    assertValidity(ItemPSVI.VALIDITY_INVALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertTypeName("X", fRootNode.getTypeDefinition().getName());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("idType", child.getTypeDefinition().getName());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_INVALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("idType", child.getTypeDefinition().getName());

    child = super.getChild(3);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("idrefType", child.getTypeDefinition().getName());
}
 
源代码28 项目: openjdk-jdk9   文件: IdIdrefCheckingTest.java
private void checkValidResult() {
    assertNoError(DUPLICATE_ID);
    assertNoError(NO_ID_BINDING);

    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementName("A", fRootNode.getElementDeclaration().getName());
    assertTypeName("X", fRootNode.getTypeDefinition().getName());

    PSVIElementNSImpl child = super.getChild(1);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("idType", child.getTypeDefinition().getName());

    child = super.getChild(2);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("idType", child.getTypeDefinition().getName());

    child = super.getChild(3);
    assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
            .getValidationAttempted());
    assertElementName("A", child.getElementDeclaration().getName());
    assertTypeName("idrefType", child.getTypeDefinition().getName());
}
 
源代码29 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_A.java
private void checkTrueResult() {
    assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_PARTIAL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertAnyType(fRootNode.getTypeDefinition());

    checkChild();
}
 
源代码30 项目: openjdk-jdk9   文件: IgnoreXSITypeTest_C_A.java
private void checkFalseResult() {
    assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
            .getValidationAttempted());
    assertElementNull(fRootNode.getElementDeclaration());
    assertTypeName("Y", fRootNode.getTypeDefinition().getName());
    assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace());

    checkChild();
}