mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-24 12:11:18 +00:00
now works with otherTagString also.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13721 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c576f5a730
commit
52c456b6af
1 changed files with 18 additions and 12 deletions
|
@ -58,22 +58,28 @@ static char rcsId[] = "$Id$";
|
||||||
-(void)appendToResponse:(GSWResponse*)response_
|
-(void)appendToResponse:(GSWResponse*)response_
|
||||||
inContext:(GSWContext*)context_
|
inContext:(GSWContext*)context_
|
||||||
{
|
{
|
||||||
id component = [context_ page];
|
NSEnumerator *assocEnumer;
|
||||||
// id pageElement = [context_ pageElement];
|
id currentAssocKey;
|
||||||
|
id component = [context_ component];
|
||||||
|
id theValue;
|
||||||
|
id otherTag = nil;
|
||||||
id tag = [[associations objectForKey:@"elementName"] valueInComponent:component];
|
id tag = [[associations objectForKey:@"elementName"] valueInComponent:component];
|
||||||
//NSLog(@"elmentName/tag\n%@/%@\n",[associations objectForKey:@"elementName"],tag);
|
|
||||||
[response_ appendContentString:[NSString stringWithFormat:@"<%@",tag]];
|
[response_ appendContentString:[NSString stringWithFormat:@"<%@",tag]];
|
||||||
{
|
|
||||||
id theList = [associations allKeys];
|
if (otherTag = [[associations objectForKey:@"otherTagString"] valueInComponent:component]) {
|
||||||
int x;
|
[response_ appendContentString:[NSString stringWithFormat:@" %@",otherTag]];
|
||||||
x= [theList count];
|
}
|
||||||
while (x--) {
|
|
||||||
id theKey = [theList objectAtIndex:x];
|
|
||||||
id theValue = [[associations objectForKey:theKey] valueInComponent:component];
|
assocEnumer = [associations keyEnumerator];
|
||||||
if ([theKey isEqualToString:@"elementName"]) continue;
|
while (currentAssocKey = [assocEnumer nextObject]) {
|
||||||
[response_ appendContentString:[NSString stringWithFormat:@" %@=\"%@\"",theKey,theValue]];
|
theValue = [[associations objectForKey:currentAssocKey] valueInComponent:component];
|
||||||
|
if (([currentAssocKey isEqualToString:@"elementName"] == NO) && ([currentAssocKey isEqualToString:@"otherTagString"] == NO)) {
|
||||||
|
[response_ appendContentString:[NSString stringWithFormat:@" %@=\"%@\"",currentAssocKey,theValue]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[response_ appendContentString:@">"];
|
[response_ appendContentString:@">"];
|
||||||
[element appendToResponse:response_ inContext:context_];
|
[element appendToResponse:response_ inContext:context_];
|
||||||
[response_ appendContentString:[NSString stringWithFormat:@"</%@>",tag]];
|
[response_ appendContentString:[NSString stringWithFormat:@"</%@>",tag]];
|
||||||
|
|
Loading…
Reference in a new issue