2 // XSLTProcessorSaxon.m
5 // Created by Marc Liyanage on Sun Jun 08 2003.
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
9 #import "XSLTProcessorSaxon.h"
12 @implementation XSLTProcessorSaxon
15 - (int)processorType {
17 return PROCESSORTYPE_SAXON;
23 - (BOOL)processStrings:(NSString *)xmlCode withXslt:(NSString *)xsltCode andParameters:(const char **)params {
27 NSString *jaxpBaseUri = @"";
28 if ([self baseUri] != nil) {
29 jaxpBaseUri = [self baseUri];
33 NSMutableString *paramBuffer = [[NSMutableString alloc] init];
35 while (params && params[i]) {
37 [paramBuffer appendString:[NSString stringWithFormat:@"%s==_=!=_==%s", params[i], params[i+1]]];
40 // more parameters to follow
41 [paramBuffer appendString:@"--_-!-_--"];
47 JAXPWrapper *jw = (JAXPWrapper *)[[NSClassFromString(@"JAXPWrapper") alloc] init];
48 BOOL swresult = [jw transform:@"com.icl.saxon.TransformerFactoryImpl" :xmlCode :xsltCode :paramBuffer :jaxpBaseUri];
53 [self setResult:[jw getResult]];
55 [self setError:[jw getErrorMessage] atLine:[jw getErrorLine] inSource:[jw getErrorSource]];
61 return ![self errorOccurred];