mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Fix xml parse error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33327 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
074a57a018
commit
54a0546f98
4 changed files with 45 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
2011-06-17 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-06-17 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSXMLParser.m: Fix error with whitespace at end of attributes.
|
||||||
* Headers/GNUstepBase/NSURL+GNUstepBase.h: Add method to build a URL
|
* Headers/GNUstepBase/NSURL+GNUstepBase.h: Add method to build a URL
|
||||||
from separate components.
|
from separate components.
|
||||||
* Headers/Foundation/NSURL.h: Add some OSX 10.6 methods for path
|
* Headers/Foundation/NSURL.h: Add some OSX 10.6 methods for path
|
||||||
|
|
|
@ -97,6 +97,18 @@ GS_EXPORT NSString* const NSURLFileScheme;
|
||||||
*/
|
*/
|
||||||
- (id) initFileURLWithPath: (NSString*)aPath;
|
- (id) initFileURLWithPath: (NSString*)aPath;
|
||||||
|
|
||||||
|
#if OS_API_VERSION(100500,GS_API_LATEST)
|
||||||
|
/**
|
||||||
|
* Initialise as a file URL with the specified path (which must
|
||||||
|
* be a valid path on the local filesystem).<br />
|
||||||
|
* Converts relative paths to absolute ones.<br />
|
||||||
|
* Appends a trailing slash to the path when necessary if it
|
||||||
|
* specifies a directory.<br />
|
||||||
|
* Calls -initWithScheme:host:path:
|
||||||
|
*/
|
||||||
|
- (id) initFileURLWithPath: (NSString*)aPath isDirectory: (BOOL)isDir;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise by building a URL string from the supplied parameters
|
* Initialise by building a URL string from the supplied parameters
|
||||||
* and calling -initWithString:relativeToURL:<br />
|
* and calling -initWithString:relativeToURL:<br />
|
||||||
|
|
|
@ -657,6 +657,34 @@ static NSUInteger urlAlign;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) initFileURLWithPath: (NSString*)aPath isDirectory: (BOOL)isDir
|
||||||
|
{
|
||||||
|
NSFileManager *mgr = [NSFileManager defaultManager];
|
||||||
|
BOOL flag = NO;
|
||||||
|
|
||||||
|
if ([aPath isAbsolutePath] == NO)
|
||||||
|
{
|
||||||
|
aPath = [[mgr currentDirectoryPath]
|
||||||
|
stringByAppendingPathComponent: aPath];
|
||||||
|
}
|
||||||
|
if ([mgr fileExistsAtPath: aPath isDirectory: &flag] == YES)
|
||||||
|
{
|
||||||
|
if ([aPath isAbsolutePath] == NO)
|
||||||
|
{
|
||||||
|
aPath = [aPath stringByStandardizingPath];
|
||||||
|
}
|
||||||
|
isDir = flag;
|
||||||
|
}
|
||||||
|
if (isDir == YES && [aPath hasSuffix: @"/"] == NO)
|
||||||
|
{
|
||||||
|
aPath = [aPath stringByAppendingString: @"/"];
|
||||||
|
}
|
||||||
|
self = [self initWithScheme: NSURLFileScheme
|
||||||
|
host: @"localhost"
|
||||||
|
path: aPath];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
- (id) initWithScheme: (NSString*)aScheme
|
- (id) initWithScheme: (NSString*)aScheme
|
||||||
host: (NSString*)aHost
|
host: (NSString*)aHost
|
||||||
path: (NSString*)aPath
|
path: (NSString*)aPath
|
||||||
|
|
|
@ -1903,6 +1903,10 @@ NSLog(@"_processTag <%@%@ %@>", flag?@"/": @"", tag, attributes);
|
||||||
[attributes setObject: val forKey: arg];
|
[attributes setObject: val forKey: arg];
|
||||||
[val release];
|
[val release];
|
||||||
c = cget(); // get character behind qarg value
|
c = cget(); // get character behind qarg value
|
||||||
|
while (isspace(c))
|
||||||
|
{
|
||||||
|
c = cget();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // implicit
|
else // implicit
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue