#import <Foundation/Foundation.h>
#import "DDXMLElement.h"
#import "DDXMLNode.h"


enum {
	DDXMLDocumentXMLKind = 0,
	DDXMLDocumentXHTMLKind,
	DDXMLDocumentHTMLKind,
	DDXMLDocumentTextKind
};
typedef unsigned int DDXMLDocumentContentKind;

@interface DDXMLDocument : DDXMLNode
{
}

- (id)initWithXMLString:(NSString *)string options:(unsigned int)mask error:(NSError **)error;
//- (id)initWithContentsOfURL:(NSURL *)url options:(unsigned int)mask error:(NSError **)error;
- (id)initWithData:(NSData *)data options:(unsigned int)mask error:(NSError **)error;
//- (id)initWithRootElement:(DDXMLElement *)element;

//+ (Class)replacementClassForClass:(Class)cls;

//- (void)setCharacterEncoding:(NSString *)encoding; //primitive
//- (NSString *)characterEncoding; //primitive

//- (void)setVersion:(NSString *)version;
//- (NSString *)version;

//- (void)setStandalone:(BOOL)standalone;
//- (BOOL)isStandalone;

//- (void)setDocumentContentKind:(DDXMLDocumentContentKind)kind;
//- (DDXMLDocumentContentKind)documentContentKind;

//- (void)setMIMEType:(NSString *)MIMEType;
//- (NSString *)MIMEType;

//- (void)setDTD:(DDXMLDTD *)documentTypeDeclaration;
//- (DDXMLDTD *)DTD;

//- (void)setRootElement:(DDXMLNode *)root;
- (DDXMLElement *)rootElement;

//- (void)insertChild:(DDXMLNode *)child atIndex:(unsigned int)index;

//- (void)insertChildren:(NSArray *)children atIndex:(unsigned int)index;

//- (void)removeChildAtIndex:(unsigned int)index;

//- (void)setChildren:(NSArray *)children;

//- (void)addChild:(DDXMLNode *)child;

//- (void)replaceChildAtIndex:(unsigned int)index withNode:(DDXMLNode *)node;

- (NSData *)XMLData;
- (NSData *)XMLDataWithOptions:(unsigned int)options;

//- (id)objectByApplyingXSLT:(NSData *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error;
//- (id)objectByApplyingXSLTString:(NSString *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error;
//- (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(NSDictionary *)argument error:(NSError **)error;

//- (BOOL)validateAndReturnError:(NSError **)error;

@end
