mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 10:40:50 +00:00
NSXMLNode to here. * Source/NSXMLDocument.m * Source/NSXMLDTD.m * Source/NSXMLDTDNode.m * Source/NSXMLElement.m * Source/NSXMLNode.m: Clean up and add comments about missing code. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34877 72102866-910b-0410-8b05-ffd578937521
122 lines
2.6 KiB
Objective-C
122 lines
2.6 KiB
Objective-C
/* Implementation for NSXMLDTDNode for GNUStep
|
|
Copyright (C) 2008 Free Software Foundation, Inc.
|
|
|
|
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
|
Created: September 2008
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Lesser General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 3 of the License, or (at your option) any later version.
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
License along with this library; if not, write to the Free
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Boston, MA 02111 USA.
|
|
*/
|
|
|
|
#import "common.h"
|
|
|
|
#define GSInternal NSXMLDTDNodeInternal
|
|
#import "NSXMLPrivate.h"
|
|
#import "GSInternal.h"
|
|
GS_PRIVATE_INTERNAL(NSXMLDTDNode)
|
|
|
|
@implementation NSXMLDTDNode
|
|
|
|
- (void) dealloc
|
|
{
|
|
if (GS_EXISTS_INTERNAL)
|
|
{
|
|
}
|
|
[super dealloc];
|
|
}
|
|
|
|
- (NSXMLDTDNodeKind) DTDKind
|
|
{
|
|
return internal->DTDKind;
|
|
}
|
|
|
|
- (void) _createInternal
|
|
{
|
|
GS_CREATE_INTERNAL(NSXMLDTDNode);
|
|
}
|
|
|
|
- (id) initWithKind: (NSXMLNodeKind)kind options: (NSUInteger)theOptions
|
|
{
|
|
if (NSXMLEntityDeclarationKind == kind
|
|
|| NSXMLElementDeclarationKind == kind
|
|
|| NSXMLNotationDeclarationKind == kind)
|
|
{
|
|
return [super initWithKind: kind options: theOptions];
|
|
}
|
|
else
|
|
{
|
|
[self release];
|
|
return [[NSXMLNode alloc] initWithKind: kind
|
|
options: theOptions];
|
|
}
|
|
}
|
|
|
|
- (id) initWithXMLString: (NSString*)string
|
|
{
|
|
// internal->node = xmlNewDtd(NULL,NULL,NULL);
|
|
// TODO: Parse the string and get the info to create this...
|
|
|
|
[self notImplemented: _cmd];
|
|
return nil;
|
|
}
|
|
|
|
- (BOOL) isExternal
|
|
{
|
|
if ([self systemID])
|
|
{
|
|
return YES;
|
|
}
|
|
return NO;
|
|
}
|
|
|
|
- (NSString*) notationName
|
|
{
|
|
return StringFromXMLStringPtr(MY_DTD->name);
|
|
}
|
|
|
|
- (NSString*) publicID
|
|
{
|
|
return StringFromXMLStringPtr(MY_DTD->ExternalID);
|
|
}
|
|
|
|
- (void) setDTDKind: (NSXMLDTDNodeKind)kind
|
|
{
|
|
internal->DTDKind = kind;
|
|
}
|
|
|
|
- (void) setNotationName: (NSString*)notationName
|
|
{
|
|
MY_DTD->name = XMLSTRING(notationName);
|
|
}
|
|
|
|
- (void) setPublicID: (NSString*)publicID
|
|
{
|
|
MY_DTD->ExternalID = XMLSTRING(publicID);
|
|
}
|
|
|
|
- (void) setSystemID: (NSString*)systemID
|
|
{
|
|
MY_DTD->ExternalID = XMLSTRING(systemID);
|
|
}
|
|
|
|
- (NSString*) systemID
|
|
{
|
|
return StringFromXMLStringPtr(MY_DTD->SystemID);
|
|
}
|
|
|
|
@end
|
|
|