2002-05-22 14:23:17 +00:00
|
|
|
/** Interface for XML parsing classes
|
2000-09-15 19:56:39 +00:00
|
|
|
|
|
|
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Written by: Michael Pakhantsov <mishel@berest.dp.ua> on behalf of
|
|
|
|
Brainstorm computer solutions.
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
Date: Jule 2000
|
2004-03-28 04:42:11 +00:00
|
|
|
|
2000-09-15 19:56:39 +00:00
|
|
|
Integrated by Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
|
|
|
Date: September 2000
|
2002-08-27 15:46:15 +00:00
|
|
|
GSXPath by Nicola Pero <nicola@brainstorm.co.uk>
|
2000-09-15 19:56:39 +00:00
|
|
|
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
2004-03-28 04:42:11 +00:00
|
|
|
|
2000-09-15 19:56:39 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
2002-05-22 14:23:17 +00:00
|
|
|
|
|
|
|
AutogsdocSource: Additions/GSXML.m
|
|
|
|
|
2000-09-11 11:59:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GSXML_H__
|
|
|
|
#define __GSXML_H__
|
|
|
|
|
2003-02-03 04:15:27 +00:00
|
|
|
#ifndef NeXT_Foundation_LIBRARY
|
2000-09-11 11:59:33 +00:00
|
|
|
#include <Foundation/NSObject.h>
|
|
|
|
#include <Foundation/NSString.h>
|
|
|
|
#include <Foundation/NSDictionary.h>
|
2003-02-03 04:15:27 +00:00
|
|
|
#else
|
|
|
|
#include <Foundation/Foundation.h>
|
|
|
|
#endif
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-01-03 12:11:08 +00:00
|
|
|
#ifndef STRICT_MACOS_X
|
|
|
|
#ifndef STRICT_OPENSTEP
|
|
|
|
|
2000-09-11 11:59:33 +00:00
|
|
|
@class GSXMLAttribute;
|
|
|
|
@class GSXMLDocument;
|
|
|
|
@class GSXMLNamespace;
|
|
|
|
@class GSXMLNode;
|
|
|
|
@class GSSAXHandler;
|
|
|
|
|
|
|
|
|
2001-11-21 17:10:22 +00:00
|
|
|
@interface GSXMLDocument : NSObject <NSCopying>
|
2000-09-11 11:59:33 +00:00
|
|
|
{
|
2002-05-22 14:23:17 +00:00
|
|
|
void *lib; // pointer to xmllib pointer of xmlDoc struct
|
2002-05-22 16:26:42 +00:00
|
|
|
BOOL _ownsLib;
|
|
|
|
id _parent;
|
2000-09-11 11:59:33 +00:00
|
|
|
}
|
2002-01-02 10:27:26 +00:00
|
|
|
+ (GSXMLDocument*) documentWithVersion: (NSString*)version;
|
|
|
|
|
2002-01-02 19:33:57 +00:00
|
|
|
- (NSString*) description;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (NSString*) encoding;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
- (void*) lib;
|
|
|
|
|
2000-09-15 19:56:39 +00:00
|
|
|
- (GSXMLNode*) makeNodeWithNamespace: (GSXMLNamespace*)ns
|
|
|
|
name: (NSString*)name
|
|
|
|
content: (NSString*)content;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-01-02 10:27:26 +00:00
|
|
|
- (GSXMLNode*) root;
|
|
|
|
- (GSXMLNode*) setRoot: (GSXMLNode*)node;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-01-02 10:27:26 +00:00
|
|
|
- (NSString*) version;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-01-02 10:27:26 +00:00
|
|
|
- (BOOL) writeToFile: (NSString*)filename atomically: (BOOL)useAuxilliaryFile;
|
|
|
|
- (BOOL) writeToURL: (NSURL*)url atomically: (BOOL)useAuxilliaryFile;
|
2001-01-17 23:17:44 +00:00
|
|
|
|
2000-09-11 11:59:33 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-11-21 17:10:22 +00:00
|
|
|
@interface GSXMLNamespace : NSObject <NSCopying>
|
2000-09-11 11:59:33 +00:00
|
|
|
{
|
2000-09-19 20:47:56 +00:00
|
|
|
void *lib; /* pointer to struct xmlNs in the gnome xmllib */
|
2002-05-22 16:26:42 +00:00
|
|
|
id _parent;
|
2000-09-11 11:59:33 +00:00
|
|
|
}
|
|
|
|
|
2001-12-17 14:31:42 +00:00
|
|
|
+ (NSString*) descriptionFromType: (int)type;
|
|
|
|
+ (int) typeFromDescription: (NSString*)desc;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-01-02 10:27:26 +00:00
|
|
|
- (NSString*) href;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
- (void*) lib;
|
|
|
|
- (GSXMLNamespace*) next;
|
|
|
|
- (NSString*) prefix;
|
2001-04-25 14:19:57 +00:00
|
|
|
- (int) type;
|
|
|
|
- (NSString*) typeDescription;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
/* XML Node */
|
|
|
|
|
2001-11-21 17:10:22 +00:00
|
|
|
@interface GSXMLNode : NSObject <NSCopying>
|
2000-09-11 11:59:33 +00:00
|
|
|
{
|
|
|
|
void *lib; /* pointer to struct xmlNode from libxml */
|
2002-05-22 16:26:42 +00:00
|
|
|
id _parent;
|
2000-09-11 11:59:33 +00:00
|
|
|
}
|
2001-04-25 14:19:57 +00:00
|
|
|
|
2001-12-17 14:31:42 +00:00
|
|
|
+ (NSString*) descriptionFromType: (int)type;
|
|
|
|
+ (int) typeFromDescription: (NSString*)desc;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-05-22 14:23:17 +00:00
|
|
|
- (NSDictionary*) attributes;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (NSString*) content;
|
2003-06-18 10:08:02 +00:00
|
|
|
- (NSString*) description;
|
2002-05-26 15:24:05 +00:00
|
|
|
- (GSXMLDocument*) document;
|
2003-05-12 19:23:02 +00:00
|
|
|
- (NSString*) escapedContent;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (GSXMLAttribute*) firstAttribute;
|
|
|
|
- (GSXMLNode*) firstChild;
|
|
|
|
- (GSXMLNode*) firstChildElement;
|
2003-07-28 10:53:18 +00:00
|
|
|
- (BOOL) isElement;
|
|
|
|
- (BOOL) isText;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (void*) lib;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (GSXMLAttribute*) makeAttributeWithName: (NSString*)name
|
|
|
|
value: (NSString*)value;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (GSXMLNode*) makeChildWithNamespace: (GSXMLNamespace*)ns
|
|
|
|
name: (NSString*)name
|
|
|
|
content: (NSString*)content;
|
2002-05-26 15:24:05 +00:00
|
|
|
- (GSXMLNode*) makeComment: (NSString*)content;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (GSXMLNamespace*) makeNamespaceHref: (NSString*)href
|
|
|
|
prefix: (NSString*)prefix;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (GSXMLNode*) makePI: (NSString*)name
|
|
|
|
content: (NSString*)content;
|
2002-05-26 15:24:05 +00:00
|
|
|
- (GSXMLNode*) makeText: (NSString*)content;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (NSString*) name;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (GSXMLNamespace*) namespace;
|
|
|
|
- (GSXMLNamespace*) namespaceDefinitions;
|
2002-05-26 15:24:05 +00:00
|
|
|
- (GSXMLNode*) next;
|
|
|
|
- (GSXMLNode*) nextElement;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (NSString*) objectForKey: (NSString*)key;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (GSXMLNode*) parent;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (GSXMLNode*) previous;
|
2002-09-25 15:32:11 +00:00
|
|
|
- (GSXMLNode*) previousElement;
|
2001-04-25 14:19:57 +00:00
|
|
|
- (NSMutableDictionary*) propertiesAsDictionaryWithKeyTransformationSel:
|
|
|
|
(SEL)keyTransformSel;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (void) setObject: (NSString*)value forKey:(NSString*)key;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (int) type;
|
|
|
|
- (NSString*) typeDescription;
|
2002-07-29 19:37:40 +00:00
|
|
|
- (void) setNamespace: (GSXMLNamespace *)space;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2002-05-22 14:23:17 +00:00
|
|
|
@interface GSXMLAttribute : GSXMLNode
|
2000-09-11 11:59:33 +00:00
|
|
|
- (NSString*) value;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GSXMLParser : NSObject
|
|
|
|
{
|
2003-05-22 17:00:03 +00:00
|
|
|
id src; /* source for parsing */
|
|
|
|
void *lib; /* parser context */
|
|
|
|
GSSAXHandler *saxHandler; /* handler for parsing */
|
|
|
|
NSMutableString *messages; /* append messages here */
|
2000-09-11 11:59:33 +00:00
|
|
|
}
|
2001-12-17 14:31:42 +00:00
|
|
|
+ (NSString*) loadEntity: (NSString*)publicId at: (NSString*)location;
|
2000-09-22 13:45:58 +00:00
|
|
|
+ (GSXMLParser*) parser;
|
|
|
|
+ (GSXMLParser*) parserWithContentsOfFile: (NSString*)path;
|
|
|
|
+ (GSXMLParser*) parserWithContentsOfURL: (NSURL*)url;
|
|
|
|
+ (GSXMLParser*) parserWithData: (NSData*)data;
|
|
|
|
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*)handler;
|
2000-09-11 11:59:33 +00:00
|
|
|
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*)handler
|
2000-09-22 13:45:58 +00:00
|
|
|
withContentsOfFile: (NSString*)path;
|
|
|
|
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*)handler
|
|
|
|
withContentsOfURL: (NSURL*)url;
|
|
|
|
+ (GSXMLParser*) parserWithSAXHandler: (GSSAXHandler*)handler
|
|
|
|
withData: (NSData*)data;
|
2000-09-19 20:47:56 +00:00
|
|
|
+ (NSString*) xmlEncodingStringForStringEncoding: (NSStringEncoding)encoding;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2004-05-18 09:55:33 +00:00
|
|
|
- (int) columnNumber;
|
2002-05-22 14:23:17 +00:00
|
|
|
- (GSXMLDocument*) document;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (BOOL) doValidityChecking: (BOOL)yesno;
|
|
|
|
- (int) errNo;
|
|
|
|
- (BOOL) getWarnings: (BOOL)yesno;
|
2000-09-22 13:45:58 +00:00
|
|
|
- (id) initWithSAXHandler: (GSSAXHandler*)handler;
|
|
|
|
- (id) initWithSAXHandler: (GSSAXHandler*)handler
|
|
|
|
withContentsOfFile: (NSString*)path;
|
|
|
|
- (id) initWithSAXHandler: (GSSAXHandler*)handler
|
|
|
|
withContentsOfURL: (NSURL*)url;
|
|
|
|
- (id) initWithSAXHandler: (GSSAXHandler*)handler
|
|
|
|
withData: (NSData*)data;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-01-02 10:27:26 +00:00
|
|
|
- (BOOL) keepBlanks: (BOOL)yesno;
|
2004-05-18 09:55:33 +00:00
|
|
|
- (int) lineNumber;
|
2003-05-22 19:02:38 +00:00
|
|
|
- (NSString*) messages;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (BOOL) parse;
|
2000-09-20 06:45:02 +00:00
|
|
|
- (BOOL) parse: (NSData*)data;
|
2004-05-18 09:55:33 +00:00
|
|
|
- (NSString*) publicID;
|
2003-05-22 17:00:03 +00:00
|
|
|
- (void) saveMessages: (BOOL)yesno;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (BOOL) substituteEntities: (BOOL)yesno;
|
2004-05-18 09:55:33 +00:00
|
|
|
- (NSString*) systemID;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2000-09-29 07:12:46 +00:00
|
|
|
@interface GSHTMLParser : GSXMLParser
|
|
|
|
{
|
|
|
|
}
|
|
|
|
@end
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
@interface GSSAXHandler : NSObject
|
|
|
|
{
|
2000-09-19 20:47:56 +00:00
|
|
|
void *lib; // xmlSAXHandlerPtr
|
|
|
|
GSXMLParser *parser;
|
2003-05-23 08:58:52 +00:00
|
|
|
@protected
|
|
|
|
BOOL isHtmlHandler;
|
2000-09-11 11:59:33 +00:00
|
|
|
}
|
|
|
|
+ (GSSAXHandler*) handler;
|
|
|
|
- (void*) lib;
|
2000-09-19 20:47:56 +00:00
|
|
|
- (GSXMLParser*) parser;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
2002-06-06 14:02:59 +00:00
|
|
|
/* callbacks ... */
|
2000-09-11 11:59:33 +00:00
|
|
|
- (void) attribute: (NSString*)name
|
|
|
|
value: (NSString*)value;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (void) attributeDecl: (NSString*)nameElement
|
|
|
|
name: (NSString*)name
|
|
|
|
type: (int)type
|
|
|
|
typeDefValue: (int)defType
|
|
|
|
defaultValue: (NSString*)value;
|
2000-09-20 06:45:02 +00:00
|
|
|
- (void) characters: (NSString*)name;
|
2004-05-16 13:26:32 +00:00
|
|
|
- (void) cdataBlock: (NSData*)value;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (void) comment: (NSString*) value;
|
|
|
|
- (void) elementDecl: (NSString*)name
|
|
|
|
type: (int)type;
|
|
|
|
- (void) endDocument;
|
|
|
|
- (void) endElement: (NSString*)elementName;
|
2004-05-18 09:55:33 +00:00
|
|
|
- (void) endElement: (NSString*)elementName
|
|
|
|
prefix: (NSString*)prefix
|
|
|
|
href: (NSString*)href;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (void) entityDecl: (NSString*)name
|
|
|
|
type: (int)type
|
|
|
|
public: (NSString*)publicId
|
|
|
|
system: (NSString*)systemId
|
|
|
|
content: (NSString*)content;
|
|
|
|
- (void) error: (NSString*)e;
|
|
|
|
- (void) error: (NSString*)e
|
|
|
|
colNumber: (int)colNumber
|
|
|
|
lineNumber: (int)lineNumber;
|
|
|
|
- (BOOL) externalSubset: (NSString*)name
|
2000-09-11 11:59:33 +00:00
|
|
|
externalID: (NSString*)externalID
|
|
|
|
systemID: (NSString*)systemID;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (void) fatalError: (NSString*)e;
|
|
|
|
- (void) fatalError: (NSString*)e
|
|
|
|
colNumber: (int)colNumber
|
|
|
|
lineNumber: (int)lineNumber;
|
|
|
|
- (void*) getEntity: (NSString*)name;
|
|
|
|
- (void*) getParameterEntity: (NSString*)name;
|
|
|
|
- (void) globalNamespace: (NSString*)name
|
|
|
|
href: (NSString*)href
|
|
|
|
prefix: (NSString*)prefix;
|
2000-09-19 20:47:56 +00:00
|
|
|
- (int) hasExternalSubset;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (int) hasInternalSubset;
|
|
|
|
- (void) ignoreWhitespace: (NSString*)ch;
|
|
|
|
- (BOOL) internalSubset: (NSString*)name
|
2000-09-27 15:57:30 +00:00
|
|
|
externalID: (NSString*)externalID
|
|
|
|
systemID: (NSString*)systemID;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (int) isStandalone;
|
2000-11-01 12:31:21 +00:00
|
|
|
- (NSString*) loadEntity: (NSString*)publicId
|
2002-06-06 14:02:59 +00:00
|
|
|
at: (NSString*)location;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (void) namespaceDecl: (NSString*)name
|
|
|
|
href: (NSString*)href
|
|
|
|
prefix: (NSString*)prefix;
|
|
|
|
- (void) notationDecl: (NSString*)name
|
|
|
|
public: (NSString*)publicId
|
|
|
|
system: (NSString*)systemId;
|
2002-01-02 10:27:26 +00:00
|
|
|
- (void) processInstruction: (NSString*)targetName
|
|
|
|
data: (NSString*)PIdata;
|
|
|
|
- (void) reference: (NSString*)name;
|
|
|
|
- (void) startDocument;
|
|
|
|
- (void) startElement: (NSString*)elementName
|
|
|
|
attributes: (NSMutableDictionary*)elementAttributes;
|
2004-05-18 09:55:33 +00:00
|
|
|
- (void) startElement: (NSString*)elementName
|
|
|
|
prefix: (NSString*)prefix
|
|
|
|
href: (NSString*)href
|
|
|
|
attributes: (NSMutableDictionary*)elementAttributes;
|
2000-09-11 11:59:33 +00:00
|
|
|
- (void) unparsedEntityDecl: (NSString*)name
|
|
|
|
public: (NSString*)publicId
|
|
|
|
system: (NSString*)systemId
|
|
|
|
notationName: (NSString*)notation;
|
|
|
|
- (void) warning: (NSString*)e;
|
2001-03-10 08:40:23 +00:00
|
|
|
- (void) warning: (NSString*)e
|
|
|
|
colNumber: (int)colNumber
|
|
|
|
lineNumber: (int)lineNumber;
|
2000-09-11 11:59:33 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2003-05-22 17:00:03 +00:00
|
|
|
@interface GSTreeSAXHandler : GSSAXHandler
|
|
|
|
@end
|
|
|
|
|
2000-09-29 07:12:46 +00:00
|
|
|
@interface GSHTMLSAXHandler : GSSAXHandler
|
|
|
|
@end
|
|
|
|
|
2002-08-27 15:46:15 +00:00
|
|
|
@class GSXPathObject;
|
|
|
|
|
2002-11-22 10:47:48 +00:00
|
|
|
/*
|
2002-08-27 15:46:15 +00:00
|
|
|
* Using this library class is trivial. Get your GSXMLDocument. Create
|
|
|
|
* a GSXPathContext for it.
|
|
|
|
*
|
|
|
|
* GSXPathContext *p = [[GSXPathContext alloc] initWithDocument: document];
|
|
|
|
*
|
|
|
|
* Then, you can use it to evaluate XPath expressions:
|
|
|
|
*
|
|
|
|
* GSXPathString *result = [p evaluateExpression: @"string(/body/text())"];
|
|
|
|
* NSLog (@"Got %@", [result stringValue]);
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
@interface GSXPathContext : NSObject
|
|
|
|
{
|
|
|
|
void *_lib; // xmlXPathContext
|
|
|
|
GSXMLDocument *_document;
|
|
|
|
}
|
|
|
|
- (id) initWithDocument: (GSXMLDocument*)d;
|
|
|
|
- (GSXPathObject*) evaluateExpression: (NSString*)XPathExpression;
|
|
|
|
@end
|
|
|
|
|
|
|
|
/** XPath queries return a GSXPathObject. GSXPathObject in itself is
|
|
|
|
* an abstract class; there are four types of completely different
|
|
|
|
* GSXPathObject types, listed below. I'm afraid you need to check
|
|
|
|
* the returned type of each GSXPath query to make sure it's what you
|
|
|
|
* meant it to be.
|
|
|
|
*/
|
|
|
|
@interface GSXPathObject : NSObject
|
|
|
|
{
|
|
|
|
void *_lib; // xmlXPathObject
|
|
|
|
GSXPathContext *_context;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For XPath queries returning true/false.
|
|
|
|
*/
|
|
|
|
@interface GSXPathBoolean : GSXPathObject
|
|
|
|
- (BOOL) booleanValue;
|
|
|
|
@end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For XPath queries returning a number.
|
|
|
|
*/
|
|
|
|
@interface GSXPathNumber : GSXPathObject
|
|
|
|
- (double) doubleValue;
|
|
|
|
@end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For XPath queries returning a string.
|
|
|
|
*/
|
|
|
|
@interface GSXPathString : GSXPathObject
|
|
|
|
- (NSString *) stringValue;
|
|
|
|
@end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For XPath queries returning a node set.
|
|
|
|
*/
|
|
|
|
@interface GSXPathNodeSet : GSXPathObject
|
2002-11-22 10:47:48 +00:00
|
|
|
- (unsigned int) count;
|
2002-08-27 15:46:15 +00:00
|
|
|
- (unsigned int) length;
|
|
|
|
|
|
|
|
/** Please note that index starts from 0. */
|
|
|
|
- (GSXMLNode *) nodeAtIndex: (unsigned)index;
|
|
|
|
@end
|
|
|
|
|
2004-03-28 04:42:11 +00:00
|
|
|
@interface GSXMLDocument (XSLT)
|
|
|
|
+ (GSXMLDocument*) xsltTransformFile: (NSString*)xmlFile
|
|
|
|
stylesheet: (NSString*)xsltStylesheet
|
|
|
|
params: (NSDictionary*)params;
|
|
|
|
|
|
|
|
+ (GSXMLDocument*) xsltTransformFile: (NSString*)xmlFile
|
|
|
|
stylesheet: (NSString*)xsltStylesheet;
|
|
|
|
|
|
|
|
+ (GSXMLDocument*) xsltTransformXml: (NSData*)xmlData
|
|
|
|
stylesheet: (NSData*)xsltStylesheet
|
|
|
|
params: (NSDictionary*)params;
|
|
|
|
|
|
|
|
+ (GSXMLDocument*) xsltTransformXml: (NSData*)xmlData
|
2004-03-28 11:13:36 +00:00
|
|
|
stylesheet: (NSData*)xsltStylesheet;
|
2004-03-28 04:42:11 +00:00
|
|
|
|
|
|
|
- (GSXMLDocument*) xsltTransform: (GSXMLDocument*)xsltStylesheet
|
2004-03-28 11:13:36 +00:00
|
|
|
params: (NSDictionary*)params;
|
2004-03-28 04:42:11 +00:00
|
|
|
|
|
|
|
- (GSXMLDocument*) xsltTransform: (GSXMLDocument*)xsltStylesheet;
|
|
|
|
@end
|
2002-08-27 15:46:15 +00:00
|
|
|
|
2002-01-03 12:11:08 +00:00
|
|
|
#endif /* STRICT_MACOS_X */
|
|
|
|
#endif /* STRICT_OPENSTEP */
|
|
|
|
|
2001-02-27 15:58:39 +00:00
|
|
|
#endif /* __GSXML_H__ */
|
2000-09-11 11:59:33 +00:00
|
|
|
|