2 Copyright (C) 2000-2004 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #ifndef __DOMQueryPathExpression_H__
24 #define __DOMQueryPathExpression_H__
26 #import <Foundation/NSObject.h>
28 @class NSString, NSArray;
30 @interface DOMQueryPathExpression : NSObject
35 First the QueryPath is separated into path components, then the path
36 components are evaluated:
38 '-' - placed in front of the path component, makes the search flat
39 '/' - select DOM root node (usually the document-element)
40 '.' - select current node
41 '..' - select DOM parent node
42 '*' - select all child elements (either deep or non-deep)
43 '!x' - evaluate keypath 'x' on node
44 '?x' - lookup processing instruction 'x' (either deep or non-deep)
45 '@x' - lookup attribute 'x',
46 if x is '*', select all attributes (the map)
47 x may contain a ':' for namespace queries
49 any other string: select a child-node with the string as the name.
53 "./head/title" - lookup the 'title' node contained in the 'head' child node
54 "./@name" - lookup the 'name' attribute of the current node
55 "./?blah" - lookup the PI 'blah' starting with the current node
56 "./!values" - call 'valueForKey:@"values"' on the current node
57 "/-title" - flat search for 'title' element
60 + (id)queryPathWithString:(NSString *)_string;
61 + (id)queryPathWithComponents:(NSArray *)_string;
62 + (NSArray *)queryPathComponentsOfString:(NSString *)_path;
64 - (id)evaluateWithNode:(id)_node; // DEPRECATED !!!
65 - (id)evaluateWithNodeList:(id)_nodeList;
69 #endif /* __DOMQueryPathExpression_H__ */