mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-18 03:29:47 +02:00
Merge pull request #1086 from vmiklos/xml-wshadow-fixes
GH #1050 XML: fix gcc -Wshadow warnings
This commit is contained in:
@@ -348,21 +348,21 @@ Node* AbstractContainerNode::getNodeByPathNS(const XMLString& path, const NSMap&
|
|||||||
XMLString name;
|
XMLString name;
|
||||||
while (it != path.end() && *it != '/' && *it != '@' && *it != '[') name += *it++;
|
while (it != path.end() && *it != '/' && *it != '@' && *it != '[') name += *it++;
|
||||||
if (it != path.end() && *it == '/') ++it;
|
if (it != path.end() && *it == '/') ++it;
|
||||||
XMLString namespaceURI;
|
XMLString namespaceURIString;
|
||||||
XMLString localName;
|
XMLString localNameString;
|
||||||
bool nameOK = true;
|
bool nameOK = true;
|
||||||
if (name.empty())
|
if (name.empty())
|
||||||
{
|
{
|
||||||
namespaceURI += '*';
|
namespaceURIString += '*';
|
||||||
localName += '*';
|
localNameString += '*';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nameOK = nsMap.processName(name, namespaceURI, localName, false);
|
nameOK = nsMap.processName(name, namespaceURIString, localNameString, false);
|
||||||
}
|
}
|
||||||
if (nameOK)
|
if (nameOK)
|
||||||
{
|
{
|
||||||
AutoPtr<ElementsByTagNameListNS> pList = new ElementsByTagNameListNS(this, namespaceURI, localName);
|
AutoPtr<ElementsByTagNameListNS> pList = new ElementsByTagNameListNS(this, namespaceURIString, localNameString);
|
||||||
unsigned long length = pList->length();
|
unsigned long length = pList->length();
|
||||||
for (unsigned long i = 0; i < length; i++)
|
for (unsigned long i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
|
@@ -23,11 +23,11 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
Attr::Attr(Document* pOwnerDocument, Element* pOwnerElement, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const XMLString& value, bool specified):
|
Attr::Attr(Document* pOwnerDocument, Element* pOwnerElement, const XMLString& rNamespaceURI, const XMLString& rLocalName, const XMLString& qname, const XMLString& rValue, bool isSpecified):
|
||||||
AbstractNode(pOwnerDocument),
|
AbstractNode(pOwnerDocument),
|
||||||
_name(pOwnerDocument->namePool().insert(qname, namespaceURI, localName)),
|
_name(pOwnerDocument->namePool().insert(qname, rNamespaceURI, rLocalName)),
|
||||||
_value(value),
|
_value(rValue),
|
||||||
_specified(specified)
|
_specified(isSpecified)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,13 +46,13 @@ Attr::~Attr()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Attr::setValue(const XMLString& value)
|
void Attr::setValue(const XMLString& rValue)
|
||||||
{
|
{
|
||||||
XMLString oldValue = _value;
|
XMLString oldValue = _value;
|
||||||
_value = value;
|
_value = rValue;
|
||||||
_specified = true;
|
_specified = true;
|
||||||
if (_pParent && !_pOwner->eventsSuspended())
|
if (_pParent && !_pOwner->eventsSuspended())
|
||||||
_pParent->dispatchAttrModified(this, MutationEvent::MODIFICATION, oldValue, value);
|
_pParent->dispatchAttrModified(this, MutationEvent::MODIFICATION, oldValue, rValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -90,9 +90,9 @@ const XMLString& Attr::getNodeValue() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Attr::setNodeValue(const XMLString& value)
|
void Attr::setNodeValue(const XMLString& rValue)
|
||||||
{
|
{
|
||||||
setValue(value);
|
setValue(rValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -26,8 +26,8 @@ namespace XML {
|
|||||||
const XMLString CDATASection::NODE_NAME = toXMLString("#cdata-section");
|
const XMLString CDATASection::NODE_NAME = toXMLString("#cdata-section");
|
||||||
|
|
||||||
|
|
||||||
CDATASection::CDATASection(Document* pOwnerDocument, const XMLString& data):
|
CDATASection::CDATASection(Document* pOwnerDocument, const XMLString& rData):
|
||||||
Text(pOwnerDocument, data)
|
Text(pOwnerDocument, rData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,16 +23,16 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& data):
|
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& rData):
|
||||||
AbstractNode(pOwnerDocument),
|
AbstractNode(pOwnerDocument),
|
||||||
_data(data)
|
_data(rData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CharacterData::CharacterData(Document* pOwnerDocument, const CharacterData& data):
|
CharacterData::CharacterData(Document* pOwnerDocument, const CharacterData& rData):
|
||||||
AbstractNode(pOwnerDocument, data),
|
AbstractNode(pOwnerDocument, rData),
|
||||||
_data(data._data)
|
_data(rData._data)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,17 +42,17 @@ CharacterData::~CharacterData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CharacterData::setData(const XMLString& data)
|
void CharacterData::setData(const XMLString& rData)
|
||||||
{
|
{
|
||||||
if (events())
|
if (events())
|
||||||
{
|
{
|
||||||
XMLString oldData = _data;
|
XMLString oldData = _data;
|
||||||
_data = data;
|
_data = rData;
|
||||||
dispatchCharacterDataModified(oldData, _data);
|
dispatchCharacterDataModified(oldData, _data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_data = data;
|
_data = rData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,8 +24,8 @@ namespace XML {
|
|||||||
const XMLString Comment::NODE_NAME = toXMLString("#comment");
|
const XMLString Comment::NODE_NAME = toXMLString("#comment");
|
||||||
|
|
||||||
|
|
||||||
Comment::Comment(Document* pOwnerDocument, const XMLString& data):
|
Comment::Comment(Document* pOwnerDocument, const XMLString& rData):
|
||||||
CharacterData(pOwnerDocument, data)
|
CharacterData(pOwnerDocument, rData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,9 +43,9 @@ const std::string DOMException::MESSAGES[_NUMBER_OF_MESSAGES] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
DOMException::DOMException(unsigned short code):
|
DOMException::DOMException(unsigned short exceptionCode):
|
||||||
XMLException(message(code)),
|
XMLException(message(exceptionCode)),
|
||||||
_code(code)
|
_code(exceptionCode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -204,21 +204,21 @@ Node* Document::importNode(Node* importedNode, bool deep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Element* Document::createElementNS(const XMLString& namespaceURI, const XMLString& qualifiedName) const
|
Element* Document::createElementNS(const XMLString& rNamespaceURI, const XMLString& qualifiedName) const
|
||||||
{
|
{
|
||||||
return new Element(const_cast<Document*>(this), namespaceURI, Name::localName(qualifiedName), qualifiedName);
|
return new Element(const_cast<Document*>(this), rNamespaceURI, Name::localName(qualifiedName), qualifiedName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Attr* Document::createAttributeNS(const XMLString& namespaceURI, const XMLString& qualifiedName) const
|
Attr* Document::createAttributeNS(const XMLString& rNamespaceURI, const XMLString& qualifiedName) const
|
||||||
{
|
{
|
||||||
return new Attr(const_cast<Document*>(this), 0, namespaceURI, Name::localName(qualifiedName), qualifiedName, EMPTY_STRING);
|
return new Attr(const_cast<Document*>(this), 0, rNamespaceURI, Name::localName(qualifiedName), qualifiedName, EMPTY_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NodeList* Document::getElementsByTagNameNS(const XMLString& namespaceURI, const XMLString& localName) const
|
NodeList* Document::getElementsByTagNameNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
return new ElementsByTagNameListNS(const_cast<Document*>(this), namespaceURI, localName);
|
return new ElementsByTagNameListNS(const_cast<Document*>(this), rNamespaceURI, rLocalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -24,11 +24,11 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
DocumentType::DocumentType(Document* pOwner, const XMLString& rName, const XMLString& rPublicId, const XMLString& rSystemId):
|
||||||
AbstractContainerNode(pOwner),
|
AbstractContainerNode(pOwner),
|
||||||
_name(name),
|
_name(rName),
|
||||||
_publicId(publicId),
|
_publicId(rPublicId),
|
||||||
_systemId(systemId)
|
_systemId(rSystemId)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,9 +27,9 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
Element::Element(Document* pOwnerDocument, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname):
|
Element::Element(Document* pOwnerDocument, const XMLString& rNamespaceURI, const XMLString& rLocalName, const XMLString& qname):
|
||||||
AbstractContainerNode(pOwnerDocument),
|
AbstractContainerNode(pOwnerDocument),
|
||||||
_name(pOwnerDocument->namePool().insert(qname, namespaceURI, localName)),
|
_name(pOwnerDocument->namePool().insert(qname, rNamespaceURI, rLocalName)),
|
||||||
_pFirstAttr(0)
|
_pFirstAttr(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -180,9 +180,9 @@ NodeList* Element::getElementsByTagName(const XMLString& name) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NodeList* Element::getElementsByTagNameNS(const XMLString& namespaceURI, const XMLString& localName) const
|
NodeList* Element::getElementsByTagNameNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
return new ElementsByTagNameListNS(this, namespaceURI, localName);
|
return new ElementsByTagNameListNS(this, rNamespaceURI, rLocalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -228,9 +228,9 @@ unsigned short Element::nodeType() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const XMLString& Element::getAttributeNS(const XMLString& namespaceURI, const XMLString& localName) const
|
const XMLString& Element::getAttributeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
Attr* pAttr = getAttributeNodeNS(namespaceURI, localName);
|
Attr* pAttr = getAttributeNodeNS(rNamespaceURI, rLocalName);
|
||||||
if (pAttr)
|
if (pAttr)
|
||||||
return pAttr->getValue();
|
return pAttr->getValue();
|
||||||
else
|
else
|
||||||
@@ -238,16 +238,16 @@ const XMLString& Element::getAttributeNS(const XMLString& namespaceURI, const XM
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Element::setAttributeNS(const XMLString& namespaceURI, const XMLString& qualifiedName, const XMLString& value)
|
void Element::setAttributeNS(const XMLString& rNamespaceURI, const XMLString& qualifiedName, const XMLString& value)
|
||||||
{
|
{
|
||||||
Attr* pAttr = getAttributeNodeNS(namespaceURI, qualifiedName);
|
Attr* pAttr = getAttributeNodeNS(rNamespaceURI, qualifiedName);
|
||||||
if (pAttr)
|
if (pAttr)
|
||||||
{
|
{
|
||||||
pAttr->setValue(value);
|
pAttr->setValue(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pAttr = _pOwner->createAttributeNS(namespaceURI, qualifiedName);
|
pAttr = _pOwner->createAttributeNS(rNamespaceURI, qualifiedName);
|
||||||
pAttr->setValue(value);
|
pAttr->setValue(value);
|
||||||
setAttributeNodeNS(pAttr);
|
setAttributeNodeNS(pAttr);
|
||||||
pAttr->release();
|
pAttr->release();
|
||||||
@@ -255,17 +255,17 @@ void Element::setAttributeNS(const XMLString& namespaceURI, const XMLString& qua
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Element::removeAttributeNS(const XMLString& namespaceURI, const XMLString& localName)
|
void Element::removeAttributeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName)
|
||||||
{
|
{
|
||||||
Attr* pAttr = getAttributeNodeNS(namespaceURI, localName);
|
Attr* pAttr = getAttributeNodeNS(rNamespaceURI, rLocalName);
|
||||||
if (pAttr) removeAttributeNode(pAttr);
|
if (pAttr) removeAttributeNode(pAttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Attr* Element::getAttributeNodeNS(const XMLString& namespaceURI, const XMLString& localName) const
|
Attr* Element::getAttributeNodeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
Attr* pAttr = _pFirstAttr;
|
Attr* pAttr = _pFirstAttr;
|
||||||
while (pAttr && (pAttr->_name.namespaceURI() != namespaceURI || pAttr->_name.localName() != localName)) pAttr = static_cast<Attr*>(pAttr->_pNext);
|
while (pAttr && (pAttr->_name.namespaceURI() != rNamespaceURI || pAttr->_name.localName() != rLocalName)) pAttr = static_cast<Attr*>(pAttr->_pNext);
|
||||||
return pAttr;
|
return pAttr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,9 +304,9 @@ bool Element::hasAttribute(const XMLString& name) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Element::hasAttributeNS(const XMLString& namespaceURI, const XMLString& localName) const
|
bool Element::hasAttributeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
return getAttributeNodeNS(namespaceURI, localName) != 0;
|
return getAttributeNodeNS(rNamespaceURI, rLocalName) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -356,10 +356,10 @@ Element* Element::getChildElement(const XMLString& name) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Element* Element::getChildElementNS(const XMLString& namespaceURI, const XMLString& localName) const
|
Element* Element::getChildElementNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
Node* pNode = firstChild();
|
Node* pNode = firstChild();
|
||||||
while (pNode && !(pNode->nodeType() == Node::ELEMENT_NODE && pNode->namespaceURI() == namespaceURI && pNode->localName() == localName))
|
while (pNode && !(pNode->nodeType() == Node::ELEMENT_NODE && pNode->namespaceURI() == rNamespaceURI && pNode->localName() == rLocalName))
|
||||||
pNode = pNode->nextSibling();
|
pNode = pNode->nextSibling();
|
||||||
return static_cast<Element*>(pNode);
|
return static_cast<Element*>(pNode);
|
||||||
}
|
}
|
||||||
|
@@ -24,12 +24,12 @@ namespace XML {
|
|||||||
const XMLString Entity::NODE_NAME = toXMLString("#entity");
|
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& rPublicId, const XMLString& rSystemId, const XMLString& rNotationName):
|
||||||
AbstractContainerNode(pOwnerDocument),
|
AbstractContainerNode(pOwnerDocument),
|
||||||
_name(name),
|
_name(name),
|
||||||
_publicId(publicId),
|
_publicId(rPublicId),
|
||||||
_systemId(systemId),
|
_systemId(rSystemId),
|
||||||
_notationName(notationName)
|
_notationName(rNotationName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,9 +22,9 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
Event::Event(Document* pOwnerDocument, const XMLString& type):
|
Event::Event(Document* pOwnerDocument, const XMLString& rType):
|
||||||
_pOwner(pOwnerDocument),
|
_pOwner(pOwnerDocument),
|
||||||
_type(type),
|
_type(rType),
|
||||||
_pTarget(0),
|
_pTarget(0),
|
||||||
_pCurrentTarget(0),
|
_pCurrentTarget(0),
|
||||||
_currentPhase(CAPTURING_PHASE),
|
_currentPhase(CAPTURING_PHASE),
|
||||||
@@ -36,9 +36,9 @@ Event::Event(Document* pOwnerDocument, const XMLString& type):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Event::Event(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool isCancelable):
|
Event::Event(Document* pOwnerDocument, const XMLString& rType, EventTarget* pTarget, bool canBubble, bool isCancelable):
|
||||||
_pOwner(pOwnerDocument),
|
_pOwner(pOwnerDocument),
|
||||||
_type(type),
|
_type(rType),
|
||||||
_pTarget(pTarget),
|
_pTarget(pTarget),
|
||||||
_pCurrentTarget(0),
|
_pCurrentTarget(0),
|
||||||
_currentPhase(CAPTURING_PHASE),
|
_currentPhase(CAPTURING_PHASE),
|
||||||
|
@@ -22,7 +22,7 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
EventException::EventException(int code):
|
EventException::EventException(int exceptionCode):
|
||||||
XMLException("Unspecified event type")
|
XMLException("Unspecified event type")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -30,30 +30,30 @@ const XMLString MutationEvent::DOMAttrModified = toXMLString("DOMAtt
|
|||||||
const XMLString MutationEvent::DOMCharacterDataModified = toXMLString("DOMCharacterDataModified");
|
const XMLString MutationEvent::DOMCharacterDataModified = toXMLString("DOMCharacterDataModified");
|
||||||
|
|
||||||
|
|
||||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type):
|
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& rType):
|
||||||
Event(pOwnerDocument, type, 0, true, false),
|
Event(pOwnerDocument, rType, 0, true, false),
|
||||||
_change(MODIFICATION),
|
_change(MODIFICATION),
|
||||||
_pRelatedNode(0)
|
_pRelatedNode(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool cancelable, Node* relatedNode):
|
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& rType, EventTarget* pTarget, bool canBubble, bool isCancelable, Node* pRelatedNode):
|
||||||
Event(pOwnerDocument, type, pTarget, canBubble, cancelable),
|
Event(pOwnerDocument, rType, pTarget, canBubble, isCancelable),
|
||||||
_change(MODIFICATION),
|
_change(MODIFICATION),
|
||||||
_pRelatedNode(relatedNode)
|
_pRelatedNode(pRelatedNode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool cancelable, Node* relatedNode,
|
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& rType, EventTarget* pTarget, bool canBubble, bool isCancelable, Node* pRelatedNode,
|
||||||
const XMLString& prevValue, const XMLString& newValue, const XMLString& attrName, AttrChangeType change):
|
const XMLString& rPrevValue, const XMLString& rNewValue, const XMLString& rAttrName, AttrChangeType change):
|
||||||
Event(pOwnerDocument, type, pTarget, canBubble, cancelable),
|
Event(pOwnerDocument, rType, pTarget, canBubble, isCancelable),
|
||||||
_prevValue(prevValue),
|
_prevValue(rPrevValue),
|
||||||
_newValue(newValue),
|
_newValue(rNewValue),
|
||||||
_attrName(attrName),
|
_attrName(rAttrName),
|
||||||
_change(change),
|
_change(change),
|
||||||
_pRelatedNode(relatedNode)
|
_pRelatedNode(pRelatedNode)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,14 +63,14 @@ MutationEvent::~MutationEvent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MutationEvent::initMutationEvent(const XMLString& type, bool canBubble, bool cancelable, Node* relatedNode,
|
void MutationEvent::initMutationEvent(const XMLString& rType, bool canBubble, bool isCancelable, Node* pRelatedNode,
|
||||||
const XMLString& prevValue, const XMLString& newValue, const XMLString& attrName, AttrChangeType change)
|
const XMLString& rPrevValue, const XMLString& rNewValue, const XMLString& rAttrName, AttrChangeType change)
|
||||||
{
|
{
|
||||||
initEvent(type, canBubble, cancelable);
|
initEvent(rType, canBubble, isCancelable);
|
||||||
_pRelatedNode = relatedNode;
|
_pRelatedNode = pRelatedNode;
|
||||||
_prevValue = prevValue;
|
_prevValue = rPrevValue;
|
||||||
_newValue = newValue;
|
_newValue = rNewValue;
|
||||||
_attrName = attrName;
|
_attrName = rAttrName;
|
||||||
_change = change;
|
_change = change;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -30,24 +30,24 @@ Name::Name()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Name::Name(const XMLString& qname):
|
Name::Name(const XMLString& rQname):
|
||||||
_qname(qname)
|
_qname(rQname)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Name::Name(const XMLString& qname, const XMLString& namespaceURI):
|
Name::Name(const XMLString& rQname, const XMLString& rNamespaceURI):
|
||||||
_qname(qname),
|
_qname(rQname),
|
||||||
_namespaceURI(namespaceURI),
|
_namespaceURI(rNamespaceURI),
|
||||||
_localName(localName(qname))
|
_localName(localName(rQname))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Name::Name(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName):
|
Name::Name(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName):
|
||||||
_qname(qname),
|
_qname(rQname),
|
||||||
_namespaceURI(namespaceURI),
|
_namespaceURI(rNamespaceURI),
|
||||||
_localName(localName)
|
_localName(rLocalName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,27 +85,27 @@ void Name::swap(Name& name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Name::assign(const XMLString& qname)
|
void Name::assign(const XMLString& rQname)
|
||||||
{
|
{
|
||||||
_qname = qname;
|
_qname = rQname;
|
||||||
_namespaceURI.clear();
|
_namespaceURI.clear();
|
||||||
_localName.clear();
|
_localName.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Name::assign(const XMLString& qname, const XMLString& namespaceURI)
|
void Name::assign(const XMLString& rQname, const XMLString& rNamespaceURI)
|
||||||
{
|
{
|
||||||
_qname = qname;
|
_qname = rQname;
|
||||||
_namespaceURI = namespaceURI;
|
_namespaceURI = rNamespaceURI;
|
||||||
_localName = localName(qname);
|
_localName = localName(rQname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Name::assign(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName)
|
void Name::assign(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName)
|
||||||
{
|
{
|
||||||
_qname = qname;
|
_qname = rQname;
|
||||||
_namespaceURI = namespaceURI;
|
_namespaceURI = rNamespaceURI;
|
||||||
_localName = localName;
|
_localName = rLocalName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -115,15 +115,15 @@ bool Name::equals(const Name& name) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Name::equals(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName) const
|
bool Name::equals(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
return _namespaceURI == namespaceURI && _localName == localName && _qname == qname;
|
return _namespaceURI == rNamespaceURI && _localName == rLocalName && _qname == rQname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Name::equalsWeakly(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName) const
|
bool Name::equalsWeakly(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||||
{
|
{
|
||||||
return (_qname == qname && !qname.empty()) || (_namespaceURI == namespaceURI && _localName == localName && !_localName.empty());
|
return (_qname == rQname && !rQname.empty()) || (_namespaceURI == rNamespaceURI && _localName == rLocalName && !_localName.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -133,37 +133,37 @@ XMLString Name::prefix() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Name::split(const XMLString& qname, XMLString& prefix, XMLString& localName)
|
void Name::split(const XMLString& rQname, XMLString& prefix, XMLString& rLocalName)
|
||||||
{
|
{
|
||||||
XMLString::size_type pos = qname.find(':');
|
XMLString::size_type pos = rQname.find(':');
|
||||||
if (pos != XMLString::npos)
|
if (pos != XMLString::npos)
|
||||||
{
|
{
|
||||||
prefix.assign(qname, 0, pos);
|
prefix.assign(rQname, 0, pos);
|
||||||
localName.assign(qname, pos + 1, qname.size() - pos - 1);
|
rLocalName.assign(rQname, pos + 1, rQname.size() - pos - 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prefix.clear();
|
prefix.clear();
|
||||||
localName.assign(qname);
|
rLocalName.assign(rQname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XMLString Name::localName(const XMLString& qname)
|
XMLString Name::localName(const XMLString& rQname)
|
||||||
{
|
{
|
||||||
XMLString::size_type pos = qname.find(':');
|
XMLString::size_type pos = rQname.find(':');
|
||||||
if (pos != XMLString::npos)
|
if (pos != XMLString::npos)
|
||||||
return XMLString(qname, pos + 1, qname.size() - pos - 1);
|
return XMLString(rQname, pos + 1, rQname.size() - pos - 1);
|
||||||
else
|
else
|
||||||
return qname;
|
return rQname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XMLString Name::prefix(const XMLString& qname)
|
XMLString Name::prefix(const XMLString& rQname)
|
||||||
{
|
{
|
||||||
XMLString::size_type pos = qname.find(':');
|
XMLString::size_type pos = rQname.find(':');
|
||||||
if (pos != XMLString::npos)
|
if (pos != XMLString::npos)
|
||||||
return XMLString(qname, 0, pos);
|
return XMLString(rQname, 0, pos);
|
||||||
else
|
else
|
||||||
return EMPTY_NAME;
|
return EMPTY_NAME;
|
||||||
}
|
}
|
||||||
|
@@ -24,9 +24,9 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
NodeIterator::NodeIterator(Node* root, unsigned long whatToShow, NodeFilter* pFilter):
|
NodeIterator::NodeIterator(Node* pRoot, unsigned long whatToShowFlags, NodeFilter* pFilter):
|
||||||
_pRoot(root),
|
_pRoot(pRoot),
|
||||||
_whatToShow(whatToShow),
|
_whatToShow(whatToShowFlags),
|
||||||
_pFilter(pFilter),
|
_pFilter(pFilter),
|
||||||
_pCurrent(0)
|
_pCurrent(0)
|
||||||
{
|
{
|
||||||
@@ -97,37 +97,37 @@ void NodeIterator::detach()
|
|||||||
|
|
||||||
bool NodeIterator::accept(Node* pNode) const
|
bool NodeIterator::accept(Node* pNode) const
|
||||||
{
|
{
|
||||||
bool accept = false;
|
bool ret = false;
|
||||||
switch (pNode->nodeType())
|
switch (pNode->nodeType())
|
||||||
{
|
{
|
||||||
case Node::ELEMENT_NODE:
|
case Node::ELEMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||||
case Node::ATTRIBUTE_NODE:
|
case Node::ATTRIBUTE_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||||
case Node::TEXT_NODE:
|
case Node::TEXT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||||
case Node::CDATA_SECTION_NODE:
|
case Node::CDATA_SECTION_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||||
case Node::ENTITY_REFERENCE_NODE:
|
case Node::ENTITY_REFERENCE_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||||
case Node::ENTITY_NODE:
|
case Node::ENTITY_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||||
case Node::COMMENT_NODE:
|
case Node::COMMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||||
case Node::DOCUMENT_NODE:
|
case Node::DOCUMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||||
case Node::DOCUMENT_TYPE_NODE:
|
case Node::DOCUMENT_TYPE_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||||
case Node::DOCUMENT_FRAGMENT_NODE:
|
case Node::DOCUMENT_FRAGMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||||
case Node::NOTATION_NODE:
|
case Node::NOTATION_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||||
}
|
}
|
||||||
if (accept && _pFilter)
|
if (ret && _pFilter)
|
||||||
accept = _pFilter->acceptNode(pNode) == NodeFilter::FILTER_ACCEPT;
|
ret = _pFilter->acceptNode(pNode) == NodeFilter::FILTER_ACCEPT;
|
||||||
return accept;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -21,11 +21,11 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& rPublicId, const XMLString& rSystemId):
|
||||||
AbstractNode(pOwnerDocument),
|
AbstractNode(pOwnerDocument),
|
||||||
_name(name),
|
_name(name),
|
||||||
_publicId(publicId),
|
_publicId(rPublicId),
|
||||||
_systemId(systemId)
|
_systemId(rSystemId)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,10 +21,10 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& target, const XMLString& data):
|
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& rTarget, const XMLString& rData):
|
||||||
AbstractNode(pOwnerDocument),
|
AbstractNode(pOwnerDocument),
|
||||||
_target(target),
|
_target(rTarget),
|
||||||
_data(data)
|
_data(rData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,9 +42,9 @@ ProcessingInstruction::~ProcessingInstruction()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ProcessingInstruction::setData(const XMLString& data)
|
void ProcessingInstruction::setData(const XMLString& rData)
|
||||||
{
|
{
|
||||||
_data = data;
|
_data = rData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -60,9 +60,9 @@ const XMLString& ProcessingInstruction::getNodeValue() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ProcessingInstruction::setNodeValue(const XMLString& data)
|
void ProcessingInstruction::setNodeValue(const XMLString& rData)
|
||||||
{
|
{
|
||||||
setData(data);
|
setData(rData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -43,10 +43,10 @@ QName::QName(const std::string& ns, const std::string& name) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QName::QName(const std::string& ns, const std::string& name, const std::string& prefix) :
|
QName::QName(const std::string& ns, const std::string& name, const std::string& rPrefix) :
|
||||||
_ns(ns),
|
_ns(ns),
|
||||||
_name(name),
|
_name(name),
|
||||||
_prefix(prefix)
|
_prefix(rPrefix)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,8 +26,8 @@ namespace XML {
|
|||||||
const XMLString Text::NODE_NAME = toXMLString("#text");
|
const XMLString Text::NODE_NAME = toXMLString("#text");
|
||||||
|
|
||||||
|
|
||||||
Text::Text(Document* pOwnerDocument, const XMLString& data):
|
Text::Text(Document* pOwnerDocument, const XMLString& rData):
|
||||||
CharacterData(pOwnerDocument, data)
|
CharacterData(pOwnerDocument, rData)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,11 +23,11 @@ namespace Poco {
|
|||||||
namespace XML {
|
namespace XML {
|
||||||
|
|
||||||
|
|
||||||
TreeWalker::TreeWalker(Node* root, unsigned long whatToShow, NodeFilter* pFilter):
|
TreeWalker::TreeWalker(Node* pRoot, unsigned long whatToShowFlags, NodeFilter* pFilter):
|
||||||
_pRoot(root),
|
_pRoot(pRoot),
|
||||||
_whatToShow(whatToShow),
|
_whatToShow(whatToShowFlags),
|
||||||
_pFilter(pFilter),
|
_pFilter(pFilter),
|
||||||
_pCurrent(root)
|
_pCurrent(pRoot)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,38 +160,38 @@ Node* TreeWalker::nextNode()
|
|||||||
|
|
||||||
int TreeWalker::accept(Node* pNode) const
|
int TreeWalker::accept(Node* pNode) const
|
||||||
{
|
{
|
||||||
bool accept = false;
|
bool ret = false;
|
||||||
switch (pNode->nodeType())
|
switch (pNode->nodeType())
|
||||||
{
|
{
|
||||||
case Node::ELEMENT_NODE:
|
case Node::ELEMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||||
case Node::ATTRIBUTE_NODE:
|
case Node::ATTRIBUTE_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||||
case Node::TEXT_NODE:
|
case Node::TEXT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||||
case Node::CDATA_SECTION_NODE:
|
case Node::CDATA_SECTION_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||||
case Node::ENTITY_REFERENCE_NODE:
|
case Node::ENTITY_REFERENCE_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||||
case Node::ENTITY_NODE:
|
case Node::ENTITY_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||||
case Node::COMMENT_NODE:
|
case Node::COMMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||||
case Node::DOCUMENT_NODE:
|
case Node::DOCUMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||||
case Node::DOCUMENT_TYPE_NODE:
|
case Node::DOCUMENT_TYPE_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||||
case Node::DOCUMENT_FRAGMENT_NODE:
|
case Node::DOCUMENT_FRAGMENT_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||||
case Node::NOTATION_NODE:
|
case Node::NOTATION_NODE:
|
||||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
ret = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||||
}
|
}
|
||||||
if (accept && _pFilter)
|
if (ret && _pFilter)
|
||||||
return _pFilter->acceptNode(pNode);
|
return _pFilter->acceptNode(pNode);
|
||||||
else
|
else
|
||||||
return accept ? NodeFilter::FILTER_ACCEPT : NodeFilter::FILTER_REJECT;
|
return ret ? NodeFilter::FILTER_ACCEPT : NodeFilter::FILTER_REJECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -381,7 +381,7 @@ void XMLStreamParser::popElement()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
XMLStreamParser::EventType XMLStreamParser::nextImpl(bool peek)
|
XMLStreamParser::EventType XMLStreamParser::nextImpl(bool isPeek)
|
||||||
{
|
{
|
||||||
EventType e(nextBody());
|
EventType e(nextBody());
|
||||||
|
|
||||||
@@ -400,7 +400,7 @@ XMLStreamParser::EventType XMLStreamParser::nextImpl(bool peek)
|
|||||||
// This way, the attribute map will still be valid until we
|
// This way, the attribute map will still be valid until we
|
||||||
// call next().
|
// call next().
|
||||||
//
|
//
|
||||||
if (!peek)
|
if (!isPeek)
|
||||||
{
|
{
|
||||||
if (!_elementState.empty() && _elementState.back().depth == _depth)
|
if (!_elementState.empty() && _elementState.back().depth == _depth)
|
||||||
popElement();
|
popElement();
|
||||||
@@ -411,9 +411,9 @@ XMLStreamParser::EventType XMLStreamParser::nextImpl(bool peek)
|
|||||||
}
|
}
|
||||||
case EV_START_ELEMENT:
|
case EV_START_ELEMENT:
|
||||||
{
|
{
|
||||||
if (const ElementEntry* e = getElement())
|
if (const ElementEntry* pEntry = getElement())
|
||||||
{
|
{
|
||||||
switch (e->content)
|
switch (pEntry->content)
|
||||||
{
|
{
|
||||||
case Content::Empty:
|
case Content::Empty:
|
||||||
throw XMLStreamParserException(*this, "element in empty content");
|
throw XMLStreamParserException(*this, "element in empty content");
|
||||||
@@ -426,7 +426,7 @@ XMLStreamParser::EventType XMLStreamParser::nextImpl(bool peek)
|
|||||||
|
|
||||||
// If this is a peek, then delay adjusting the depth.
|
// If this is a peek, then delay adjusting the depth.
|
||||||
//
|
//
|
||||||
if (!peek)
|
if (!isPeek)
|
||||||
_depth++;
|
_depth++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -769,10 +769,10 @@ void XMLCALL XMLStreamParser::handleStartElement(void* v, const XML_Char* name,
|
|||||||
{
|
{
|
||||||
QName qn;
|
QName qn;
|
||||||
splitName(*atts, qn);
|
splitName(*atts, qn);
|
||||||
AttributeMapType::value_type v(qn, AttributeValueType());
|
AttributeMapType::value_type value(qn, AttributeValueType());
|
||||||
v.second.value = *(atts + 1);
|
value.second.value = *(atts + 1);
|
||||||
v.second.handled = false;
|
value.second.handled = false;
|
||||||
pe->attributeMap.insert(v);
|
pe->attributeMap.insert(value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -834,9 +834,9 @@ void XMLWriter::writeIndent() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void XMLWriter::writeIndent(int depth) const
|
void XMLWriter::writeIndent(int indent) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < depth; ++i)
|
for (int i = 0; i < indent; ++i)
|
||||||
writeMarkup(_indent);
|
writeMarkup(_indent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1735,14 +1735,14 @@ XML_GetBuffer(XML_Parser parser, int len)
|
|||||||
bufferLim = newBuf + bufferSize;
|
bufferLim = newBuf + bufferSize;
|
||||||
#ifdef XML_CONTEXT_BYTES
|
#ifdef XML_CONTEXT_BYTES
|
||||||
if (bufferPtr) {
|
if (bufferPtr) {
|
||||||
int keep = (int)(bufferPtr - buffer);
|
int keepSize = (int)(bufferPtr - buffer);
|
||||||
if (keep > XML_CONTEXT_BYTES)
|
if (keepSize > XML_CONTEXT_BYTES)
|
||||||
keep = XML_CONTEXT_BYTES;
|
keepSize = XML_CONTEXT_BYTES;
|
||||||
memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep);
|
memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keepSize);
|
||||||
FREE(buffer);
|
FREE(buffer);
|
||||||
buffer = newBuf;
|
buffer = newBuf;
|
||||||
bufferEnd = buffer + (bufferEnd - bufferPtr) + keep;
|
bufferEnd = buffer + (bufferEnd - bufferPtr) + keepSize;
|
||||||
bufferPtr = buffer + keep;
|
bufferPtr = buffer + keepSize;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bufferEnd = newBuf + (bufferEnd - bufferPtr);
|
bufferEnd = newBuf + (bufferEnd - bufferPtr);
|
||||||
@@ -4434,11 +4434,11 @@ doProlog(XML_Parser parser,
|
|||||||
return XML_ERROR_NO_MEMORY;
|
return XML_ERROR_NO_MEMORY;
|
||||||
groupConnector = temp;
|
groupConnector = temp;
|
||||||
if (dtd->scaffIndex) {
|
if (dtd->scaffIndex) {
|
||||||
int *temp = (int *)REALLOC(dtd->scaffIndex,
|
int *tempIndex = (int *)REALLOC(dtd->scaffIndex,
|
||||||
groupSize * sizeof(int));
|
groupSize * sizeof(int));
|
||||||
if (temp == NULL)
|
if (tempIndex == NULL)
|
||||||
return XML_ERROR_NO_MEMORY;
|
return XML_ERROR_NO_MEMORY;
|
||||||
dtd->scaffIndex = temp;
|
dtd->scaffIndex = tempIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user