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 #include <NGObjWeb/WOxElemBuilder.h>
26 This builder builds various elements from the UI-X product.
28 All tags are mapped into the <uix:> namespace (XMLNS_OD_BIND).
30 <var:tabview .../> maps to UIxTabView
31 <var:tab .../> maps to UIxTabItem
34 @interface UIxElemBuilder : WOxTagClassElemBuilder
40 #include <SaxObjC/XMLNamespaces.h>
43 #define XMLNS_UIX @"OGo:uix"
46 @implementation UIxElemBuilder
48 - (Class)classForElement:(id<DOMElement>)_element {
53 if (![[_element namespaceURI] isEqualToString:XMLNS_UIX])
56 tagName = [_element tagName];
57 if ((tl = [tagName length]) < 2)
60 c1 = [tagName characterAtIndex:0];
63 case 't': { /* starting with 't' */
66 c2 = [tagName characterAtIndex:1];
68 if (tl == 3 && c2 == 'a') {
69 if ([tagName characterAtIndex:2] == 'b')
70 return NSClassFromString(@"UIxTabItem");
75 if ([tagName isEqualToString:@"tabview"])
76 return NSClassFromString(@"UIxTabView");
86 @end /* UIxElemBuilder */