ObjFW  Diff

Differences From Artifact [d9b9a2bb4c]:

To Artifact [a95f7f973f]:


407
408
409
410
411
412
413










414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433







434
435
436
437
438
439
440
						       selector: _cmd];
	if (ns == nil)
		ns = @"";

	[namespaces setObject: prefix
		       forKey: ns];
}











- (OFString*)defaultNamespace
{
	if (name == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	return [[defaultNamespace retain] autorelease];
}

- (void)setDefaultNamespace: (OFString*)ns
{
	if (name == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	OFString *old = defaultNamespace;
	defaultNamespace = [ns copy];
	[old release];
}








- (void)addChild: (OFXMLElement*)child
{
	if (name == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];








>
>
>
>
>
>
>
>
>
>




















>
>
>
>
>
>
>







407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
						       selector: _cmd];
	if (ns == nil)
		ns = @"";

	[namespaces setObject: prefix
		       forKey: ns];
}

- (void)bindPrefix: (OFString*)prefix
      forNamespace: (OFString*)ns
{
	[self setPrefix: prefix
	   forNamespace: ns];
	[self addAttributeWithName: prefix
			 namespace: @"http://www.w3.org/2000/xmlns/"
		       stringValue: ns];
}

- (OFString*)defaultNamespace
{
	if (name == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	return [[defaultNamespace retain] autorelease];
}

- (void)setDefaultNamespace: (OFString*)ns
{
	if (name == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	OFString *old = defaultNamespace;
	defaultNamespace = [ns copy];
	[old release];
}

- (void)bindDefaultNamespace: (OFString*)ns
{
	[self setDefaultNamespace: ns];
	[self addAttributeWithName: @"xmlns"
		       stringValue: ns];
}

- (void)addChild: (OFXMLElement*)child
{
	if (name == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];