mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-05-30 08:41:24 +00:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9335 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8861ca0372
commit
5da85e15ba
2 changed files with 26 additions and 16 deletions
|
@ -93,15 +93,14 @@ static char rcsId[] = "$Id$";
|
|||
for(;elementsN>0;elementsN--)
|
||||
[_elementsMap appendBytes:&ElementsMap_dynamicElement
|
||||
length:1];
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
};
|
||||
//VERIFY Only if _elements ?
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
|
||||
[self _initWithElementsMap:_elementsMap
|
||||
htmlBareStrings:_htmlBareStrings
|
||||
|
@ -147,15 +146,14 @@ static char rcsId[] = "$Id$";
|
|||
for(;elementsN>0;elementsN--)
|
||||
[_elementsMap appendBytes:&ElementsMap_dynamicElement
|
||||
length:1];
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
};
|
||||
//VERIFY Only if _elements ?
|
||||
if (_elementName)
|
||||
{
|
||||
[_htmlBareStrings addObject:[NSString stringWithFormat:@"</%@>",
|
||||
_elementName]];
|
||||
[_elementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
};
|
||||
[self _initWithElementsMap:_elementsMap
|
||||
htmlBareStrings:_htmlBareStrings
|
||||
dynamicChildren:_elements];
|
||||
|
|
|
@ -854,6 +854,18 @@ text [Type:XML_TEXT_NODE] [{}] ####
|
|||
{
|
||||
_associations=[NSDictionary dictionaryWithDictionary:_addedAssoc];
|
||||
};
|
||||
//To know if it's an autoclose tag
|
||||
if (!children && [self isKindOfClass:[GSWTemplateParserXMLHTML class]])
|
||||
{
|
||||
htmlElemDescPtr elemDscr=NULL;
|
||||
elemDscr=htmlTagLookup([nodeName lossyCString]);
|
||||
if (elemDscr
|
||||
&& elemDscr->endTag!=2 //Forbidden End Tag
|
||||
&& elemDscr->endTag!=1) //End can be omitted
|
||||
{
|
||||
children=[NSArray array];
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"node=%p StaticElement: children=%@",currentNode,children);
|
||||
elem=[[[GSWHTMLStaticElement alloc]initWithName:nodeName
|
||||
attributeDictionary:_associations
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue