jdk/test/javax/xml/jaxp/testng/validation/8037819/IdIdrefCheckingTest.java
author joehw
Fri, 29 Aug 2014 11:59:34 -0700
changeset 26335 67078b90e47b
permissions -rw-r--r--
8037819: Xerces Update: jaxp/validation/XMLSchemaFactory Reviewed-by: lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26335
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     1
/*
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     2
 * Licensed to the Apache Software Foundation (ASF) under one or more
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     3
 * contributor license agreements.  See the NOTICE file distributed with
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     4
 * this work for additional information regarding copyright ownership.
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     5
 * The ASF licenses this file to You under the Apache License, Version 2.0
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     6
 * (the "License"); you may not use this file except in compliance with
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     7
 * the License.  You may obtain a copy of the License at
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     8
 *
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
     9
 *      http://www.apache.org/licenses/LICENSE-2.0
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    10
 *
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    11
 * Unless required by applicable law or agreed to in writing, software
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    12
 * distributed under the License is distributed on an "AS IS" BASIS,
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    14
 * See the License for the specific language governing permissions and
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    15
 * limitations under the License.
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    16
 */
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    17
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    18
import com.sun.org.apache.xerces.internal.dom.PSVIElementNSImpl;
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    19
import com.sun.org.apache.xerces.internal.xs.ItemPSVI;
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    20
import org.xml.sax.SAXException;
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    21
import org.testng.annotations.AfterClass;
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    22
import org.testng.annotations.BeforeClass;
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    23
import org.testng.annotations.Test;
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    24
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    25
// duplicate IDs
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    26
// reference to non-existent ID
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    27
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    28
public class IdIdrefCheckingTest extends BaseTest {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    29
    public static final String DUPLICATE_ID = "cvc-id.2";
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    30
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    31
    public static final String NO_ID_BINDING = "cvc-id.1";
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    32
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    33
    protected String getXMLDocument() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    34
        return "idIdref.xml";
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    35
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    36
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    37
    protected String getSchemaFile() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    38
        return "base.xsd";
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    39
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    40
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    41
    protected String[] getRelevantErrorIDs() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    42
        return new String[] { DUPLICATE_ID, NO_ID_BINDING };
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    43
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    44
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    45
    public IdIdrefCheckingTest(String name) {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    46
        super(name);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    47
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    48
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    49
    @BeforeClass
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    50
    protected void setUp() throws Exception {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    51
        super.setUp();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    52
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    53
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    54
    @AfterClass
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    55
    protected void tearDown() throws Exception {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    56
        super.tearDown();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    57
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    58
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    59
    @Test
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    60
    public void testDefault() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    61
        try {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    62
            reset();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    63
            validateDocument();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    64
        } catch (Exception e) {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    65
            fail("Validation failed: " + e.getMessage());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    66
        }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    67
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    68
        checkDefault();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    69
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    70
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    71
    @Test
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    72
    public void testSetFalse() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    73
        try {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    74
            reset();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    75
            fValidator.setFeature(ID_IDREF_CHECKING, false);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    76
            validateDocument();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    77
        } catch (Exception e) {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    78
            fail("Validation failed: " + e.getMessage());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    79
        }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    80
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    81
        checkValidResult();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    82
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    83
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    84
    @Test
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    85
    public void testSetTrue() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    86
        try {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    87
            reset();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    88
            fValidator.setFeature(ID_IDREF_CHECKING, true);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    89
            validateDocument();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    90
        } catch (Exception e) {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    91
            fail("Validation failed: " + e.getMessage());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    92
        }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    93
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    94
        checkDefault();
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    95
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    96
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    97
    private void checkDefault() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    98
        assertError(DUPLICATE_ID);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
    99
        assertError(NO_ID_BINDING);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   100
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   101
        assertValidity(ItemPSVI.VALIDITY_INVALID, fRootNode.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   102
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   103
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   104
        assertElementName("A", fRootNode.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   105
        assertTypeName("X", fRootNode.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   106
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   107
        PSVIElementNSImpl child = super.getChild(1);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   108
        assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   109
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   110
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   111
        assertElementName("A", child.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   112
        assertTypeName("idType", child.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   113
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   114
        child = super.getChild(2);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   115
        assertValidity(ItemPSVI.VALIDITY_INVALID, child.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   116
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   117
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   118
        assertElementName("A", child.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   119
        assertTypeName("idType", child.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   120
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   121
        child = super.getChild(3);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   122
        assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   123
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   124
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   125
        assertElementName("A", child.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   126
        assertTypeName("idrefType", child.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   127
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   128
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   129
    private void checkValidResult() {
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   130
        assertNoError(DUPLICATE_ID);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   131
        assertNoError(NO_ID_BINDING);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   132
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   133
        assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   134
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   135
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   136
        assertElementName("A", fRootNode.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   137
        assertTypeName("X", fRootNode.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   138
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   139
        PSVIElementNSImpl child = super.getChild(1);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   140
        assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   141
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   142
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   143
        assertElementName("A", child.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   144
        assertTypeName("idType", child.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   145
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   146
        child = super.getChild(2);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   147
        assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   148
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   149
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   150
        assertElementName("A", child.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   151
        assertTypeName("idType", child.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   152
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   153
        child = super.getChild(3);
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   154
        assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   155
        assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   156
                .getValidationAttempted());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   157
        assertElementName("A", child.getElementDeclaration().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   158
        assertTypeName("idrefType", child.getTypeDefinition().getName());
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   159
    }
67078b90e47b 8037819: Xerces Update: jaxp/validation/XMLSchemaFactory
joehw
parents:
diff changeset
   160
}