Fix reporting namespace prefixes attributes when using the SAX2 parser.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2015-07-03 15:07:08 +00:00
parent 8d25078d34
commit cb8fe8aebc
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-07-03 Niels Grewe <niels.grewe@halbordnung.de>
* Source/Additions/GSXML.m: Fix reporting namespace prefixes
of attributes when using the SAX2 parser.
2015-06-30 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac:

View file

@ -2878,7 +2878,15 @@ startElementNsFunction(void *ctx, const unsigned char *name,
for (i = j = 0; i < nb_attributes; i++, j += 5)
{
NSString *key = UTF8Str(atts[j]);
NSString *obj = UTF8StrLen(atts[j+3], atts[j+4]-atts[j+3]);
NSString *obj = nil;
// We need to append the namespace prefix
if (atts[j+1] != NULL)
{
key =
[[UTF8Str(atts[j+1]) stringByAppendingString: @":"]
stringByAppendingString: key];
}
obj = UTF8StrLen(atts[j+3], atts[j+4]-atts[j+3]);
[adict setObject: obj forKey: key];
}