mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-15 19:33:07 +01:00
revert naming changes
This commit is contained in:
parent
be90443748
commit
88684a182f
@ -348,21 +348,21 @@ Node* AbstractContainerNode::getNodeByPathNS(const XMLString& path, const NSMap&
|
||||
XMLString name;
|
||||
while (it != path.end() && *it != '/' && *it != '@' && *it != '[') name += *it++;
|
||||
if (it != path.end() && *it == '/') ++it;
|
||||
XMLString namespaceURIString;
|
||||
XMLString localNameString;
|
||||
XMLString namespaceURI;
|
||||
XMLString localName;
|
||||
bool nameOK = true;
|
||||
if (name.empty())
|
||||
{
|
||||
namespaceURIString += '*';
|
||||
localNameString += '*';
|
||||
namespaceURI += '*';
|
||||
localName += '*';
|
||||
}
|
||||
else
|
||||
{
|
||||
nameOK = nsMap.processName(name, namespaceURIString, localNameString, false);
|
||||
nameOK = nsMap.processName(name, namespaceURI, localName, false);
|
||||
}
|
||||
if (nameOK)
|
||||
{
|
||||
AutoPtr<ElementsByTagNameListNS> pList = new ElementsByTagNameListNS(this, namespaceURIString, localNameString);
|
||||
AutoPtr<ElementsByTagNameListNS> pList = new ElementsByTagNameListNS(this, namespaceURI, localName);
|
||||
unsigned long length = pList->length();
|
||||
for (unsigned long i = 0; i < length; i++)
|
||||
{
|
||||
|
@ -23,11 +23,11 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Attr::Attr(Document* pOwnerDocument, Element* pOwnerElement, const XMLString& rNamespaceURI, const XMLString& rLocalName, const XMLString& qname, const XMLString& rValue, bool isSpecified):
|
||||
Attr::Attr(Document* pOwnerDocument, Element* pOwnerElement, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const XMLString& value, bool specified):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_name(pOwnerDocument->namePool().insert(qname, rNamespaceURI, rLocalName)),
|
||||
_value(rValue),
|
||||
_specified(isSpecified)
|
||||
_name(pOwnerDocument->namePool().insert(qname, namespaceURI, localName)),
|
||||
_value(value),
|
||||
_specified(specified)
|
||||
{
|
||||
}
|
||||
|
||||
@ -46,13 +46,13 @@ Attr::~Attr()
|
||||
}
|
||||
|
||||
|
||||
void Attr::setValue(const XMLString& rValue)
|
||||
void Attr::setValue(const XMLString& value)
|
||||
{
|
||||
XMLString oldValue = _value;
|
||||
_value = rValue;
|
||||
_value = value;
|
||||
_specified = true;
|
||||
if (_pParent && !_pOwner->eventsSuspended())
|
||||
_pParent->dispatchAttrModified(this, MutationEvent::MODIFICATION, oldValue, rValue);
|
||||
_pParent->dispatchAttrModified(this, MutationEvent::MODIFICATION, oldValue, value);
|
||||
}
|
||||
|
||||
|
||||
@ -90,9 +90,9 @@ const XMLString& Attr::getNodeValue() const
|
||||
}
|
||||
|
||||
|
||||
void Attr::setNodeValue(const XMLString& rValue)
|
||||
void Attr::setNodeValue(const XMLString& value)
|
||||
{
|
||||
setValue(rValue);
|
||||
setValue(value);
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,8 +26,8 @@ namespace XML {
|
||||
const XMLString CDATASection::NODE_NAME = toXMLString("#cdata-section");
|
||||
|
||||
|
||||
CDATASection::CDATASection(Document* pOwnerDocument, const XMLString& rData):
|
||||
Text(pOwnerDocument, rData)
|
||||
CDATASection::CDATASection(Document* pOwnerDocument, const XMLString& data):
|
||||
Text(pOwnerDocument, data)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,16 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& rData):
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& data):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_data(rData)
|
||||
_data(data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const CharacterData& rData):
|
||||
AbstractNode(pOwnerDocument, rData),
|
||||
_data(rData._data)
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const CharacterData& data):
|
||||
AbstractNode(pOwnerDocument, data),
|
||||
_data(data._data)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,17 +42,17 @@ CharacterData::~CharacterData()
|
||||
}
|
||||
|
||||
|
||||
void CharacterData::setData(const XMLString& rData)
|
||||
void CharacterData::setData(const XMLString& data)
|
||||
{
|
||||
if (events())
|
||||
{
|
||||
XMLString oldData = _data;
|
||||
_data = rData;
|
||||
_data = data;
|
||||
dispatchCharacterDataModified(oldData, _data);
|
||||
}
|
||||
else
|
||||
{
|
||||
_data = rData;
|
||||
_data = data;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ namespace XML {
|
||||
const XMLString Comment::NODE_NAME = toXMLString("#comment");
|
||||
|
||||
|
||||
Comment::Comment(Document* pOwnerDocument, const XMLString& rData):
|
||||
CharacterData(pOwnerDocument, rData)
|
||||
Comment::Comment(Document* pOwnerDocument, const XMLString& data):
|
||||
CharacterData(pOwnerDocument, data)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -43,9 +43,9 @@ const std::string DOMException::MESSAGES[_NUMBER_OF_MESSAGES] =
|
||||
};
|
||||
|
||||
|
||||
DOMException::DOMException(unsigned short exceptionCode):
|
||||
XMLException(message(exceptionCode)),
|
||||
_code(exceptionCode)
|
||||
DOMException::DOMException(unsigned short code):
|
||||
XMLException(message(code)),
|
||||
_code(code)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -227,21 +227,21 @@ Node* Document::importNode(Node* importedNode, bool deep)
|
||||
}
|
||||
|
||||
|
||||
Element* Document::createElementNS(const XMLString& rNamespaceURI, const XMLString& qualifiedName) const
|
||||
Element* Document::createElementNS(const XMLString& namespaceURI, const XMLString& qualifiedName) const
|
||||
{
|
||||
return new Element(const_cast<Document*>(this), rNamespaceURI, Name::localName(qualifiedName), qualifiedName);
|
||||
return new Element(const_cast<Document*>(this), namespaceURI, Name::localName(qualifiedName), qualifiedName);
|
||||
}
|
||||
|
||||
|
||||
Attr* Document::createAttributeNS(const XMLString& rNamespaceURI, const XMLString& qualifiedName) const
|
||||
Attr* Document::createAttributeNS(const XMLString& namespaceURI, const XMLString& qualifiedName) const
|
||||
{
|
||||
return new Attr(const_cast<Document*>(this), 0, rNamespaceURI, Name::localName(qualifiedName), qualifiedName, EMPTY_STRING);
|
||||
return new Attr(const_cast<Document*>(this), 0, namespaceURI, Name::localName(qualifiedName), qualifiedName, EMPTY_STRING);
|
||||
}
|
||||
|
||||
|
||||
NodeList* Document::getElementsByTagNameNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
NodeList* Document::getElementsByTagNameNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
return new ElementsByTagNameListNS(const_cast<Document*>(this), rNamespaceURI, rLocalName);
|
||||
return new ElementsByTagNameListNS(const_cast<Document*>(this), namespaceURI, localName);
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,11 +24,11 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DocumentType::DocumentType(Document* pOwner, const XMLString& rName, const XMLString& rPublicId, const XMLString& rSystemId):
|
||||
DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
AbstractContainerNode(pOwner),
|
||||
_name(rName),
|
||||
_publicId(rPublicId),
|
||||
_systemId(rSystemId)
|
||||
_name(name),
|
||||
_publicId(publicId),
|
||||
_systemId(systemId)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -27,9 +27,9 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Element::Element(Document* pOwnerDocument, const XMLString& rNamespaceURI, const XMLString& rLocalName, const XMLString& qname):
|
||||
Element::Element(Document* pOwnerDocument, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname):
|
||||
AbstractContainerNode(pOwnerDocument),
|
||||
_name(pOwnerDocument->namePool().insert(qname, rNamespaceURI, rLocalName)),
|
||||
_name(pOwnerDocument->namePool().insert(qname, namespaceURI, localName)),
|
||||
_pFirstAttr(0)
|
||||
{
|
||||
}
|
||||
@ -180,9 +180,9 @@ NodeList* Element::getElementsByTagName(const XMLString& name) const
|
||||
}
|
||||
|
||||
|
||||
NodeList* Element::getElementsByTagNameNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
NodeList* Element::getElementsByTagNameNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
return new ElementsByTagNameListNS(this, rNamespaceURI, rLocalName);
|
||||
return new ElementsByTagNameListNS(this, namespaceURI, localName);
|
||||
}
|
||||
|
||||
|
||||
@ -228,9 +228,9 @@ unsigned short Element::nodeType() const
|
||||
}
|
||||
|
||||
|
||||
const XMLString& Element::getAttributeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
const XMLString& Element::getAttributeNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
Attr* pAttr = getAttributeNodeNS(rNamespaceURI, rLocalName);
|
||||
Attr* pAttr = getAttributeNodeNS(namespaceURI, localName);
|
||||
if (pAttr)
|
||||
return pAttr->getValue();
|
||||
else
|
||||
@ -238,16 +238,16 @@ const XMLString& Element::getAttributeNS(const XMLString& rNamespaceURI, const X
|
||||
}
|
||||
|
||||
|
||||
void Element::setAttributeNS(const XMLString& rNamespaceURI, const XMLString& qualifiedName, const XMLString& value)
|
||||
void Element::setAttributeNS(const XMLString& namespaceURI, const XMLString& qualifiedName, const XMLString& value)
|
||||
{
|
||||
Attr* pAttr = getAttributeNodeNS(rNamespaceURI, qualifiedName);
|
||||
Attr* pAttr = getAttributeNodeNS(namespaceURI, qualifiedName);
|
||||
if (pAttr)
|
||||
{
|
||||
pAttr->setValue(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
pAttr = _pOwner->createAttributeNS(rNamespaceURI, qualifiedName);
|
||||
pAttr = _pOwner->createAttributeNS(namespaceURI, qualifiedName);
|
||||
pAttr->setValue(value);
|
||||
setAttributeNodeNS(pAttr);
|
||||
pAttr->release();
|
||||
@ -255,17 +255,17 @@ void Element::setAttributeNS(const XMLString& rNamespaceURI, const XMLString& qu
|
||||
}
|
||||
|
||||
|
||||
void Element::removeAttributeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName)
|
||||
void Element::removeAttributeNS(const XMLString& namespaceURI, const XMLString& localName)
|
||||
{
|
||||
Attr* pAttr = getAttributeNodeNS(rNamespaceURI, rLocalName);
|
||||
Attr* pAttr = getAttributeNodeNS(namespaceURI, localName);
|
||||
if (pAttr) removeAttributeNode(pAttr);
|
||||
}
|
||||
|
||||
|
||||
Attr* Element::getAttributeNodeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
Attr* Element::getAttributeNodeNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
Attr* pAttr = _pFirstAttr;
|
||||
while (pAttr && (pAttr->_name.namespaceURI() != rNamespaceURI || pAttr->_name.localName() != rLocalName)) pAttr = static_cast<Attr*>(pAttr->_pNext);
|
||||
while (pAttr && (pAttr->_name.namespaceURI() != namespaceURI || pAttr->_name.localName() != localName)) pAttr = static_cast<Attr*>(pAttr->_pNext);
|
||||
return pAttr;
|
||||
}
|
||||
|
||||
@ -304,9 +304,9 @@ bool Element::hasAttribute(const XMLString& name) const
|
||||
}
|
||||
|
||||
|
||||
bool Element::hasAttributeNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
bool Element::hasAttributeNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
return getAttributeNodeNS(rNamespaceURI, rLocalName) != 0;
|
||||
return getAttributeNodeNS(namespaceURI, localName) != 0;
|
||||
}
|
||||
|
||||
|
||||
@ -356,10 +356,10 @@ Element* Element::getChildElement(const XMLString& name) const
|
||||
}
|
||||
|
||||
|
||||
Element* Element::getChildElementNS(const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
Element* Element::getChildElementNS(const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
Node* pNode = firstChild();
|
||||
while (pNode && !(pNode->nodeType() == Node::ELEMENT_NODE && pNode->namespaceURI() == rNamespaceURI && pNode->localName() == rLocalName))
|
||||
while (pNode && !(pNode->nodeType() == Node::ELEMENT_NODE && pNode->namespaceURI() == namespaceURI && pNode->localName() == localName))
|
||||
pNode = pNode->nextSibling();
|
||||
return static_cast<Element*>(pNode);
|
||||
}
|
||||
|
@ -24,12 +24,12 @@ namespace XML {
|
||||
const XMLString Entity::NODE_NAME = toXMLString("#entity");
|
||||
|
||||
|
||||
Entity::Entity(Document* pOwnerDocument, const XMLString& name, const XMLString& rPublicId, const XMLString& rSystemId, const XMLString& rNotationName):
|
||||
Entity::Entity(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId, const XMLString& notationName):
|
||||
AbstractContainerNode(pOwnerDocument),
|
||||
_name(name),
|
||||
_publicId(rPublicId),
|
||||
_systemId(rSystemId),
|
||||
_notationName(rNotationName)
|
||||
_publicId(publicId),
|
||||
_systemId(systemId),
|
||||
_notationName(notationName)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -22,9 +22,9 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Event::Event(Document* pOwnerDocument, const XMLString& rType):
|
||||
Event::Event(Document* pOwnerDocument, const XMLString& type):
|
||||
_pOwner(pOwnerDocument),
|
||||
_type(rType),
|
||||
_type(type),
|
||||
_pTarget(0),
|
||||
_pCurrentTarget(0),
|
||||
_currentPhase(CAPTURING_PHASE),
|
||||
@ -36,9 +36,9 @@ Event::Event(Document* pOwnerDocument, const XMLString& rType):
|
||||
}
|
||||
|
||||
|
||||
Event::Event(Document* pOwnerDocument, const XMLString& rType, EventTarget* pTarget, bool canBubble, bool isCancelable):
|
||||
Event::Event(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool isCancelable):
|
||||
_pOwner(pOwnerDocument),
|
||||
_type(rType),
|
||||
_type(type),
|
||||
_pTarget(pTarget),
|
||||
_pCurrentTarget(0),
|
||||
_currentPhase(CAPTURING_PHASE),
|
||||
|
@ -22,7 +22,7 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EventException::EventException(int exceptionCode):
|
||||
EventException::EventException(int code):
|
||||
XMLException("Unspecified event type")
|
||||
{
|
||||
}
|
||||
|
@ -30,30 +30,30 @@ const XMLString MutationEvent::DOMAttrModified = toXMLString("DOMAtt
|
||||
const XMLString MutationEvent::DOMCharacterDataModified = toXMLString("DOMCharacterDataModified");
|
||||
|
||||
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& rType):
|
||||
Event(pOwnerDocument, rType, 0, true, false),
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type):
|
||||
Event(pOwnerDocument, type, 0, true, false),
|
||||
_change(MODIFICATION),
|
||||
_pRelatedNode(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& rType, EventTarget* pTarget, bool canBubble, bool isCancelable, Node* pRelatedNode):
|
||||
Event(pOwnerDocument, rType, pTarget, canBubble, isCancelable),
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& type, EventTarget* pTarget, bool canBubble, bool cancelable, Node* relatedNode):
|
||||
Event(pOwnerDocument, type, pTarget, canBubble, cancelable),
|
||||
_change(MODIFICATION),
|
||||
_pRelatedNode(pRelatedNode)
|
||||
_pRelatedNode(relatedNode)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MutationEvent::MutationEvent(Document* pOwnerDocument, const XMLString& rType, EventTarget* pTarget, bool canBubble, bool isCancelable, Node* pRelatedNode,
|
||||
const XMLString& rPrevValue, const XMLString& rNewValue, const XMLString& rAttrName, AttrChangeType change):
|
||||
Event(pOwnerDocument, rType, pTarget, canBubble, isCancelable),
|
||||
_prevValue(rPrevValue),
|
||||
_newValue(rNewValue),
|
||||
_attrName(rAttrName),
|
||||
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),
|
||||
_newValue(newValue),
|
||||
_attrName(attrName),
|
||||
_change(change),
|
||||
_pRelatedNode(pRelatedNode)
|
||||
_pRelatedNode(relatedNode)
|
||||
{
|
||||
}
|
||||
|
||||
@ -63,14 +63,14 @@ MutationEvent::~MutationEvent()
|
||||
}
|
||||
|
||||
|
||||
void MutationEvent::initMutationEvent(const XMLString& rType, bool canBubble, bool isCancelable, Node* pRelatedNode,
|
||||
const XMLString& rPrevValue, const XMLString& rNewValue, const XMLString& rAttrName, AttrChangeType change)
|
||||
void MutationEvent::initMutationEvent(const XMLString& type, bool canBubble, bool cancelable, Node* relatedNode,
|
||||
const XMLString& prevValue, const XMLString& newValue, const XMLString& attrName, AttrChangeType change)
|
||||
{
|
||||
initEvent(rType, canBubble, isCancelable);
|
||||
_pRelatedNode = pRelatedNode;
|
||||
_prevValue = rPrevValue;
|
||||
_newValue = rNewValue;
|
||||
_attrName = rAttrName;
|
||||
initEvent(type, canBubble, cancelable);
|
||||
_pRelatedNode = relatedNode;
|
||||
_prevValue = prevValue;
|
||||
_newValue = newValue;
|
||||
_attrName = attrName;
|
||||
_change = change;
|
||||
}
|
||||
|
||||
|
@ -30,24 +30,24 @@ Name::Name()
|
||||
}
|
||||
|
||||
|
||||
Name::Name(const XMLString& rQname):
|
||||
_qname(rQname)
|
||||
Name::Name(const XMLString& qname):
|
||||
_qname(qname)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Name::Name(const XMLString& rQname, const XMLString& rNamespaceURI):
|
||||
_qname(rQname),
|
||||
_namespaceURI(rNamespaceURI),
|
||||
_localName(localName(rQname))
|
||||
Name::Name(const XMLString& qname, const XMLString& namespaceURI):
|
||||
_qname(qname),
|
||||
_namespaceURI(namespaceURI),
|
||||
_localName(localName(qname))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Name::Name(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName):
|
||||
_qname(rQname),
|
||||
_namespaceURI(rNamespaceURI),
|
||||
_localName(rLocalName)
|
||||
Name::Name(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName):
|
||||
_qname(qname),
|
||||
_namespaceURI(namespaceURI),
|
||||
_localName(localName)
|
||||
{
|
||||
}
|
||||
|
||||
@ -85,27 +85,27 @@ void Name::swap(Name& name)
|
||||
}
|
||||
|
||||
|
||||
void Name::assign(const XMLString& rQname)
|
||||
void Name::assign(const XMLString& qname)
|
||||
{
|
||||
_qname = rQname;
|
||||
_qname = qname;
|
||||
_namespaceURI.clear();
|
||||
_localName.clear();
|
||||
}
|
||||
|
||||
|
||||
void Name::assign(const XMLString& rQname, const XMLString& rNamespaceURI)
|
||||
void Name::assign(const XMLString& qname, const XMLString& namespaceURI)
|
||||
{
|
||||
_qname = rQname;
|
||||
_namespaceURI = rNamespaceURI;
|
||||
_localName = localName(rQname);
|
||||
_qname = qname;
|
||||
_namespaceURI = namespaceURI;
|
||||
_localName = localName(qname);
|
||||
}
|
||||
|
||||
|
||||
void Name::assign(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName)
|
||||
void Name::assign(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName)
|
||||
{
|
||||
_qname = rQname;
|
||||
_namespaceURI = rNamespaceURI;
|
||||
_localName = rLocalName;
|
||||
_qname = qname;
|
||||
_namespaceURI = namespaceURI;
|
||||
_localName = localName;
|
||||
}
|
||||
|
||||
|
||||
@ -115,15 +115,15 @@ bool Name::equals(const Name& name) const
|
||||
}
|
||||
|
||||
|
||||
bool Name::equals(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
bool Name::equals(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
return _namespaceURI == rNamespaceURI && _localName == rLocalName && _qname == rQname;
|
||||
return _namespaceURI == namespaceURI && _localName == localName && _qname == qname;
|
||||
}
|
||||
|
||||
|
||||
bool Name::equalsWeakly(const XMLString& rQname, const XMLString& rNamespaceURI, const XMLString& rLocalName) const
|
||||
bool Name::equalsWeakly(const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName) const
|
||||
{
|
||||
return (_qname == rQname && !rQname.empty()) || (_namespaceURI == rNamespaceURI && _localName == rLocalName && !_localName.empty());
|
||||
return (_qname == qname && !qname.empty()) || (_namespaceURI == namespaceURI && _localName == localName && !_localName.empty());
|
||||
}
|
||||
|
||||
|
||||
@ -133,37 +133,37 @@ XMLString Name::prefix() const
|
||||
}
|
||||
|
||||
|
||||
void Name::split(const XMLString& rQname, XMLString& prefix, XMLString& rLocalName)
|
||||
void Name::split(const XMLString& qname, XMLString& prefix, XMLString& localName)
|
||||
{
|
||||
XMLString::size_type pos = rQname.find(':');
|
||||
XMLString::size_type pos = qname.find(':');
|
||||
if (pos != XMLString::npos)
|
||||
{
|
||||
prefix.assign(rQname, 0, pos);
|
||||
rLocalName.assign(rQname, pos + 1, rQname.size() - pos - 1);
|
||||
prefix.assign(qname, 0, pos);
|
||||
localName.assign(qname, pos + 1, qname.size() - pos - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
prefix.clear();
|
||||
rLocalName.assign(rQname);
|
||||
localName.assign(qname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XMLString Name::localName(const XMLString& rQname)
|
||||
XMLString Name::localName(const XMLString& qname)
|
||||
{
|
||||
XMLString::size_type pos = rQname.find(':');
|
||||
XMLString::size_type pos = qname.find(':');
|
||||
if (pos != XMLString::npos)
|
||||
return XMLString(rQname, pos + 1, rQname.size() - pos - 1);
|
||||
return XMLString(qname, pos + 1, qname.size() - pos - 1);
|
||||
else
|
||||
return rQname;
|
||||
return qname;
|
||||
}
|
||||
|
||||
|
||||
XMLString Name::prefix(const XMLString& rQname)
|
||||
XMLString Name::prefix(const XMLString& qname)
|
||||
{
|
||||
XMLString::size_type pos = rQname.find(':');
|
||||
XMLString::size_type pos = qname.find(':');
|
||||
if (pos != XMLString::npos)
|
||||
return XMLString(rQname, 0, pos);
|
||||
return XMLString(qname, 0, pos);
|
||||
else
|
||||
return EMPTY_NAME;
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
NodeIterator::NodeIterator(Node* pRoot, unsigned long whatToShowFlags, NodeFilter* pFilter):
|
||||
_pRoot(pRoot),
|
||||
_whatToShow(whatToShowFlags),
|
||||
NodeIterator::NodeIterator(Node* root, unsigned long whatToShow, NodeFilter* pFilter):
|
||||
_pRoot(root),
|
||||
_whatToShow(whatToShow),
|
||||
_pFilter(pFilter),
|
||||
_pCurrent(0)
|
||||
{
|
||||
@ -97,37 +97,37 @@ void NodeIterator::detach()
|
||||
|
||||
bool NodeIterator::accept(Node* pNode) const
|
||||
{
|
||||
bool ret = false;
|
||||
bool accept = false;
|
||||
switch (pNode->nodeType())
|
||||
{
|
||||
case Node::ELEMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||
case Node::ATTRIBUTE_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
case Node::TEXT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
case Node::CDATA_SECTION_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
case Node::ENTITY_REFERENCE_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
case Node::ENTITY_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
case Node::COMMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
case Node::DOCUMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
case Node::DOCUMENT_TYPE_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
case Node::DOCUMENT_FRAGMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
case Node::NOTATION_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
}
|
||||
if (ret && _pFilter)
|
||||
ret = _pFilter->acceptNode(pNode) == NodeFilter::FILTER_ACCEPT;
|
||||
return ret;
|
||||
if (accept && _pFilter)
|
||||
accept = _pFilter->acceptNode(pNode) == NodeFilter::FILTER_ACCEPT;
|
||||
return accept;
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,11 +21,11 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& rPublicId, const XMLString& rSystemId):
|
||||
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_name(name),
|
||||
_publicId(rPublicId),
|
||||
_systemId(rSystemId)
|
||||
_publicId(publicId),
|
||||
_systemId(systemId)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -21,10 +21,10 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& rTarget, const XMLString& rData):
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& target, const XMLString& data):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_target(rTarget),
|
||||
_data(rData)
|
||||
_target(target),
|
||||
_data(data)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,9 +42,9 @@ ProcessingInstruction::~ProcessingInstruction()
|
||||
}
|
||||
|
||||
|
||||
void ProcessingInstruction::setData(const XMLString& rData)
|
||||
void ProcessingInstruction::setData(const XMLString& data)
|
||||
{
|
||||
_data = rData;
|
||||
_data = data;
|
||||
}
|
||||
|
||||
|
||||
@ -60,9 +60,9 @@ const XMLString& ProcessingInstruction::getNodeValue() const
|
||||
}
|
||||
|
||||
|
||||
void ProcessingInstruction::setNodeValue(const XMLString& rData)
|
||||
void ProcessingInstruction::setNodeValue(const XMLString& data)
|
||||
{
|
||||
setData(rData);
|
||||
setData(data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,8 +26,8 @@ namespace XML {
|
||||
const XMLString Text::NODE_NAME = toXMLString("#text");
|
||||
|
||||
|
||||
Text::Text(Document* pOwnerDocument, const XMLString& rData):
|
||||
CharacterData(pOwnerDocument, rData)
|
||||
Text::Text(Document* pOwnerDocument, const XMLString& data):
|
||||
CharacterData(pOwnerDocument, data)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -23,11 +23,11 @@ namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
TreeWalker::TreeWalker(Node* pRoot, unsigned long whatToShowFlags, NodeFilter* pFilter):
|
||||
_pRoot(pRoot),
|
||||
_whatToShow(whatToShowFlags),
|
||||
TreeWalker::TreeWalker(Node* root, unsigned long whatToShow, NodeFilter* pFilter):
|
||||
_pRoot(root),
|
||||
_whatToShow(whatToShow),
|
||||
_pFilter(pFilter),
|
||||
_pCurrent(pRoot)
|
||||
_pCurrent(root)
|
||||
{
|
||||
}
|
||||
|
||||
@ -160,38 +160,38 @@ Node* TreeWalker::nextNode()
|
||||
|
||||
int TreeWalker::accept(Node* pNode) const
|
||||
{
|
||||
bool ret = false;
|
||||
bool accept = false;
|
||||
switch (pNode->nodeType())
|
||||
{
|
||||
case Node::ELEMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ELEMENT) != 0; break;
|
||||
case Node::ATTRIBUTE_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ATTRIBUTE) != 0; break;
|
||||
case Node::TEXT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_TEXT) != 0; break;
|
||||
case Node::CDATA_SECTION_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_CDATA_SECTION) != 0; break;
|
||||
case Node::ENTITY_REFERENCE_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY_REFERENCE) != 0; break;
|
||||
case Node::ENTITY_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_ENTITY) != 0; break;
|
||||
case Node::PROCESSING_INSTRUCTION_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_PROCESSING_INSTRUCTION) != 0; break;
|
||||
case Node::COMMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_COMMENT) != 0; break;
|
||||
case Node::DOCUMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT) != 0; break;
|
||||
case Node::DOCUMENT_TYPE_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_TYPE) != 0; break;
|
||||
case Node::DOCUMENT_FRAGMENT_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_DOCUMENT_FRAGMENT) != 0; break;
|
||||
case Node::NOTATION_NODE:
|
||||
ret = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
accept = (_whatToShow & NodeFilter::SHOW_NOTATION) != 0; break;
|
||||
}
|
||||
if (ret && _pFilter)
|
||||
if (accept && _pFilter)
|
||||
return _pFilter->acceptNode(pNode);
|
||||
else
|
||||
return ret ? NodeFilter::FILTER_ACCEPT : NodeFilter::FILTER_REJECT;
|
||||
return accept ? NodeFilter::FILTER_ACCEPT : NodeFilter::FILTER_REJECT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1027,9 +1027,9 @@ void XMLWriter::writeIndent() const
|
||||
}
|
||||
|
||||
|
||||
void XMLWriter::writeIndent(int indent) const
|
||||
void XMLWriter::writeIndent(int depth) const
|
||||
{
|
||||
for (int i = 0; i < indent; ++i)
|
||||
for (int i = 0; i < depth; ++i)
|
||||
writeMarkup(_indent);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user