2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE 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 SOPE 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 SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __DOMQueryPathExpression_H__
23 #define __DOMQueryPathExpression_H__
25 #import <Foundation/NSObject.h>
27 @class NSString, NSArray;
29 @interface DOMQueryPathExpression : NSObject
34 First the QueryPath is separated into path components, then the path
35 components are evaluated:
37 '-' - placed in front of the path component, makes the search flat
38 '/' - select DOM root node (usually the document-element)
39 '.' - select current node
40 '..' - select DOM parent node
41 '*' - select all child elements (either deep or non-deep)
42 '!x' - evaluate keypath 'x' on node
43 '?x' - lookup processing instruction 'x' (either deep or non-deep)
44 '@x' - lookup attribute 'x',
45 if x is '*', select all attributes (the map)
46 x may contain a ':' for namespace queries
48 any other string: select a child-node with the string as the name.
52 "./head/title" - lookup the 'title' node contained in the 'head' child node
53 "./@name" - lookup the 'name' attribute of the current node
54 "./?blah" - lookup the PI 'blah' starting with the current node
55 "./!values" - call 'valueForKey:@"values"' on the current node
56 "/-title" - flat search for 'title' element
59 + (id)queryPathWithString:(NSString *)_string;
60 + (id)queryPathWithComponents:(NSArray *)_string;
61 + (NSArray *)queryPathComponentsOfString:(NSString *)_path;
63 - (id)evaluateWithNode:(id)_node; // DEPRECATED !!!
64 - (id)evaluateWithNodeList:(id)_nodeList;
68 #endif /* __DOMQueryPathExpression_H__ */