Overview
Comment: | Split XML processing instructions into target/data |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d4b3f8ea703fe6522a2509d38c866e99 |
User & Date: | js on 2021-04-09 01:28:08 |
Other Links: | manifest | tags |
Context
2021-04-13
| ||
21:43 | Simplify OFValue check-in: e41940c022 user: js tags: trunk | |
2021-04-09
| ||
01:28 | Split XML processing instructions into target/data check-in: d4b3f8ea70 user: js tags: trunk | |
2021-04-08
| ||
19:30 | OFXMLComment: Add a property for the text check-in: f7713f3033 user: js tags: trunk | |
Changes
Modified src/Makefile from [7d07fd2fda] to [06838b11b3].
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | OFXMLCharacters.m \ OFXMLComment.m \ OFXMLElement.m \ OFXMLElement+Serialization.m \ OFXMLElementBuilder.m \ OFXMLNode.m \ OFXMLParser.m \ |
︙ |
Modified src/OFXMLElementBuilder.m from [07f6f7fa7b] to [a53bbdbeea].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - - + + - + - + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFXMLElementBuilder.h" |
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - - + + + - - + + + | - (void)dealloc { [_stack release]; [super dealloc]; } |
︙ |
Modified src/OFXMLParser.h from [96fc0ba278] to [2b3552397a].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - - + + - - + + + - - + + + | * @protocol OFXMLParserDelegate OFXMLParser.h ObjFW/OFXMLParser.h * * @brief A protocol that needs to be implemented by delegates for OFXMLParser. */ @protocol OFXMLParserDelegate <OFObject> @optional /** |
︙ | |||
128 129 130 131 132 133 134 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | @interface OFXMLParser: OFObject { id <OFXMLParserDelegate> _Nullable _delegate; enum of_xml_parser_state { OF_XMLPARSER_IN_BYTE_ORDER_MARK, OF_XMLPARSER_OUTSIDE_TAG, OF_XMLPARSER_TAG_OPENED, |
︙ |
Modified src/OFXMLParser.m from [e395ba83dc] to [02a95773a3].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - - + + - - - + + + + - + | #include "config.h" #define OF_XML_PARSER_M #include <string.h> #import "OFXMLParser.h" |
︙ | |||
63 64 65 66 67 68 69 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + - | static void inCommentState2(OFXMLParser *); static void inDOCTYPEState(OFXMLParser *); typedef void (*state_function_t)(OFXMLParser *); static state_function_t lookupTable[] = { [OF_XMLPARSER_IN_BYTE_ORDER_MARK] = inByteOrderMarkState, [OF_XMLPARSER_OUTSIDE_TAG] = outsideTagState, [OF_XMLPARSER_TAG_OPENED] = tagOpenedState, |
︙ | |||
348 349 350 351 352 353 354 | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - + | if (self->_finishedParsing && self->_data[self->_i] != '!' && self->_data[self->_i] != '?') @throw [OFMalformedXMLException exceptionWithParser: self]; switch (self->_data[self->_i]) { case '?': self->_last = self->_i + 1; |
︙ | |||
375 376 377 378 379 380 381 | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | - + - - - - - + + | self->_i--; break; } } /* <?xml […]?> */ static bool |
︙ | |||
469 470 471 472 473 474 475 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | - + - + - + + + + + + + + + + - - - - + + + + + + + + - - + + - + + | if (PIState != 0 || !hasVersion) return false; return true; } |
︙ | |||
544 545 546 547 548 549 550 | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | - - - + | length: tmp - bufferCString]; } else { self->_name = [bufferString copy]; self->_prefix = nil; } if (self->_data[self->_i] == '>' || self->_data[self->_i] == '/') { |
︙ |
Renamed and modified src/OFXMLProcessingInstructions.h [9211767771] to src/OFXMLProcessingInstruction.h [86de9b9bcd].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - - + + - + - + - - + + + + + + + + + + + + - + + + - - + + - + + - - + + + - - + + - + + | */ #import "OFXMLNode.h" OF_ASSUME_NONNULL_BEGIN /** |
Renamed and modified src/OFXMLProcessingInstructions.m [aed6fd90fa] to src/OFXMLProcessingInstruction.m [14a03b0d16].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - - - + + + + - - + + + + + - + + - + + + - + - - + + + + + + + - + + - + - + - + - + + + + - - + + + + + + + + + + + + - + + - + + + + - + - - + + - - + + + + + + - - - - + + + - + - - - - + + + + + + + + + + + + | * file. */ #include "config.h" #include <string.h> |
Modified src/ObjFW.h from [2e31ed4971] to [35df895e07].
︙ | |||
112 113 114 115 116 117 118 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + | #import "OFXMLAttribute.h" #import "OFXMLElement.h" #import "OFXMLAttribute.h" #import "OFXMLCharacters.h" #import "OFXMLCDATA.h" #import "OFXMLComment.h" |
︙ |
Modified tests/OFXMLParserTests.m from [c56cc9efc9] to [20f4783b1c].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | #import "TestsAppDelegate.h" static OFString *module = @"OFXMLParser"; static int i = 0; enum event_type { |
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | - - + + + - - + + | OFString *msg; i++; msg = [OFString stringWithFormat: @"Parsing part #%d", i]; switch (i) { case 1: |
︙ | |||
228 229 230 231 232 233 234 | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | - - + + + - - + + - + | case 32: TEST(msg, type == TAG_CLOSE && [name isEqual: @"root"] && prefix == nil && ns == nil); break; } } |
︙ | |||
367 368 369 370 371 372 373 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | - + - + - + | EXPECT_EXCEPTION(@"Detection of junk after the document #1", OFMalformedXMLException, [parser parseString: @"a"]) EXPECT_EXCEPTION(@"Detection of junk after the document #2", OFMalformedXMLException, [parser parseString: @"<!["]) parser = [OFXMLParser parser]; |