mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +00:00
Fix stuff omitted in last GSXML update.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13694 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
55faec037d
commit
1844d00b33
3 changed files with 25 additions and 20 deletions
|
@ -54,13 +54,13 @@
|
||||||
#include <Foundation/NSFileManager.h>
|
#include <Foundation/NSFileManager.h>
|
||||||
|
|
||||||
/* libxml headers */
|
/* libxml headers */
|
||||||
#include <tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <entities.h>
|
#include <libxml/entities.h>
|
||||||
#include <parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <parserInternals.h>
|
#include <libxml/parserInternals.h>
|
||||||
#include <SAX.h>
|
#include <libxml/SAX.h>
|
||||||
#include <HTMLparser.h>
|
#include <libxml/HTMLparser.h>
|
||||||
#include <xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
|
|
||||||
extern int xmlDoValidityCheckingDefaultValue;
|
extern int xmlDoValidityCheckingDefaultValue;
|
||||||
extern int xmlGetWarningsDefaultValue;
|
extern int xmlGetWarningsDefaultValue;
|
||||||
|
@ -186,7 +186,7 @@ static NSMapTable *attrNames = 0;
|
||||||
|
|
||||||
+ (NSString*) descriptionFromType: (int)type
|
+ (NSString*) descriptionFromType: (int)type
|
||||||
{
|
{
|
||||||
NSString *desc = (NSString*)NSMapGet(attrNames, (void*)[self type]);
|
NSString *desc = (NSString*)NSMapGet(attrNames, (void*)type);
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
@ -269,13 +269,18 @@ static NSMapTable *attrNames = 0;
|
||||||
+ (GSXMLDocument*) documentWithVersion: (NSString*)version
|
+ (GSXMLDocument*) documentWithVersion: (NSString*)version
|
||||||
{
|
{
|
||||||
void *data = xmlNewDoc([version UTF8String]);
|
void *data = xmlNewDoc([version UTF8String]);
|
||||||
|
GSXMLDocument *document = nil;
|
||||||
|
|
||||||
if (data == 0)
|
if (data == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Can't create GSXMLDocument object");
|
NSLog(@"Can't create GSXMLDocument object");
|
||||||
DESTROY(self);
|
|
||||||
}
|
}
|
||||||
return [self _initFrom: data parent: nil ownsLib: YES];
|
else
|
||||||
|
{
|
||||||
|
document = [GSXMLDocument alloc];
|
||||||
|
document = [document _initFrom: data parent: nil ownsLib: YES];
|
||||||
|
}
|
||||||
|
return AUTORELEASE(document);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
|
@ -475,7 +480,7 @@ static NSMapTable *nsNames = 0;
|
||||||
*/
|
*/
|
||||||
+ (NSString*) descriptionFromType: (int)type
|
+ (NSString*) descriptionFromType: (int)type
|
||||||
{
|
{
|
||||||
NSString *desc = (NSString*)NSMapGet(nsNames, (void*)[self type]);
|
NSString *desc = (NSString*)NSMapGet(nsNames, (void*)type);
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
@ -652,7 +657,7 @@ static NSMapTable *nodeNames = 0;
|
||||||
*/
|
*/
|
||||||
+ (NSString*) descriptionFromType: (int)type
|
+ (NSString*) descriptionFromType: (int)type
|
||||||
{
|
{
|
||||||
NSString *desc = (NSString*)NSMapGet(nodeNames, (void*)[self type]);
|
NSString *desc = (NSString*)NSMapGet(nodeNames, (void*)type);
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,7 +444,7 @@ static NSMutableSet *textNodes = nil;
|
||||||
if ([node type] == XML_ELEMENT_NODE)
|
if ([node type] == XML_ELEMENT_NODE)
|
||||||
{
|
{
|
||||||
NSString *name = [node name];
|
NSString *name = [node name];
|
||||||
NSDictionary *prop = [node propertiesAsDictionary];
|
NSDictionary *prop = [node attributes];
|
||||||
|
|
||||||
if ([name isEqual: @"back"] == YES)
|
if ([name isEqual: @"back"] == YES)
|
||||||
{
|
{
|
||||||
|
@ -826,7 +826,7 @@ static NSMutableSet *textNodes = nil;
|
||||||
str = [str stringByAppendingString: @", "];
|
str = [str stringByAppendingString: @", "];
|
||||||
}
|
}
|
||||||
|
|
||||||
s = [[tmp propertiesAsDictionary] objectForKey: @"type"];
|
s = [[tmp attributes] objectForKey: @"type"];
|
||||||
s = [self typeRef: s];
|
s = [self typeRef: s];
|
||||||
str = [str stringByAppendingString: s];
|
str = [str stringByAppendingString: s];
|
||||||
|
|
||||||
|
@ -1004,16 +1004,16 @@ static NSMutableSet *textNodes = nil;
|
||||||
if (url == nil)
|
if (url == nil)
|
||||||
{
|
{
|
||||||
[buf appendString: @"<dt>"];
|
[buf appendString: @"<dt>"];
|
||||||
[buf appendString: [[author propertiesAsDictionary]
|
[buf appendString: [[author attributes]
|
||||||
objectForKey: @"name"]];
|
objectForKey: @"name"]];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[buf appendString: @"<dt><a href=\""];
|
[buf appendString: @"<dt><a href=\""];
|
||||||
[buf appendString: [[url propertiesAsDictionary]
|
[buf appendString: [[url attributes]
|
||||||
objectForKey: @"url"]];
|
objectForKey: @"url"]];
|
||||||
[buf appendString: @"\">"];
|
[buf appendString: @"\">"];
|
||||||
[buf appendString: [[author propertiesAsDictionary]
|
[buf appendString: [[author attributes]
|
||||||
objectForKey: @"name"]];
|
objectForKey: @"name"]];
|
||||||
[buf appendString: @"</a>"];
|
[buf appendString: @"</a>"];
|
||||||
}
|
}
|
||||||
|
@ -1223,7 +1223,7 @@ static NSMutableSet *textNodes = nil;
|
||||||
GSXMLNode *t = [tmp firstChild];
|
GSXMLNode *t = [tmp firstChild];
|
||||||
NSString *s;
|
NSString *s;
|
||||||
|
|
||||||
s = [[tmp propertiesAsDictionary] objectForKey: @"type"];
|
s = [[tmp attributes] objectForKey: @"type"];
|
||||||
s = [self typeRef: s];
|
s = [self typeRef: s];
|
||||||
str = [str stringByAppendingFormat: @" (%@)", s];
|
str = [str stringByAppendingFormat: @" (%@)", s];
|
||||||
while (t != nil)
|
while (t != nil)
|
||||||
|
|
|
@ -224,7 +224,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
|
||||||
if ([node type] == XML_ELEMENT_NODE)
|
if ([node type] == XML_ELEMENT_NODE)
|
||||||
{
|
{
|
||||||
NSString *name = [node name];
|
NSString *name = [node name];
|
||||||
NSDictionary *prop = [node propertiesAsDictionary];
|
NSDictionary *prop = [node attributes];
|
||||||
|
|
||||||
if ([name isEqual: @"category"] == YES)
|
if ([name isEqual: @"category"] == YES)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue