当前位置: 首页>>代码示例>>Java>>正文


Java ItemPSVI类代码示例

本文整理汇总了Java中com.sun.org.apache.xerces.internal.xs.ItemPSVI的典型用法代码示例。如果您正苦于以下问题:Java ItemPSVI类的具体用法?Java ItemPSVI怎么用?Java ItemPSVI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ItemPSVI类属于com.sun.org.apache.xerces.internal.xs包,在下文中一共展示了ItemPSVI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testSettingSimpleType

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
@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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:RootSimpleTypeDefinitionTest.java

示例2: testSettingInvalidSimpleType

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
@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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:RootSimpleTypeDefinitionTest.java

示例3: checkResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());

}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:Xerces1128doc2Test.java

示例4: checkResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:Xerces1128doc1Test.java

示例5: testUsingDocumentBuilderFactory

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
/**
 * 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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:RootTypeDefinitionTest.java

示例6: checkFalseResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:IgnoreXSITypeTest_C_C.java

示例7: testUsingOnlyGrammarPool

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
/**
 * 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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:UseGrammarPoolOnlyTest_False.java

示例8: testUsingOnlyGrammarPool

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
/**
 * 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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:24,代码来源:UseGrammarPoolOnlyTest_True.java

示例9: testDefault

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
@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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:FixedAttrTest.java

示例10: checkTrueResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:IgnoreXSITypeTest_C_CA.java

示例11: checkFalseResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:IgnoreXSITypeTest_C_CA.java

示例12: checkTrueResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:IgnoreXSITypeTest_C_AC.java

示例13: checkFalseResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:IgnoreXSITypeTest_C_AC.java

示例14: checkResult

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:IgnoreXSITypeTest_A_A.java

示例15: testSettingToEqualType

import com.sun.org.apache.xerces.internal.xs.ItemPSVI; //导入依赖的package包/类
@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());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:17,代码来源:RootTypeDefinitionTest.java


注:本文中的com.sun.org.apache.xerces.internal.xs.ItemPSVI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。