aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/poco/XML/src/DocumentType.cpp
blob: cc55f595868a0e22ca53c4e89fcc3edf7d04b92d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//
// DocumentType.cpp
//
// Library: XML
// Package: DOM
// Module:  DOM
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier:	BSL-1.0
//


#include "Poco/DOM/DocumentType.h"
#include "Poco/DOM/Document.h"
#include "Poco/DOM/DTDMap.h"
#include "Poco/DOM/DOMException.h"


namespace Poco {
namespace XML {


DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLString& publicId, const XMLString& systemId): 
	AbstractContainerNode(pOwner),
	_name(name),
	_publicId(publicId),
	_systemId(systemId)
{
}


DocumentType::DocumentType(Document* pOwner, const DocumentType& doctype): 
	AbstractContainerNode(pOwner, doctype),
	_name(doctype._name),
	_publicId(doctype._publicId),
	_systemId(doctype._systemId)
{
}


DocumentType::~DocumentType()
{
}


NamedNodeMap* DocumentType::entities() const
{
	return new DTDMap(this, Node::ENTITY_NODE);
}


NamedNodeMap* DocumentType::notations() const
{
	return new DTDMap(this, Node::NOTATION_NODE);
}


const XMLString& DocumentType::nodeName() const
{
	return _name;
}


unsigned short DocumentType::nodeType() const
{
	return Node::DOCUMENT_TYPE_NODE;
}


const XMLString& DocumentType::internalSubset() const
{
	return EMPTY_STRING;
}


Node* DocumentType::copyNode(bool /*deep*/, Document* pOwnerDocument) const
{
	return new DocumentType(pOwnerDocument, *this);
}


} } // namespace Poco::XML