From: helge Date: Mon, 7 Mar 2005 19:32:54 +0000 (+0000) Subject: added some support for non-XML style tags X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cb5383e0dc27b44d9e5cb701efd4c8f6d949823;p=sope added some support for non-XML style tags git-svn-id: http://svn.opengroupware.org/SOPE/trunk@631 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/WEExtensions/ChangeLog b/sope-appserver/WEExtensions/ChangeLog index ff572242..7586f3b0 100644 --- a/sope-appserver/WEExtensions/ChangeLog +++ b/sope-appserver/WEExtensions/ChangeLog @@ -1,8 +1,12 @@ +2005-03-07 Helge Hess + + * added some support for -generateXMLStyleEmptyElements (v4.5.69) + 2005-02-23 Helge Hess * WEResourceManager.m: lookup web resources in Library/AppName/WebServerResources, fixed an incorrect reference to - OGo (w4.5.68) + OGo (v4.5.68) 2005-02-17 Helge Hess diff --git a/sope-appserver/WEExtensions/Version b/sope-appserver/WEExtensions/Version index 853c2846..ce9f1f8e 100644 --- a/sope-appserver/WEExtensions/Version +++ b/sope-appserver/WEExtensions/Version @@ -1,5 +1,5 @@ # version file -SUBMINOR_VERSION:=68 +SUBMINOR_VERSION:=69 # v4.5.65 requires libNGObjWeb v4.5.106 diff --git a/sope-appserver/WEExtensions/WEPageView.m b/sope-appserver/WEExtensions/WEPageView.m index c76193c3..b72366f8 100644 --- a/sope-appserver/WEExtensions/WEPageView.m +++ b/sope-appserver/WEExtensions/WEPageView.m @@ -367,7 +367,10 @@ static inline NSString *WEPageLabelForKey(NSString *_key, WOContext *_ctx) { [_response appendContentString:img]; [_response appendContentString:@"\" alt=\""]; [_response appendContentString:label]; - [_response appendContentString:@"\" />"]; + if (_ctx->wcFlags.xmlStyleEmptyElements) + [_response appendContentString:@"\" />"]; + else + [_response appendContentString:@"\">"]; [_ctx deleteLastElementIDComponent]; return; } @@ -389,7 +392,10 @@ static inline NSString *WEPageLabelForKey(NSString *_key, WOContext *_ctx) { [_response appendContentString:img]; [_response appendContentString:@"\" alt=\""]; [_response appendContentString:label]; - [_response appendContentString:@"\" />"]; + if (_ctx->wcFlags.xmlStyleEmptyElements) + [_response appendContentString:@"\" />"]; + else + [_response appendContentString:@"\">"]; } /* close anker */ if (!_isBlind && _info) { diff --git a/sope-appserver/WEExtensions/WERichString.m b/sope-appserver/WEExtensions/WERichString.m index b16a01e4..f061a995 100644 --- a/sope-appserver/WEExtensions/WERichString.m +++ b/sope-appserver/WEExtensions/WERichString.m @@ -209,7 +209,10 @@ static inline BOOL _doShow(WERichString *self, WOContext *_ctx) { for (i = 0; i < count; i++) { NSString *line = [lines objectAtIndex:i]; - if (i != 0) [_response appendContentString:@"
"]; + if (i != 0) { + [_response appendContentString: + (_ctx->wcFlags.xmlStyleEmptyElements)?@"
":@"
"]; + } [_response appendContentHTMLString:line]; } diff --git a/sope-appserver/WEExtensions/WETabView.m b/sope-appserver/WEExtensions/WETabView.m index 5daec9bc..de3458af 100644 --- a/sope-appserver/WEExtensions/WETabView.m +++ b/sope-appserver/WEExtensions/WETabView.m @@ -450,7 +450,10 @@ static NSNumber *YesNumber; [_response appendContentString:@"' title='"]; [_response appendContentHTMLAttributeValue:label]; [_response appendContentString:@"'"]; - [_response appendContentString:@" />"]; + if (_ctx->wcFlags.xmlStyleEmptyElements) + [_response appendContentString:@" />"]; + else + [_response appendContentString:@">"]; } else { NSString *fc = [self->fontColor stringValueInComponent:comp]; @@ -719,7 +722,10 @@ static NSNumber *YesNumber; if ((uri = WEUriOfResource(uri, _ctx))) { [_response appendContentString:@"\"\""]; + if (_ctx->wcFlags.xmlStyleEmptyElements) + [_response appendContentString:@"\" />"]; + else + [_response appendContentString:@"\">"]; } else [_response appendContentString:@" "]; diff --git a/sope-appserver/WEExtensions/WETreeData.m b/sope-appserver/WEExtensions/WETreeData.m index 6fab37db..100a3c4c 100644 --- a/sope-appserver/WEExtensions/WETreeData.m +++ b/sope-appserver/WEExtensions/WETreeData.m @@ -128,7 +128,10 @@ static Class StrClass = Nil; [_response appendContentString:@"\""]; } - [_response appendContentString:@" />"]; + if (_ctx->wcFlags.xmlStyleEmptyElements) + [_response appendContentString:@" />"]; + else + [_response appendContentString:@">"]; } - (void)_appendLink:(NSString *)_icon resp:(WOResponse *)_response @@ -146,7 +149,10 @@ static Class StrClass = Nil; [_response appendContentString:[_ctx elementID]]; [_response appendContentString:@"\" src=\""]; [_response appendContentString:_icon]; - [_response appendContentString:@"\" />"]; + if (_ctx->wcFlags.xmlStyleEmptyElements) + [_response appendContentString:@"\" />"]; + else + [_response appendContentString:@"\">"]; } else { NSString *link; diff --git a/sope-appserver/WEExtensions/WETreeView.m b/sope-appserver/WEExtensions/WETreeView.m index ef70122b..fe4a156d 100644 --- a/sope-appserver/WEExtensions/WETreeView.m +++ b/sope-appserver/WEExtensions/WETreeView.m @@ -718,8 +718,10 @@ NSString *WETreeView_Space = @"WETreeView_Space"; [_ctx removeObjectForKey:WETreeView_HEADER_MODE]; if (doTable) [_response appendContentString:@""]; - else + else if (_ctx->wcFlags.xmlStyleEmptyElements) [_response appendContentString:@"
"]; + else + [_response appendContentString:@"
"]; cnt = [self->matrix count]; @@ -750,8 +752,10 @@ NSString *WETreeView_Space = @"WETreeView_Space"; [self->template appendToResponse:_response inContext:_ctx]; if (doTable) [_response appendContentString:@""]; - else + else if (_ctx->wcFlags.xmlStyleEmptyElements) [_response appendContentString:@"
"]; + else + [_response appendContentString:@"
"]; [_ctx deleteLastElementIDComponent]; // delete "end"