mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
Remove trailing whitespace (#3668)
This commit is contained in:
@@ -233,7 +233,7 @@ void AbstractNode::addEventListener(const XMLString& type, EventListener* listen
|
||||
_pEventDispatcher->removeEventListener(type, listener, useCapture);
|
||||
else
|
||||
_pEventDispatcher = new EventDispatcher;
|
||||
|
||||
|
||||
_pEventDispatcher->addEventListener(type, listener, useCapture);
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ void AbstractNode::captureEvent(Event* evt)
|
||||
{
|
||||
if (_pParent)
|
||||
_pParent->captureEvent(evt);
|
||||
|
||||
|
||||
if (_pEventDispatcher && !evt->isStopped())
|
||||
{
|
||||
evt->setCurrentTarget(this);
|
||||
|
||||
@@ -30,7 +30,7 @@ Attr::Attr(Document* pOwnerDocument, Element* pOwnerElement, const XMLString& na
|
||||
}
|
||||
|
||||
|
||||
Attr::Attr(Document* pOwnerDocument, const Attr& attr):
|
||||
Attr::Attr(Document* pOwnerDocument, const Attr& attr):
|
||||
AbstractNode(pOwnerDocument, attr),
|
||||
_name(pOwnerDocument->namePool().insert(attr._name)),
|
||||
_value(attr._value),
|
||||
|
||||
@@ -27,7 +27,7 @@ AttrMap::AttrMap(Element* pElement):
|
||||
_pElement(pElement)
|
||||
{
|
||||
poco_check_ptr (pElement);
|
||||
|
||||
|
||||
_pElement->duplicate();
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ Node* AttrMap::setNamedItem(Node* arg)
|
||||
|
||||
if (arg->nodeType() != Node::ATTRIBUTE_NODE)
|
||||
throw DOMException(DOMException::HIERARCHY_REQUEST_ERR);
|
||||
|
||||
|
||||
return _pElement->setAttributeNode(static_cast<Attr*>(arg));
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ unsigned long AttrMap::length() const
|
||||
{
|
||||
unsigned long result = 0;
|
||||
AbstractNode* pAttr = _pElement->_pFirstAttr;
|
||||
while (pAttr)
|
||||
while (pAttr)
|
||||
{
|
||||
pAttr = static_cast<AbstractNode*>(pAttr->nextSibling());
|
||||
++result;
|
||||
|
||||
@@ -278,7 +278,7 @@ AttributesImpl::Attribute* AttributesImpl::find(const XMLString& qname) const
|
||||
{
|
||||
for (AttributeVec::const_iterator it = _attributes.begin(); it != _attributes.end(); ++it)
|
||||
{
|
||||
if (it->qname == qname)
|
||||
if (it->qname == qname)
|
||||
return const_cast<Attribute*>(&(*it));
|
||||
}
|
||||
return 0;
|
||||
@@ -289,7 +289,7 @@ AttributesImpl::Attribute* AttributesImpl::find(const XMLString& namespaceURI, c
|
||||
{
|
||||
for (AttributeVec::const_iterator it = _attributes.begin(); it != _attributes.end(); ++it)
|
||||
{
|
||||
if (it->namespaceURI == namespaceURI && it->localName == localName)
|
||||
if (it->namespaceURI == namespaceURI && it->localName == localName)
|
||||
return const_cast<Attribute*>(&(*it));
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace XML {
|
||||
const XMLString CDATASection::NODE_NAME = toXMLString("#cdata-section");
|
||||
|
||||
|
||||
CDATASection::CDATASection(Document* pOwnerDocument, const XMLString& data):
|
||||
CDATASection::CDATASection(Document* pOwnerDocument, const XMLString& data):
|
||||
Text(pOwnerDocument, data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CDATASection::CDATASection(Document* pOwnerDocument, const CDATASection& sec):
|
||||
CDATASection::CDATASection(Document* pOwnerDocument, const CDATASection& sec):
|
||||
Text(pOwnerDocument, sec)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& data):
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& data):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_data(data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const CharacterData& data):
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const CharacterData& data):
|
||||
AbstractNode(pOwnerDocument, data),
|
||||
_data(data._data)
|
||||
{
|
||||
|
||||
@@ -22,13 +22,13 @@ namespace XML {
|
||||
const XMLString Comment::NODE_NAME = toXMLString("#comment");
|
||||
|
||||
|
||||
Comment::Comment(Document* pOwnerDocument, const XMLString& data):
|
||||
Comment::Comment(Document* pOwnerDocument, const XMLString& data):
|
||||
CharacterData(pOwnerDocument, data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Comment::Comment(Document* pOwnerDocument, const Comment& comment):
|
||||
Comment::Comment(Document* pOwnerDocument, const Comment& comment):
|
||||
CharacterData(pOwnerDocument, comment)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,19 +47,19 @@ DOMException::DOMException(unsigned short code):
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
DOMException::DOMException(const DOMException& exc):
|
||||
XMLException(exc),
|
||||
_code(exc._code)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
DOMException::~DOMException() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
DOMException& DOMException::operator = (const DOMException& exc)
|
||||
{
|
||||
if (&exc != this)
|
||||
|
||||
@@ -53,7 +53,7 @@ bool DOMImplementation::hasFeature(const XMLString& feature, const XMLString& ve
|
||||
(lcFeature == FEATURE_TRAVERSAL && version == VERSION_2_0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DocumentType* DOMImplementation::createDocumentType(const XMLString& name, const XMLString& publicId, const XMLString& systemId) const
|
||||
{
|
||||
return new DocumentType(0, name, publicId, systemId);
|
||||
|
||||
@@ -23,7 +23,7 @@ DOMObject::DOMObject(): _rc(1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
DOMObject::~DOMObject()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -198,25 +198,25 @@ void DOMSerializer::handleNode(const Node* pNode) const
|
||||
switch (pNode->nodeType())
|
||||
{
|
||||
case Node::ELEMENT_NODE:
|
||||
handleElement(static_cast<const Element*>(pNode));
|
||||
handleElement(static_cast<const Element*>(pNode));
|
||||
break;
|
||||
case Node::TEXT_NODE:
|
||||
handleCharacterData(static_cast<const Text*>(pNode));
|
||||
handleCharacterData(static_cast<const Text*>(pNode));
|
||||
break;
|
||||
case Node::CDATA_SECTION_NODE:
|
||||
handleCDATASection(static_cast<const CDATASection*>(pNode));
|
||||
handleCDATASection(static_cast<const CDATASection*>(pNode));
|
||||
break;
|
||||
case Node::ENTITY_NODE:
|
||||
handleEntity(static_cast<const Entity*>(pNode));
|
||||
break;
|
||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||
handlePI(static_cast<const ProcessingInstruction*>(pNode));
|
||||
handlePI(static_cast<const ProcessingInstruction*>(pNode));
|
||||
break;
|
||||
case Node::COMMENT_NODE:
|
||||
handleComment(static_cast<const Comment*>(pNode));
|
||||
handleComment(static_cast<const Comment*>(pNode));
|
||||
break;
|
||||
case Node::DOCUMENT_NODE:
|
||||
handleDocument(static_cast<const Document*>(pNode));
|
||||
handleDocument(static_cast<const Document*>(pNode));
|
||||
break;
|
||||
case Node::DOCUMENT_TYPE_NODE:
|
||||
handleDocumentType(static_cast<const DocumentType*>(pNode));
|
||||
@@ -233,7 +233,7 @@ void DOMSerializer::handleNode(const Node* pNode) const
|
||||
|
||||
void DOMSerializer::handleElement(const Element* pElement) const
|
||||
{
|
||||
if (_pContentHandler)
|
||||
if (_pContentHandler)
|
||||
{
|
||||
AutoPtr<NamedNodeMap> pAttrs = pElement->attributes();
|
||||
AttributesImpl saxAttrs;
|
||||
|
||||
@@ -77,7 +77,7 @@ void DOMWriter::writeNode(XMLByteOutputStream& ostr, const Node* pNode)
|
||||
XMLWriter writer(ostr, _options, _encodingName, _pTextEncoding);
|
||||
writer.setNewLine(_newLine);
|
||||
writer.setIndent(_indent);
|
||||
|
||||
|
||||
DOMSerializer serializer;
|
||||
serializer.setContentHandler(&writer);
|
||||
serializer.setDTDHandler(&writer);
|
||||
@@ -93,7 +93,7 @@ void DOMWriter::writeNode(const std::string& systemId, const Node* pNode)
|
||||
Poco::FileOutputStream ostr(systemId);
|
||||
if (ostr.good())
|
||||
writeNode(ostr, pNode);
|
||||
else
|
||||
else
|
||||
throw Poco::CreateFileException(systemId);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace XML {
|
||||
const XMLString Document::NODE_NAME = toXMLString("#document");
|
||||
|
||||
|
||||
Document::Document(NamePool* pNamePool):
|
||||
Document::Document(NamePool* pNamePool):
|
||||
AbstractContainerNode(0),
|
||||
_pDocumentType(0),
|
||||
_eventSuspendLevel(0)
|
||||
@@ -55,7 +55,7 @@ Document::Document(NamePool* pNamePool):
|
||||
}
|
||||
|
||||
|
||||
Document::Document(unsigned long namePoolSize):
|
||||
Document::Document(unsigned long namePoolSize):
|
||||
AbstractContainerNode(0),
|
||||
_pDocumentType(0),
|
||||
_pNamePool(new NamePool(namePoolSize)),
|
||||
@@ -64,7 +64,7 @@ Document::Document(unsigned long namePoolSize):
|
||||
}
|
||||
|
||||
|
||||
Document::Document(DocumentType* pDocumentType, NamePool* pNamePool):
|
||||
Document::Document(DocumentType* pDocumentType, NamePool* pNamePool):
|
||||
AbstractContainerNode(0),
|
||||
_pDocumentType(pDocumentType),
|
||||
_eventSuspendLevel(0)
|
||||
@@ -86,7 +86,7 @@ Document::Document(DocumentType* pDocumentType, NamePool* pNamePool):
|
||||
}
|
||||
|
||||
|
||||
Document::Document(DocumentType* pDocumentType, unsigned long namePoolSize):
|
||||
Document::Document(DocumentType* pDocumentType, unsigned long namePoolSize):
|
||||
AbstractContainerNode(0),
|
||||
_pDocumentType(pDocumentType),
|
||||
_pNamePool(new NamePool(namePoolSize)),
|
||||
@@ -155,7 +155,7 @@ Element* Document::documentElement() const
|
||||
|
||||
Element* Document::createElement(const XMLString& tagName) const
|
||||
{
|
||||
return new Element(const_cast<Document*>(this), EMPTY_STRING, EMPTY_STRING, tagName);
|
||||
return new Element(const_cast<Document*>(this), EMPTY_STRING, EMPTY_STRING, tagName);
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ EntityReference* Document::createEntityReference(const XMLString& name) const
|
||||
|
||||
NodeList* Document::getElementsByTagName(const XMLString& name) const
|
||||
{
|
||||
return new ElementsByTagNameList(const_cast<Document*>(this), name);
|
||||
return new ElementsByTagNameList(const_cast<Document*>(this), name);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ Attr* Document::createAttributeNS(const XMLString& namespaceURI, const XMLString
|
||||
|
||||
NodeList* Document::getElementsByTagNameNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
return new ElementsByTagNameListNS(const_cast<Document*>(this), namespaceURI, localName);
|
||||
return new ElementsByTagNameListNS(const_cast<Document*>(this), namespaceURI, localName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ namespace XML {
|
||||
const XMLString DocumentFragment::NODE_NAME = toXMLString("#document-fragment");
|
||||
|
||||
|
||||
DocumentFragment::DocumentFragment(Document* pOwnerDocument):
|
||||
DocumentFragment::DocumentFragment(Document* pOwnerDocument):
|
||||
AbstractContainerNode(pOwnerDocument)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DocumentFragment::DocumentFragment( Document* pOwnerDocument, const DocumentFragment& fragment):
|
||||
DocumentFragment::DocumentFragment( Document* pOwnerDocument, const DocumentFragment& fragment):
|
||||
AbstractContainerNode(pOwnerDocument, fragment)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
AbstractContainerNode(pOwner),
|
||||
_name(name),
|
||||
_publicId(publicId),
|
||||
@@ -31,7 +31,7 @@ DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLStr
|
||||
}
|
||||
|
||||
|
||||
DocumentType::DocumentType(Document* pOwner, const DocumentType& doctype):
|
||||
DocumentType::DocumentType(Document* pOwner, const DocumentType& doctype):
|
||||
AbstractContainerNode(pOwner, doctype),
|
||||
_name(doctype._name),
|
||||
_publicId(doctype._publicId),
|
||||
|
||||
@@ -33,7 +33,7 @@ Element::Element(Document* pOwnerDocument, const XMLString& namespaceURI, const
|
||||
}
|
||||
|
||||
|
||||
Element::Element(Document* pOwnerDocument, const Element& element):
|
||||
Element::Element(Document* pOwnerDocument, const Element& element):
|
||||
AbstractContainerNode(pOwnerDocument, element),
|
||||
_name(pOwnerDocument->namePool().insert(element._name)),
|
||||
_pFirstAttr(0)
|
||||
@@ -129,7 +129,7 @@ Attr* Element::removeAttributeNode(Attr* oldAttr)
|
||||
{
|
||||
poco_check_ptr (oldAttr);
|
||||
|
||||
if (_pOwner->events())
|
||||
if (_pOwner->events())
|
||||
dispatchAttrModified(oldAttr, MutationEvent::REMOVAL, oldAttr->getValue(), EMPTY_STRING);
|
||||
|
||||
if (oldAttr != _pFirstAttr)
|
||||
|
||||
@@ -28,7 +28,7 @@ ElementsByTagNameList::ElementsByTagNameList(const Node* pParent, const XMLStrin
|
||||
_count(0)
|
||||
{
|
||||
poco_check_ptr (pParent);
|
||||
|
||||
|
||||
_pParent->duplicate();
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ ElementsByTagNameListNS::ElementsByTagNameListNS(const Node* pParent, const XMLS
|
||||
_count(0)
|
||||
{
|
||||
poco_check_ptr (pParent);
|
||||
|
||||
|
||||
_pParent->duplicate();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace XML {
|
||||
const XMLString Entity::NODE_NAME = toXMLString("#entity");
|
||||
|
||||
|
||||
Entity::Entity(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId, const XMLString& notationName):
|
||||
Entity::Entity(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId, const XMLString& notationName):
|
||||
AbstractContainerNode(pOwnerDocument),
|
||||
_name(name),
|
||||
_publicId(publicId),
|
||||
@@ -32,7 +32,7 @@ Entity::Entity(Document* pOwnerDocument, const XMLString& name, const XMLString&
|
||||
}
|
||||
|
||||
|
||||
Entity::Entity(Document* pOwnerDocument, const Entity& entity):
|
||||
Entity::Entity(Document* pOwnerDocument, const Entity& entity):
|
||||
AbstractContainerNode(pOwnerDocument, entity),
|
||||
_name(entity._name),
|
||||
_publicId(entity._publicId),
|
||||
|
||||
@@ -19,14 +19,14 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EntityReference::EntityReference(Document* pOwnerDocument, const XMLString& name):
|
||||
EntityReference::EntityReference(Document* pOwnerDocument, const XMLString& name):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
EntityReference::EntityReference(Document* pOwnerDocument, const EntityReference& ref):
|
||||
EntityReference::EntityReference(Document* pOwnerDocument, const EntityReference& ref):
|
||||
AbstractNode(pOwnerDocument, ref),
|
||||
_name(ref._name)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ InputSource* EntityResolverImpl::resolveEntity(const XMLString* publicId, const
|
||||
return pInputSource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void EntityResolverImpl::releaseInputSource(InputSource* pSource)
|
||||
{
|
||||
poco_check_ptr (pSource);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "Poco/DOM/EventListener.h"
|
||||
|
||||
|
||||
namespace
|
||||
namespace
|
||||
{
|
||||
class DispatchGuard
|
||||
{
|
||||
@@ -27,12 +27,12 @@ namespace
|
||||
{
|
||||
++_count;
|
||||
}
|
||||
|
||||
|
||||
~DispatchGuard()
|
||||
{
|
||||
--_count;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
int& _count;
|
||||
};
|
||||
@@ -48,7 +48,7 @@ EventDispatcher::EventDispatcher():
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
EventDispatcher::~EventDispatcher()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ const XMLString MutationEvent::DOMAttrModified = toXMLString("DOMAtt
|
||||
const XMLString MutationEvent::DOMCharacterDataModified = toXMLString("DOMCharacterDataModified");
|
||||
|
||||
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type):
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type):
|
||||
Event(pOwnerDocument, type, 0, true, false),
|
||||
_change(MODIFICATION),
|
||||
_pRelatedNode(0)
|
||||
@@ -44,7 +44,7 @@ MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type, Ev
|
||||
}
|
||||
|
||||
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool cancelable, Node* relatedNode,
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool cancelable, Node* relatedNode,
|
||||
const XMLString& prevValue, const XMLString& newValue, const XMLString& attrName, AttrChangeType change):
|
||||
Event(pOwnerDocument, type, pTarget, canBubble, cancelable),
|
||||
_prevValue(prevValue),
|
||||
@@ -61,7 +61,7 @@ MutationEvent::~MutationEvent()
|
||||
}
|
||||
|
||||
|
||||
void MutationEvent::initMutationEvent(const XMLString& type, bool canBubble, bool cancelable, Node* relatedNode,
|
||||
void MutationEvent::initMutationEvent(const XMLString& type, bool canBubble, bool cancelable, Node* relatedNode,
|
||||
const XMLString& prevValue, const XMLString& newValue, const XMLString& attrName, AttrChangeType change)
|
||||
{
|
||||
initEvent(type, canBubble, cancelable);
|
||||
@@ -72,5 +72,5 @@ void MutationEvent::initMutationEvent(const XMLString& type, bool canBubble, boo
|
||||
_change = change;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} } // namespace Poco::XML
|
||||
|
||||
@@ -65,7 +65,7 @@ Name::Name(Name&& name) noexcept:
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
Name::~Name()
|
||||
{
|
||||
}
|
||||
@@ -168,7 +168,7 @@ void Name::split(const XMLString& qname, XMLString& prefix, XMLString& localName
|
||||
XMLString Name::localName(const XMLString& qname)
|
||||
{
|
||||
XMLString::size_type pos = qname.find(':');
|
||||
if (pos != XMLString::npos)
|
||||
if (pos != XMLString::npos)
|
||||
return XMLString(qname, pos + 1, qname.size() - pos - 1);
|
||||
else
|
||||
return qname;
|
||||
|
||||
@@ -27,11 +27,11 @@ public:
|
||||
NamePoolItem(): _used(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
~NamePoolItem()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool set(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName)
|
||||
{
|
||||
if (!_used)
|
||||
@@ -42,24 +42,24 @@ public:
|
||||
}
|
||||
else return _name.equals(qname, namespaceURI, localName);
|
||||
}
|
||||
|
||||
|
||||
const Name& get() const
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
|
||||
bool used() const
|
||||
{
|
||||
return _used;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
Name _name;
|
||||
bool _used;
|
||||
};
|
||||
|
||||
|
||||
NamePool::NamePool(unsigned long size):
|
||||
NamePool::NamePool(unsigned long size):
|
||||
_size(size),
|
||||
_salt(0),
|
||||
_rc(1)
|
||||
@@ -67,7 +67,7 @@ NamePool::NamePool(unsigned long size):
|
||||
poco_assert (size > 1);
|
||||
|
||||
_pItems = new NamePoolItem[size];
|
||||
|
||||
|
||||
Poco::Random rnd;
|
||||
rnd.seed();
|
||||
_salt = rnd.next();
|
||||
@@ -98,9 +98,9 @@ const Name& NamePool::insert(const XMLString& qname, const XMLString& namespaceU
|
||||
unsigned long i = 0;
|
||||
unsigned long n = (hash(qname, namespaceURI, localName) ^ _salt) % _size;
|
||||
|
||||
while (!_pItems[n].set(qname, namespaceURI, localName) && i++ < _size)
|
||||
while (!_pItems[n].set(qname, namespaceURI, localName) && i++ < _size)
|
||||
n = (n + 1) % _size;
|
||||
|
||||
|
||||
if (i > _size) throw Poco::PoolOverflowException("XML name pool");
|
||||
|
||||
return _pItems[n].get();
|
||||
|
||||
@@ -62,12 +62,12 @@ void NamespaceStrategy::splitName(const XMLChar* qname, XMLString& uri, XMLStrin
|
||||
else
|
||||
prefix.assign(XML_LIT(""));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
uri.assign(XML_LIT(""));
|
||||
localName = qname;
|
||||
prefix.assign(XML_LIT(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ const XMLString& NamespaceSupport::getPrefix(const XMLString& namespaceURI) cons
|
||||
{
|
||||
for (Context::const_iterator it = rit->begin(); it != rit->end(); ++it)
|
||||
{
|
||||
if (it->second == namespaceURI)
|
||||
if (it->second == namespaceURI)
|
||||
return it->first;
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ bool NamespaceSupport::isMapped(const XMLString& namespaceURI) const
|
||||
{
|
||||
for (Context::const_iterator it = rit->begin(); it != rit->end(); ++it)
|
||||
{
|
||||
if (it->second == namespaceURI)
|
||||
if (it->second == namespaceURI)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void NamespaceSupport::getPrefixes(PrefixSet& prefixes) const
|
||||
for (Context::const_iterator it = rit->begin(); it != rit->end(); ++it)
|
||||
{
|
||||
const XMLString& prefix = it->first;
|
||||
if (!prefix.empty() && prefixes.find(prefix) == prefixes.end())
|
||||
if (!prefix.empty() && prefixes.find(prefix) == prefixes.end())
|
||||
prefixes.insert(it->first);
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ void NamespaceSupport::getPrefixes(const XMLString& namespaceURI, PrefixSet& pre
|
||||
for (Context::const_iterator it = rit->begin(); it != rit->end(); ++it)
|
||||
{
|
||||
const XMLString& prefix = it->first;
|
||||
if (it->second == namespaceURI && !prefix.empty() && prefixes.find(prefix) == prefixes.end())
|
||||
if (it->second == namespaceURI && !prefix.empty() && prefixes.find(prefix) == prefixes.end())
|
||||
prefixes.insert(it->first);
|
||||
}
|
||||
}
|
||||
@@ -139,7 +139,7 @@ const XMLString& NamespaceSupport::getURI(const XMLString& prefix) const
|
||||
for (ContextVec::const_reverse_iterator rit = _contexts.rbegin(); rit != _contexts.rend(); ++rit)
|
||||
{
|
||||
Context::const_iterator it = rit->find(prefix);
|
||||
if (it != rit->end())
|
||||
if (it != rit->end())
|
||||
return it->second;
|
||||
}
|
||||
return EMPTY_STRING;
|
||||
|
||||
@@ -43,7 +43,7 @@ void NodeAppender::appendChild(Node* newChild)
|
||||
|
||||
if (static_cast<AbstractNode*>(newChild)->_pOwner != _pParent->_pOwner)
|
||||
throw DOMException(DOMException::WRONG_DOCUMENT_ERR);
|
||||
|
||||
|
||||
if (newChild->nodeType() == Node::DOCUMENT_FRAGMENT_NODE)
|
||||
{
|
||||
AbstractContainerNode* pFrag = static_cast<AbstractContainerNode*>(newChild);
|
||||
@@ -67,7 +67,7 @@ void NodeAppender::appendChild(Node* newChild)
|
||||
{
|
||||
AbstractNode* pAN = static_cast<AbstractNode*>(newChild);
|
||||
pAN->duplicate();
|
||||
if (pAN->_pParent)
|
||||
if (pAN->_pParent)
|
||||
pAN->_pParent->removeChild(pAN);
|
||||
pAN->_pParent = _pParent;
|
||||
if (_pLast)
|
||||
|
||||
@@ -30,7 +30,7 @@ NodeIterator::NodeIterator(Node* root, unsigned long whatToShow, NodeFilter* pFi
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
NodeIterator::NodeIterator(const NodeIterator& iterator):
|
||||
_pRoot(iterator._pRoot),
|
||||
_whatToShow(iterator._whatToShow),
|
||||
@@ -39,7 +39,7 @@ NodeIterator::NodeIterator(const NodeIterator& iterator):
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
NodeIterator& NodeIterator::operator = (const NodeIterator& iterator)
|
||||
{
|
||||
if (&iterator != this)
|
||||
@@ -52,7 +52,7 @@ NodeIterator& NodeIterator::operator = (const NodeIterator& iterator)
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NodeIterator::~NodeIterator()
|
||||
{
|
||||
}
|
||||
@@ -61,7 +61,7 @@ NodeIterator::~NodeIterator()
|
||||
Node* NodeIterator::nextNode()
|
||||
{
|
||||
if (!_pRoot) throw DOMException(DOMException::INVALID_STATE_ERR);
|
||||
|
||||
|
||||
if (_pCurrent)
|
||||
_pCurrent = next();
|
||||
else
|
||||
@@ -98,30 +98,30 @@ bool NodeIterator::accept(Node* pNode) const
|
||||
bool accept = false;
|
||||
switch (pNode->nodeType())
|
||||
{
|
||||
case Node::ELEMENT_NODE:
|
||||
case Node::ELEMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||
case Node::ATTRIBUTE_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
case Node::TEXT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
case Node::CDATA_SECTION_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
case Node::ENTITY_REFERENCE_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
case Node::ENTITY_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
case Node::COMMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
case Node::DOCUMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
case Node::DOCUMENT_TYPE_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
case Node::DOCUMENT_FRAGMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
case Node::NOTATION_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
}
|
||||
if (accept && _pFilter)
|
||||
accept = _pFilter->acceptNode(pNode) == NodeFilter::FILTER_ACCEPT;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_name(name),
|
||||
_publicId(publicId),
|
||||
@@ -28,7 +28,7 @@ Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLStr
|
||||
}
|
||||
|
||||
|
||||
Notation::Notation(Document* pOwnerDocument, const Notation& notation):
|
||||
Notation::Notation(Document* pOwnerDocument, const Notation& notation):
|
||||
AbstractNode(pOwnerDocument, notation),
|
||||
_name(notation._name),
|
||||
_publicId(notation._publicId),
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& target, const XMLString& data):
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& target, const XMLString& data):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_target(target),
|
||||
_data(data)
|
||||
@@ -27,7 +27,7 @@ ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XML
|
||||
}
|
||||
|
||||
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const ProcessingInstruction& processingInstruction):
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const ProcessingInstruction& processingInstruction):
|
||||
AbstractNode(pOwnerDocument, processingInstruction),
|
||||
_target(processingInstruction._target),
|
||||
_data(processingInstruction._data)
|
||||
|
||||
@@ -78,7 +78,7 @@ QName& QName::operator = (QName&& qname) noexcept
|
||||
_ns = std::move(qname._ns);
|
||||
_name = std::move(qname._name);
|
||||
_prefix = std::move(qname._prefix);
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ SAXParseException::SAXParseException(const std::string& msg, const Locator& loc,
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
SAXParseException::SAXParseException(const std::string& msg, const XMLString& publicId, const XMLString& systemId, int lineNumber, int columnNumber):
|
||||
SAXException(buildMessage(msg, publicId, systemId, lineNumber, columnNumber)),
|
||||
_publicId(publicId),
|
||||
@@ -95,7 +95,7 @@ SAXParseException& SAXParseException::operator = (const SAXParseException& exc)
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char* SAXParseException::name() const noexcept
|
||||
{
|
||||
return "SAXParseException";
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace XML {
|
||||
const XMLString Text::NODE_NAME = toXMLString("#text");
|
||||
|
||||
|
||||
Text::Text(Document* pOwnerDocument, const XMLString& data):
|
||||
Text::Text(Document* pOwnerDocument, const XMLString& data):
|
||||
CharacterData(pOwnerDocument, data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Text::Text(Document* pOwnerDocument, const Text& text):
|
||||
Text::Text(Document* pOwnerDocument, const Text& text):
|
||||
CharacterData(pOwnerDocument, text)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ TreeWalker::TreeWalker(Node* root, unsigned long whatToShow, NodeFilter* pFilter
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
TreeWalker::TreeWalker(const TreeWalker& walker):
|
||||
_pRoot(walker._pRoot),
|
||||
_whatToShow(walker._whatToShow),
|
||||
@@ -38,7 +38,7 @@ TreeWalker::TreeWalker(const TreeWalker& walker):
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
TreeWalker& TreeWalker::operator = (const TreeWalker& walker)
|
||||
{
|
||||
if (&walker != this)
|
||||
@@ -51,7 +51,7 @@ TreeWalker& TreeWalker::operator = (const TreeWalker& walker)
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
TreeWalker::~TreeWalker()
|
||||
{
|
||||
}
|
||||
@@ -66,7 +66,7 @@ void TreeWalker::setCurrentNode(Node* pNode)
|
||||
Node* TreeWalker::parentNode()
|
||||
{
|
||||
if (!_pCurrent || _pCurrent == _pRoot) return 0;
|
||||
|
||||
|
||||
Node* pParent = _pCurrent->parentNode();
|
||||
while (pParent && pParent != _pRoot && accept(pParent) != NodeFilter::FILTER_ACCEPT)
|
||||
pParent = pParent->parentNode();
|
||||
@@ -133,7 +133,7 @@ Node* TreeWalker::nextSibling()
|
||||
Node* TreeWalker::previousNode()
|
||||
{
|
||||
if (!_pCurrent) return 0;
|
||||
|
||||
|
||||
Node* pPrev = previous(_pCurrent);
|
||||
while (pPrev && accept(pPrev) != NodeFilter::FILTER_ACCEPT)
|
||||
pPrev = previous(pPrev);
|
||||
@@ -161,30 +161,30 @@ int TreeWalker::accept(Node* pNode) const
|
||||
bool accept = false;
|
||||
switch (pNode->nodeType())
|
||||
{
|
||||
case Node::ELEMENT_NODE:
|
||||
case Node::ELEMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||
case Node::ATTRIBUTE_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
case Node::TEXT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
case Node::CDATA_SECTION_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
case Node::ENTITY_REFERENCE_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
case Node::ENTITY_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
case Node::COMMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
case Node::DOCUMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
case Node::DOCUMENT_TYPE_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
case Node::DOCUMENT_FRAGMENT_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
case Node::NOTATION_NODE:
|
||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
}
|
||||
if (accept && _pFilter)
|
||||
return _pFilter->acceptNode(pNode);
|
||||
|
||||
@@ -26,8 +26,8 @@ WhitespaceFilter::WhitespaceFilter():
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
WhitespaceFilter::WhitespaceFilter(XMLReader* pReader):
|
||||
|
||||
WhitespaceFilter::WhitespaceFilter(XMLReader* pReader):
|
||||
XMLFilterImpl(pReader),
|
||||
_pLexicalHandler(0),
|
||||
_filter(true)
|
||||
@@ -121,7 +121,7 @@ void WhitespaceFilter::characters(const XMLChar ch[], int start, int length)
|
||||
{
|
||||
XMLFilterImpl::characters(_data.data(), 0, (int) _data.length());
|
||||
_filter = false;
|
||||
_data.clear();
|
||||
_data.clear();
|
||||
}
|
||||
}
|
||||
else XMLFilterImpl::characters(ch, start, length);
|
||||
|
||||
@@ -29,7 +29,7 @@ XMLFilterImpl::XMLFilterImpl():
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
XMLFilterImpl::XMLFilterImpl(XMLReader* pParent):
|
||||
_pParent(pParent),
|
||||
_pEntityResolver(0),
|
||||
@@ -39,7 +39,7 @@ XMLFilterImpl::XMLFilterImpl(XMLReader* pParent):
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
XMLFilterImpl::~XMLFilterImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ std::string fromXMLString(const XMLString& str)
|
||||
{
|
||||
std::string result;
|
||||
result.reserve(str.size());
|
||||
|
||||
|
||||
for (auto xc: str)
|
||||
{
|
||||
char c;
|
||||
@@ -46,7 +46,7 @@ XMLString toXMLString(const std::string& str)
|
||||
{
|
||||
XMLString result;
|
||||
result.reserve(str.size());
|
||||
|
||||
|
||||
for (std::string::const_iterator it = str.begin(); it != str.end();)
|
||||
{
|
||||
wchar_t c;
|
||||
|
||||
@@ -193,7 +193,7 @@ void XMLWriter::startDocument()
|
||||
|
||||
if (_options & WRITE_XML_DECLARATION)
|
||||
writeXMLDeclaration();
|
||||
|
||||
|
||||
_contentWritten = true;
|
||||
_namespaces.reset();
|
||||
_namespaces.pushContext();
|
||||
@@ -234,7 +234,7 @@ void XMLWriter::endFragment()
|
||||
{
|
||||
if (_depth > 1)
|
||||
throw XMLException("Not well-formed (at least one tag has no matching end tag)");
|
||||
|
||||
|
||||
_inFragment = false;
|
||||
_elementCount = 0;
|
||||
_depth = -1;
|
||||
@@ -250,14 +250,14 @@ void XMLWriter::startElement(const XMLString& namespaceURI, const XMLString& loc
|
||||
|
||||
void XMLWriter::startElement(const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const Attributes& attributes)
|
||||
{
|
||||
if (_depth == 0 && !_inFragment && _elementCount > 1)
|
||||
if (_depth == 0 && !_inFragment && _elementCount > 1)
|
||||
throw XMLException("Not well-formed. Second root element found", nameToString(localName, qname));
|
||||
|
||||
|
||||
if (_unclosedStartTag) closeStartTag();
|
||||
prettyPrint();
|
||||
if (_options & CANONICAL_XML)
|
||||
writeCanonicalStartElement(namespaceURI, localName, qname, attributes);
|
||||
else
|
||||
else
|
||||
writeStartElement(namespaceURI, localName, qname, attributes);
|
||||
_elementStack.emplace_back(qname, namespaceURI, localName);
|
||||
_contentWritten = false;
|
||||
@@ -595,7 +595,7 @@ void XMLWriter::writeStartElement(const XMLString& namespaceURI, const XMLString
|
||||
_namespaces.pushContext();
|
||||
_nsContextPushed = false;
|
||||
++_elementCount;
|
||||
|
||||
|
||||
declareAttributeNamespaces(attributes);
|
||||
|
||||
writeMarkup(MARKUP_LT);
|
||||
@@ -643,7 +643,7 @@ void XMLWriter::writeCanonicalStartElement(const XMLString& namespaceURI, const
|
||||
_namespaces.pushContext();
|
||||
_nsContextPushed = false;
|
||||
++_elementCount;
|
||||
|
||||
|
||||
declareNamespaces(namespaceURI, localName, qname, attributes);
|
||||
|
||||
writeMarkup(MARKUP_LT);
|
||||
@@ -726,7 +726,7 @@ void XMLWriter::declareNamespaces(const XMLString& namespaceURI, const XMLString
|
||||
XMLString attributeNamespaceURI = attributes.getURI(i);
|
||||
XMLString attributeLocalName = attributes.getLocalName(i);
|
||||
XMLString attributeQName = attributes.getQName(i);
|
||||
|
||||
|
||||
XMLString attributePrefix;
|
||||
XMLString attributeLocal;
|
||||
Name::split(attributeQName, attributePrefix, attributeLocal);
|
||||
@@ -744,7 +744,7 @@ void XMLWriter::declareNamespaces(const XMLString& namespaceURI, const XMLString
|
||||
for (const auto& nsURI: namespaceURIs)
|
||||
{
|
||||
XMLString prefix = p.first;
|
||||
if (prefix.empty())
|
||||
if (prefix.empty())
|
||||
prefix = _namespaces.getPrefix(nsURI);
|
||||
if (prefix.empty() && !_namespaces.isMapped(nsURI))
|
||||
{
|
||||
@@ -761,7 +761,7 @@ void XMLWriter::declareNamespaces(const XMLString& namespaceURI, const XMLString
|
||||
|
||||
}
|
||||
const XMLString& uri = _namespaces.getURI(prefix);
|
||||
if ((uri.empty() || uri != nsURI) && !nsURI.empty())
|
||||
if ((uri.empty() || uri != nsURI) && !nsURI.empty())
|
||||
{
|
||||
_namespaces.declarePrefix(prefix, nsURI);
|
||||
}
|
||||
@@ -807,7 +807,7 @@ void XMLWriter::addNamespaceAttributes(AttributeMap& attributeMap)
|
||||
{
|
||||
XMLString uri = _namespaces.getURI(prefix);
|
||||
XMLString qname = NamespaceSupport::XMLNS_NAMESPACE_PREFIX;
|
||||
|
||||
|
||||
if (!prefix.empty())
|
||||
{
|
||||
qname.append(toXMLString(MARKUP_COLON));
|
||||
@@ -826,7 +826,7 @@ void XMLWriter::addNamespaceAttributes(CanonicalAttributeMap& attributeMap)
|
||||
{
|
||||
XMLString uri = _namespaces.getURI(prefix);
|
||||
XMLString qname = NamespaceSupport::XMLNS_NAMESPACE_PREFIX;
|
||||
|
||||
|
||||
if (!prefix.empty())
|
||||
{
|
||||
qname.append(toXMLString(MARKUP_COLON));
|
||||
@@ -923,7 +923,7 @@ void XMLWriter::writeAttributes(const AttributeMap& attributeMap)
|
||||
default:
|
||||
if (c >= 0 && c < 32)
|
||||
throw XMLException("Invalid character token.");
|
||||
else
|
||||
else
|
||||
writeXML(c);
|
||||
}
|
||||
}
|
||||
@@ -961,7 +961,7 @@ void XMLWriter::writeAttributes(const CanonicalAttributeMap& attributeMap)
|
||||
default:
|
||||
if (c >= 0 && c < 32)
|
||||
throw XMLException("Invalid character token.");
|
||||
else
|
||||
else
|
||||
writeXML(c);
|
||||
}
|
||||
}
|
||||
@@ -1001,8 +1001,8 @@ void XMLWriter::writeName(const XMLString& prefix, const XMLString& localName)
|
||||
}
|
||||
else
|
||||
{
|
||||
writeXML(prefix);
|
||||
writeMarkup(MARKUP_COLON);
|
||||
writeXML(prefix);
|
||||
writeMarkup(MARKUP_COLON);
|
||||
writeXML(localName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
#ifdef EXPAT_WIN32
|
||||
# include "winconfig.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "expat_config.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user