@@ -39,22 +39,22 @@ export class BuiltinTypes {
3939 this . createType ( "token" , xsNamespace , this . validateToken ) ;
4040 this . createType ( "language" , xsNamespace , this . validateLanguage ) ;
4141 this . createType ( "Name" , xsNamespace , this . validateName ) ;
42- this . createType ( "NCName" , xsNamespace , this . validateNCName ) ;
42+ this . createType ( "NCName" , xsNamespace , BuiltinTypes . validateNCName ) ;
4343 this . createType ( "ID" , xsNamespace , this . validateID ) ;
4444 this . createType ( "IDREF" , xsNamespace , this . validateIDREF ) ;
45- this . createType ( "ENTITY" , xsNamespace , this . validateNCName ) ;
45+ this . createType ( "ENTITY" , xsNamespace , BuiltinTypes . validateNCName ) ;
4646 this . createType ( "NMTOKEN" , xsNamespace , this . validateNMTOKEN ) ;
4747
4848 // Numeric types
4949 this . createType ( "decimal" , xsNamespace , this . validateDecimal ) ;
50- this . createType ( "integer" , xsNamespace , this . validateInteger ) ;
50+ this . createType ( "integer" , xsNamespace , BuiltinTypes . validateInteger ) ;
5151 this . createType ( "nonPositiveInteger" , xsNamespace , this . validateNonPositiveInteger ) ;
5252 this . createType ( "negativeInteger" , xsNamespace , this . validateNegativeInteger ) ;
5353 this . createType ( "long" , xsNamespace , this . validateLong ) ;
5454 this . createType ( "int" , xsNamespace , this . validateInt ) ;
5555 this . createType ( "short" , xsNamespace , this . validateShort ) ;
5656 this . createType ( "byte" , xsNamespace , this . validateByte ) ;
57- this . createType ( "nonNegativeInteger" , xsNamespace , this . validateNonNegativeInteger ) ;
57+ this . createType ( "nonNegativeInteger" , xsNamespace , BuiltinTypes . validateNonNegativeInteger ) ;
5858 this . createType ( "positiveInteger" , xsNamespace , this . validatePositiveInteger ) ;
5959 this . createType ( "unsignedLong" , xsNamespace , this . validateUnsignedLong ) ;
6060 this . createType ( "unsignedInt" , xsNamespace , this . validateUnsignedInt ) ;
@@ -120,7 +120,7 @@ export class BuiltinTypes {
120120
121121 private static validateToken ( value : string ) : ValidationResult {
122122 // normalizedString + no leading/trailing/consecutive spaces
123- const normalized = this . validateNormalizedString ( value ) ;
123+ const normalized = BuiltinTypes . validateNormalizedString ( value ) ;
124124 if ( ! normalized . isValid ) {
125125 return normalized ;
126126 }
@@ -150,24 +150,24 @@ export class BuiltinTypes {
150150 }
151151
152152 private static validateNCName ( value : string ) : ValidationResult {
153- // Name without colons
154- const nameResult = this . validateName ( value ) ;
153+ // Name without colon
154+ const nameResult = BuiltinTypes . validateName ( value ) ;
155155 if ( ! nameResult . isValid ) {
156156 return nameResult ;
157157 }
158158
159159 if ( value . includes ( ':' ) ) {
160- return ValidationResult . error ( "NCName cannot contain colons " ) ;
160+ return ValidationResult . error ( "NCName cannot contain colon " ) ;
161161 }
162162 return ValidationResult . success ( ) ;
163163 }
164164
165165 private static validateID ( value : string ) : ValidationResult {
166- return this . validateNCName ( value ) ;
166+ return BuiltinTypes . validateNCName ( value ) ;
167167 }
168168
169169 private static validateIDREF ( value : string ) : ValidationResult {
170- return this . validateNCName ( value ) ;
170+ return BuiltinTypes . validateNCName ( value ) ;
171171 }
172172
173173 private static validateNMTOKEN ( value : string ) : ValidationResult {
@@ -197,7 +197,7 @@ export class BuiltinTypes {
197197 }
198198
199199 private static validateNonPositiveInteger ( value : string ) : ValidationResult {
200- const intResult = this . validateInteger ( value ) ;
200+ const intResult = BuiltinTypes . validateInteger ( value ) ;
201201 if ( ! intResult . isValid ) {
202202 return intResult ;
203203 }
@@ -210,7 +210,7 @@ export class BuiltinTypes {
210210 }
211211
212212 private static validateNegativeInteger ( value : string ) : ValidationResult {
213- const intResult = this . validateInteger ( value ) ;
213+ const intResult = BuiltinTypes . validateInteger ( value ) ;
214214 if ( ! intResult . isValid ) {
215215 return intResult ;
216216 }
@@ -223,7 +223,7 @@ export class BuiltinTypes {
223223 }
224224
225225 private static validateLong ( value : string ) : ValidationResult {
226- const intResult = this . validateInteger ( value ) ;
226+ const intResult = BuiltinTypes . validateInteger ( value ) ;
227227 if ( ! intResult . isValid ) {
228228 return intResult ;
229229 }
@@ -236,7 +236,7 @@ export class BuiltinTypes {
236236 }
237237
238238 private static validateInt ( value : string ) : ValidationResult {
239- const intResult = this . validateInteger ( value ) ;
239+ const intResult = BuiltinTypes . validateInteger ( value ) ;
240240 if ( ! intResult . isValid ) {
241241 return intResult ;
242242 }
@@ -249,7 +249,7 @@ export class BuiltinTypes {
249249 }
250250
251251 private static validateShort ( value : string ) : ValidationResult {
252- const intResult = this . validateInteger ( value ) ;
252+ const intResult = BuiltinTypes . validateInteger ( value ) ;
253253 if ( ! intResult . isValid ) {
254254 return intResult ;
255255 }
@@ -262,7 +262,7 @@ export class BuiltinTypes {
262262 }
263263
264264 private static validateByte ( value : string ) : ValidationResult {
265- const intResult = this . validateInteger ( value ) ;
265+ const intResult = BuiltinTypes . validateInteger ( value ) ;
266266 if ( ! intResult . isValid ) {
267267 return intResult ;
268268 }
@@ -275,7 +275,7 @@ export class BuiltinTypes {
275275 }
276276
277277 private static validateNonNegativeInteger ( value : string ) : ValidationResult {
278- const intResult = this . validateInteger ( value ) ;
278+ const intResult = BuiltinTypes . validateInteger ( value ) ;
279279 if ( ! intResult . isValid ) {
280280 return intResult ;
281281 }
@@ -288,7 +288,7 @@ export class BuiltinTypes {
288288 }
289289
290290 private static validatePositiveInteger ( value : string ) : ValidationResult {
291- const intResult = this . validateInteger ( value ) ;
291+ const intResult = BuiltinTypes . validateInteger ( value ) ;
292292 if ( ! intResult . isValid ) {
293293 return intResult ;
294294 }
@@ -301,7 +301,7 @@ export class BuiltinTypes {
301301 }
302302
303303 private static validateUnsignedLong ( value : string ) : ValidationResult {
304- const nonNegResult = this . validateNonNegativeInteger ( value ) ;
304+ const nonNegResult = BuiltinTypes . validateNonNegativeInteger ( value ) ;
305305 if ( ! nonNegResult . isValid ) {
306306 return nonNegResult ;
307307 }
@@ -314,7 +314,7 @@ export class BuiltinTypes {
314314 }
315315
316316 private static validateUnsignedInt ( value : string ) : ValidationResult {
317- const nonNegResult = this . validateNonNegativeInteger ( value ) ;
317+ const nonNegResult = BuiltinTypes . validateNonNegativeInteger ( value ) ;
318318 if ( ! nonNegResult . isValid ) {
319319 return nonNegResult ;
320320 }
@@ -327,7 +327,7 @@ export class BuiltinTypes {
327327 }
328328
329329 private static validateUnsignedShort ( value : string ) : ValidationResult {
330- const nonNegResult = this . validateNonNegativeInteger ( value ) ;
330+ const nonNegResult = BuiltinTypes . validateNonNegativeInteger ( value ) ;
331331 if ( ! nonNegResult . isValid ) {
332332 return nonNegResult ;
333333 }
@@ -340,7 +340,7 @@ export class BuiltinTypes {
340340 }
341341
342342 private static validateUnsignedByte ( value : string ) : ValidationResult {
343- const nonNegResult = this . validateNonNegativeInteger ( value ) ;
343+ const nonNegResult = BuiltinTypes . validateNonNegativeInteger ( value ) ;
344344 if ( ! nonNegResult . isValid ) {
345345 return nonNegResult ;
346346 }
@@ -497,7 +497,7 @@ export class BuiltinTypes {
497497 }
498498
499499 for ( const part of parts ) {
500- const ncNameResult = this . validateNCName ( part ) ;
500+ const ncNameResult = BuiltinTypes . validateNCName ( part ) ;
501501 if ( ! ncNameResult . isValid ) {
502502 return ValidationResult . error ( "Invalid QName: " + ncNameResult . errors [ 0 ] . message ) ;
503503 }
0 commit comments