Java Code Examples for com.sun.org.apache.xerces.internal.xs.ElementPSVI#VALIDATION_FULL
The following examples show how to use
com.sun.org.apache.xerces.internal.xs.ElementPSVI#VALIDATION_FULL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XMLSchemaValidator.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 2
Source File: XMLSchemaValidator.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 3
Source File: XMLSchemaValidator.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 4
Source File: XMLSchemaValidator.java From JDKSourceCode1.8 with MIT License | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 5
Source File: XMLSchemaValidator.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 6
Source File: XMLSchemaValidator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 7
Source File: XMLSchemaValidator.java From Bytecoder with Apache License 2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 5 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; fCurrentPSVI.fNil = this.fNil; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; } // this guarantees that depth settings do not cross-over between sibling nodes if (fNFullValidationDepth == fElementDepth) { fNFullValidationDepth = fElementDepth - 1; } if (fNNoneValidationDepth == fElementDepth) { fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fValue.copyFrom(fValidatedInfo); if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrors = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 8
Source File: XMLSchemaValidator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 5 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; fCurrentPSVI.fNil = this.fNil; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; } // this guarantees that depth settings do not cross-over between sibling nodes if (fNFullValidationDepth == fElementDepth) { fNFullValidationDepth = fElementDepth - 1; } if (fNNoneValidationDepth == fElementDepth) { fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fValue.copyFrom(fValidatedInfo); if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrors = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 9
Source File: XMLSchemaValidator.java From hottub with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 10
Source File: XMLSchemaValidator.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }
Example 11
Source File: XMLSchemaValidator.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
final Augmentations endElementPSVI( boolean root, SchemaGrammar[] grammars, Augmentations augs) { if (fAugPSVI) { augs = getEmptyAugs(augs); // the 4 properties sent on startElement calls fCurrentPSVI.fDeclaration = this.fCurrentElemDecl; fCurrentPSVI.fTypeDecl = this.fCurrentType; fCurrentPSVI.fNotation = this.fNotation; fCurrentPSVI.fValidationContext = this.fValidationRoot; // PSVI: validation attempted // nothing below or at the same level has none or partial // (which means this level is strictly assessed, and all chidren // are full), so this one has full if (fElementDepth > fNFullValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_FULL; } // nothing below or at the same level has full or partial // (which means this level is not strictly assessed, and all chidren // are none), so this one has none else if (fElementDepth > fNNoneValidationDepth) { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_NONE; } // otherwise partial, and anything above this level will be partial else { fCurrentPSVI.fValidationAttempted = ElementPSVI.VALIDATION_PARTIAL; fNFullValidationDepth = fNNoneValidationDepth = fElementDepth - 1; } if (fDefaultValue != null) fCurrentPSVI.fSpecified = true; fCurrentPSVI.fNil = fNil; fCurrentPSVI.fMemberType = fValidatedInfo.memberType; fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue; fCurrentPSVI.fActualValue = fValidatedInfo.actualValue; fCurrentPSVI.fActualValueType = fValidatedInfo.actualValueType; fCurrentPSVI.fItemValueTypes = fValidatedInfo.itemValueTypes; if (fStrictAssess) { // get all errors for the current element, its attribute, // and subelements (if they were strictly assessed). // any error would make this element invalid. // and we merge these errors to the parent element. String[] errors = fXSIErrorReporter.mergeContext(); // PSVI: error codes fCurrentPSVI.fErrorCodes = errors; // PSVI: validity fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALIDITY_VALID : ElementPSVI.VALIDITY_INVALID; } else { // PSVI: validity fCurrentPSVI.fValidity = ElementPSVI.VALIDITY_NOTKNOWN; // Discard the current context: ignore any error happened within // the sub-elements/attributes of this element, because those // errors won't affect the validity of the parent elements. fXSIErrorReporter.popContext(); } if (root) { // store [schema information] in the PSVI fCurrentPSVI.fGrammars = grammars; fCurrentPSVI.fSchemaInformation = null; } } return augs; }