📄 xssimpletypedecl.java
字号:
} else if ( (fBase.fFacetsDefined & FACET_MINLENGTH) != 0 ) { if ( (fBase.fFixedFacet & FACET_MINLENGTH) != 0 && fMinLength != fBase.fMinLength ) { reportError( "FixedFacetValue", new Object[]{"minLength", Integer.toString(fMinLength), Integer.toString(fBase.fMinLength), fTypeName}); } // check 4.3.2.c2 error: minLength < fBase.minLength if ( fMinLength < fBase.fMinLength ) { reportError( "minLength-valid-restriction", new Object[]{Integer.toString(fMinLength), Integer.toString(fBase.fMinLength), fTypeName}); } } } // check 4.3.2.c1 must: maxLength < fBase.minLength if ( ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ) && ((fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 )) { if ( fMaxLength < fBase.fMinLength) { reportError("minLength-less-than-equal-to-maxLength", new Object[]{Integer.toString(fBase.fMinLength), Integer.toString(fMaxLength)}); } } // check 4.3.3.c1 error: maxLength > fBase.maxLength if ( (fFacetsDefined & FACET_MAXLENGTH) != 0 ) { if ( (fBase.fFacetsDefined & FACET_MAXLENGTH) != 0 ){ if(( (fBase.fFixedFacet & FACET_MAXLENGTH) != 0 )&& fMaxLength != fBase.fMaxLength ) { reportError( "FixedFacetValue", new Object[]{"maxLength", Integer.toString(fMaxLength), Integer.toString(fBase.fMaxLength), fTypeName}); } if ( fMaxLength > fBase.fMaxLength ) { reportError( "maxLength-valid-restriction", new Object[]{Integer.toString(fMaxLength), Integer.toString(fBase.fMaxLength), fTypeName}); } } }/* // check 4.3.7.c2 error: // maxInclusive > fBase.maxInclusive // maxInclusive >= fBase.maxExclusive // maxInclusive < fBase.minInclusive // maxInclusive <= fBase.minExclusive if (((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { if (((fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { result = fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMaxInclusive); if ((fBase.fFixedFacet & FACET_MAXINCLUSIVE) != 0 && result != 0) { reportError( "FixedFacetValue", new Object[]{"maxInclusive", fMaxInclusive, fBase.fMaxInclusive, fTypeName}); } if (result != -1 && result != 0) { reportError( "maxInclusive-valid-restriction.1", new Object[]{fMaxInclusive, fBase.fMaxInclusive, fTypeName}); } } if (((fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMaxExclusive) != -1){ reportError( "maxInclusive-valid-restriction.1", new Object[]{fMaxInclusive, fBase.fMaxExclusive, fTypeName}); } if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) { result = fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMinInclusive); if (result != 1 && result != 0) { reportError( "maxInclusive-valid-restriction.1", new Object[]{fMaxInclusive, fBase.fMinInclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMinExclusive ) != 1) reportError( "maxInclusive-valid-restriction.1", new Object[]{fMaxInclusive, fBase.fMinExclusive, fTypeName}); } // check 4.3.8.c3 error: // maxExclusive > fBase.maxExclusive // maxExclusive > fBase.maxInclusive // maxExclusive <= fBase.minInclusive // maxExclusive <= fBase.minExclusive if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) { if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) { result= fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMaxExclusive); if ((fBase.fFixedFacet & FACET_MAXEXCLUSIVE) != 0 && result != 0) { reportError( "FixedFacetValue", new Object[]{"maxExclusive", fMaxExclusive, fBase.fMaxExclusive, fTypeName}); } if (result != -1 && result != 0) { reportError( "maxExclusive-valid-restriction.1", new Object[]{fMaxExclusive, fBase.fMaxExclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { result= fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMaxInclusive); if (result != -1 && result != 0) { reportError( "maxExclusive-valid-restriction.2", new Object[]{fMaxExclusive, fBase.fMaxInclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMinExclusive ) != 1) reportError( "maxExclusive-valid-restriction.3", new Object[]{fMaxExclusive, fBase.fMinExclusive, fTypeName}); if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMinInclusive) != 1) reportError( "maxExclusive-valid-restriction.4", new Object[]{fMaxExclusive, fBase.fMinInclusive, fTypeName}); } // check 4.3.9.c3 error: // minExclusive < fBase.minExclusive // minExclusive > fBase.maxInclusive // minExclusive < fBase.minInclusive // minExclusive >= fBase.maxExclusive if (((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) { if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) { result= fDVs[fValidationDV].compare(fMinExclusive, fBase.fMinExclusive); if ((fBase.fFixedFacet & FACET_MINEXCLUSIVE) != 0 && result != 0) { reportError( "FixedFacetValue", new Object[]{"minExclusive", fMinExclusive, fBase.fMinExclusive, fTypeName}); } if (result != 1 && result != 0) { reportError( "minExclusive-valid-restriction.1", new Object[]{fMinExclusive, fBase.fMinExclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { result=fDVs[fValidationDV].compare(fMinExclusive, fBase.fMaxInclusive); if (result != -1 && result != 0) { reportError( "minExclusive-valid-restriction.2", new Object[]{fMinExclusive, fBase.fMaxInclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) { result = fDVs[fValidationDV].compare(fMinExclusive, fBase.fMinInclusive); if (result != 1 && result != 0) { reportError( "minExclusive-valid-restriction.3", new Object[]{fMinExclusive, fBase.fMinInclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMinExclusive, fBase.fMaxExclusive) != -1) reportError( "minExclusive-valid-restriction.4", new Object[]{fMinExclusive, fBase.fMaxExclusive, fTypeName}); } // check 4.3.10.c2 error: // minInclusive < fBase.minInclusive // minInclusive > fBase.maxInclusive // minInclusive <= fBase.minExclusive // minInclusive >= fBase.maxExclusive if (((fFacetsDefined & FACET_MININCLUSIVE) != 0)) { if (((fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) { result = fDVs[fValidationDV].compare(fMinInclusive, fBase.fMinInclusive); if ((fBase.fFixedFacet & FACET_MININCLUSIVE) != 0 && result != 0) { reportError( "FixedFacetValue", new Object[]{"minInclusive", fMinInclusive, fBase.fMinInclusive, fTypeName}); } if (result != 1 && result != 0) { reportError( "minInclusive-valid-restriction.1", new Object[]{fMinInclusive, fBase.fMinInclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { result=fDVs[fValidationDV].compare(fMinInclusive, fBase.fMaxInclusive); if (result != -1 && result != 0) { reportError( "minInclusive-valid-restriction.2", new Object[]{fMinInclusive, fBase.fMaxInclusive, fTypeName}); } } if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMinInclusive, fBase.fMinExclusive ) != 1) reportError( "minInclusive-valid-restriction.3", new Object[]{fMinInclusive, fBase.fMinExclusive, fTypeName}); if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && fDVs[fValidationDV].compare(fMinInclusive, fBase.fMaxExclusive) != -1) reportError( "minInclusive-valid-restriction.4", new Object[]{fMinInclusive, fBase.fMaxExclusive, fTypeName}); }*/ // check 4.3.11.c1 error: totalDigits > fBase.totalDigits if (((fFacetsDefined & FACET_TOTALDIGITS) != 0)) { if ((( fBase.fFacetsDefined & FACET_TOTALDIGITS) != 0)) { if ((fBase.fFixedFacet & FACET_TOTALDIGITS) != 0 && fTotalDigits != fBase.fTotalDigits) { reportError("FixedFacetValue", new Object[]{"totalDigits", Integer.toString(fTotalDigits), Integer.toString(fBase.fTotalDigits), fTypeName}); } if (fTotalDigits > fBase.fTotalDigits) { reportError( "totalDigits-valid-restriction", new Object[]{Integer.toString(fTotalDigits), Integer.toString(fBase.fTotalDigits), fTypeName}); } } } // check 4.3.12.c1 must: fractionDigits <= base.totalDigits if ((fFacetsDefined & FACET_FRACTIONDIGITS) != 0) { if ((fBase.fFacetsDefined & FACET_TOTALDIGITS) != 0) { if (fFractionDigits > fBase.fTotalDigits) reportError( "fractionDigits-totalDigits", new Object[]{Integer.toString(fFractionDigits), Integer.toString(fTotalDigits), fTypeName}); } } // check 4.3.12.c2 error: fractionDigits > fBase.fractionDigits // check fixed value for fractionDigits if (((fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) { if ((( fBase.fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) { if ((fBase.fFixedFacet & FACET_FRACTIONDIGITS) != 0 && fFractionDigits != fBase.fFractionDigits) { reportError("FixedFacetValue", new Object[]{"fractionDigits", Integer.toString(fFractionDigits), Integer.toString(fBase.fFractionDigits), fTypeName}); } if (fFractionDigits > fBase.fFractionDigits) { reportError( "fractionDigits-valid-restriction", new Object[]{Integer.toString(fFractionDigits), Integer.toString(fBase.fFractionDigits), fTypeName}); } } } // check 4.3.6.c1 error: // (whiteSpace = preserve || whiteSpace = replace) && fBase.whiteSpace = collapese or // whiteSpace = preserve && fBase.whiteSpace = replace if ( (fFacetsDefined & FACET_WHITESPACE) != 0 && (fBase.fFacetsDefined & FACET_WHITESPACE) != 0 ){ if ( (fBase.fFixedFacet & FACET_WHITESPACE) != 0 && fWhiteSpace != fBase.fWhiteSpace ) { reportError( "FixedFacetValue", new Object[]{"whiteSpace", whiteSpaceValue(fWhiteSpace), whiteSpaceValue(fBase.fWhiteSpace), fTypeName}); } if ( fWhiteSpace == WS_PRESERVE && fBase.fWhiteSpace == WS_COLLAPSE ){ reportError( "whiteSpace-valid-restriction.1", new Object[]{fTypeName, "preserve"}); } if ( fWhiteSpace == WS_REPLACE && fBase.fWhiteSpace == WS_COLLAPSE ){ reportError( "whiteSpace-valid-restriction.1", new Object[]{fTypeName, "replace"}); } if ( fWhiteSpace == WS_PRESERVE && fBase.fWhiteSpace == WS_REPLACE ){ reportError( "whiteSpace-valid-restriction.2", new Object[]{fTypeName}); } } }//fFacetsDefined != null // step 4: inherit other facets from base (including fTokeyType) // inherit length if ( (fFacetsDefined & FACET_LENGTH) == 0 && (fBase.fFacetsDefined & FACET_LENGTH) != 0 ) { fFacetsDefined |= FACET_LENGTH; fLength = fBase.fLength; lengthAnnotation = fBase.lengthAnnotation; } // inherit minLength if ( (fFacetsDefined & FACET_MINLENGTH) == 0 && (fBase.fFacetsDefined & FACET_MINLENGTH) != 0 ) { fFacetsDefined |= FACET_MINLENGTH; fMinLength = fBase.fMinLength; minLengthAnnotation = fBase.minLengthAnnotation; } // inherit maxLength if ((fFacetsDefined & FACET_MAXLENGTH) == 0 && (fBase.fFacetsDefined & FACET_MAXLENGTH) != 0 ) { fFacetsDefined |= FACET_MAXLENGTH; fMaxLength = fBase.fMaxLength; maxLengthAnnotation = fBase.maxLengthAnnotation; } // inherit pattern if ( (fBase.fFacetsDefined & FACET_PATTERN) != 0 ) { if ((fFacetsDefined & FACET_PATTERN) == 0) { fPattern = fBase.fPattern; fPatternStr = fBase.fPatternStr; fFacetsDefined |= FACET_PATTERN; } else { for (int i = fBase.fPattern.size()-1; i >= 0; i--) { fPattern.addElement(fBase.fPattern.elementAt(i)); fPatternStr.addElement(fBase.fPatternStr.elementAt(i)); } if (fBase.patternAnnotations != null){ for (int i = fBase.patternAnnotations.getLength()-1;i>=0;i--){ patternAnnotations.add(fBase.patternAnnotations.item(i)); } } } } // inherit whiteSpace if ( (fFacetsDefined & FACET_WHITESPACE) == 0 && (fBase.fFacetsDefined & FACET_WHITESPACE) != 0 ) { fFacetsDefined |= FACET_WHITESPACE; fWhiteSpace = fBase.fWhiteSpace; whiteSpaceAnnotation = fBase.whiteSpaceAnnotation; } // inherit enumeration if ((fFacetsDefined & FACET_ENUMERATION) == 0 && (fBase.fFacetsDefined & FACET_ENUMERATION) != 0) { fFacetsDefined |= FACET_ENUMERATION; fEnumeration = fBase.fEnumeration; enumerationAnnotations = fBase.enumerationAnnotations; } // inherit maxExclusive if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { fFacetsDefined |= FACET_MAXEXCLUSIVE; fMaxExclusive = fBase.fMaxExclusive; maxExclusiveAnnotation = fBase.maxExclusiveAnnotation; } // inherit maxInclusive if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0) && !((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) { fFacetsDefined |= FACET_MAXINCLUSIVE; fMaxInclusive = fBase.fMaxInclusive; maxInclusiveAnnotation = fBase.maxInclusiveAnnotation; } // inherit minExclusive if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MININCLUSIVE) != 0)) { fFacetsDefined |= FACET_MINEXCLUSIVE; fMinExclusive = fBase.fMinExclusive; minExclusive
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -