TVLXML works

This commit is contained in:
Matthias Neeracher 2011-09-02 17:12:22 +02:00
parent f86615677c
commit 7a3e19b694

View File

@ -27,7 +27,7 @@
NSURL * dtdURL = [[NSBundle bundleForClass:[TVLXML class]] URLForResource:@"partwise" withExtension:@"dtd"]; NSURL * dtdURL = [[NSBundle bundleForClass:[TVLXML class]] URLForResource:@"partwise" withExtension:@"dtd"];
NSXMLDTD * dtd = [[NSXMLDTD alloc] initWithContentsOfURL:dtdURL options:0 error:&err]; NSXMLDTD * dtd = [[NSXMLDTD alloc] initWithContentsOfURL:dtdURL options:0 error:&err];
[dtd setName:@"partwise.dtd"]; [dtd setName:@"score-partwise"];
STAssertNotNil(dtd, @"DTD: %@\n", [err localizedDescription]); STAssertNotNil(dtd, @"DTD: %@\n", [err localizedDescription]);
@ -55,7 +55,7 @@
STAssertNotNil(xml, @"Parsing `%@': %@", testName, [err localizedDescription]); STAssertNotNil(xml, @"Parsing `%@': %@", testName, [err localizedDescription]);
[xml setDTD:dtd]; [xml setDTD:dtd];
STAssertTrue([xml validateAndReturnError:&err], @"Validating `$@': %@", testName, [err localizedDescription]); STAssertTrue([xml validateAndReturnError:&err], @"Validating `%@': %@", testName, [err localizedDescription]);
} }
} }