mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Namespace declarations are element attributes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26001 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8753546d14
commit
a6bfd106e1
2 changed files with 37 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/NSXML.m: In SAX count namespace declarations
|
||||
in element start as attributes.
|
||||
|
||||
2008-01-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSHost.m: Fix minor thread safety issue ... could get
|
||||
|
|
|
@ -2813,6 +2813,38 @@ startElementNsFunction(void *ctx, const unsigned char *name,
|
|||
[dict setObject: obj forKey: key];
|
||||
}
|
||||
}
|
||||
if (nb_namespaces > 0)
|
||||
{
|
||||
int i;
|
||||
int pos = 0;
|
||||
|
||||
for (i = 0; i < nb_namespaces; i++)
|
||||
{
|
||||
NSString *key;
|
||||
NSString *obj;
|
||||
|
||||
if (namespaces[pos] == 0)
|
||||
{
|
||||
key = @"xmlns";
|
||||
}
|
||||
else
|
||||
{
|
||||
key = [@"xmlns:" stringByAppendingString:
|
||||
UTF8Str(namespaces[pos])];
|
||||
}
|
||||
pos++;
|
||||
if (namespaces[pos] == 0)
|
||||
{
|
||||
obj = @"";
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = UTF8Str(namespaces[pos]);
|
||||
}
|
||||
pos++;
|
||||
[dict setObject: obj forKey: key];
|
||||
}
|
||||
}
|
||||
[HANDLER startElement: elem
|
||||
prefix: UTF8Str(prefix)
|
||||
href: UTF8Str(href)
|
||||
|
|
Loading…
Reference in a new issue