30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#import "OFStream.h"
#ifdef OF_HAVE_FILES
# import "OFFile.h"
#endif
#import "OFSystemInfo.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidFormatException.h"
#import "OFMalformedXMLException.h"
#import "OFOutOfRangeException.h"
#import "OFUnboundPrefixException.h"
typedef void (*state_function_t)(id, SEL);
static SEL selectors[OF_XMLPARSER_NUM_STATES];
|
>
>
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#import "OFStream.h"
#ifdef OF_HAVE_FILES
# import "OFFile.h"
#endif
#import "OFSystemInfo.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFMalformedXMLException.h"
#import "OFOutOfRangeException.h"
#import "OFUnboundPrefixException.h"
typedef void (*state_function_t)(id, SEL);
static SEL selectors[OF_XMLPARSER_NUM_STATES];
|
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
|
if ([attribute isEqual: @"version"]) {
if (![value hasPrefix: @"1."])
return false;
hasVersion = true;
}
if ([attribute isEqual: @"encoding"])
_encoding = of_string_parse_encoding(value);
last = i + 1;
PIState = 0;
break;
}
}
|
|
>
>
|
>
>
>
>
>
|
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
|
if ([attribute isEqual: @"version"]) {
if (![value hasPrefix: @"1."])
return false;
hasVersion = true;
}
if ([attribute isEqual: @"encoding"]) {
@try {
_encoding =
of_string_parse_encoding(value);
} @catch (OFInvalidArgumentException *e) {
@throw [OFInvalidEncodingException
exception];
}
}
last = i + 1;
PIState = 0;
break;
}
}
|