2 // XSLTProcessorJAXPBase.m
5 // Created by Marc Liyanage on Mon Aug 18 2003.
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
9 #import "XSLTProcessorJAXPBase.h"
12 @implementation XSLTProcessorJAXPBase
19 - (BOOL)processStrings:(NSData *)xmlCode withXslt:(NSData *)xsltCode andParameters:(const char **)params {
23 NSString *jaxpBaseUri = @"";
24 if ([self baseUri] != nil) {
25 jaxpBaseUri = [self baseUri];
29 NSMutableString *paramBuffer = [[NSMutableString alloc] init];
31 while (params && params[i]) {
33 [paramBuffer appendString:[NSString stringWithFormat:@"%s==_=!=_==%s", params[i], params[i+1]]];
36 // more parameters to follow
37 [paramBuffer appendString:@"--_-!-_--"];
43 JAXPWrapper *jw = (JAXPWrapper *)[[NSClassFromString(@"JAXPWrapper") alloc] init];
44 BOOL swresult = [jw transform:[self getJAXPProcessorName] :xmlCode :xsltCode :paramBuffer :jaxpBaseUri];
46 [self setResultEncodingFromData:xsltCode];
49 [self setResult:[jw getResult]];
51 [self setError:[jw getErrorMessage] atLine:[jw getErrorLine] inSource:[jw getErrorSource]];
57 return ![self errorOccurred];
62 - (NSString *) getJAXPProcessorName {
64 NSLog(@"subclass must override getJAXPProcessorName in XSLTProcessorJAXPBase!");