13
void initXML(struct TestData *td) {
16
ctx = xmlinit(&ecode, 0, 0, 0, 0, 0, 0, 0, 0);
19
printf("Failed to initialze XML parser, error %u\n", (unsigned) ecode);
24
void initXML_Transformation(struct TestData *td) {
27
xslCtx = xmlinit(&ecode, 0, 0, 0, 0, 0, 0, 0, 0);
30
printf("Failed to initialze XSL parser, error %u\n", (unsigned) ecode);
34
ecode=xmlparsebuf(xslCtx,td->xsl,td->xsllen,0,XML_FLAG_DISCARD_WHITESPACE);
36
printf("Failed to parse XSL file, error %u\n", (unsigned) ecode);
41
void releaseXML(struct TestData *td) {
47
void parseXML(struct TestData *td, unsigned long iter) {
50
ecode=xmlparsebuf(ctx,td->xml,td->xmllen,0,XML_FLAG_DISCARD_WHITESPACE);
52
printf("Failed to parse XML file, error %u\n", (unsigned) ecode);
57
void transformXML(struct TestData *td, unsigned long iter) {
62
resctx = xmlinit(&ecode, 0, 0, 0, 0, 0, 0, 0, 0);
65
printf("Failed to initialze XSL Result parser, error %u\n", (unsigned) ecode);
69
if (ecode = xslprocess(ctx, xslCtx, resctx, &result))
71
printf("XSL Transformation failed, error %u\n", (unsigned) ecode);
75
// if (iter==td->iterations) printStream(stdout, result, 4, 0);
82
int main(int argc, char *argv[]) {
83
return Test(argc,argv);