mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-22 08:02:06 +02:00
submitted 1.2.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// AbstractContainerNode.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/AbstractContainerNode.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/AbstractContainerNode.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/AbstractContainerNode.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/AbstractContainerNode.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
AbstractContainerNode::AbstractContainerNode(Document* pOwnerDocument):
|
||||
@@ -321,4 +322,4 @@ bool AbstractContainerNode::hasAttributes() const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// AbstractNode.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/AbstractNode.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/AbstractNode.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,19 +34,20 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/AbstractNode.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/ChildNodesList.h"
|
||||
#include "DOM/EventDispatcher.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "DOM/EventException.h"
|
||||
#include "DOM/DOMImplementation.h"
|
||||
#include "DOM/Attr.h"
|
||||
#include "XML/Name.h"
|
||||
#include "DOM/AutoPtr.h"
|
||||
#include "Poco/DOM/AbstractNode.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/ChildNodesList.h"
|
||||
#include "Poco/DOM/EventDispatcher.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
#include "Poco/DOM/EventException.h"
|
||||
#include "Poco/DOM/DOMImplementation.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/XML/Name.h"
|
||||
#include "Poco/DOM/AutoPtr.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString AbstractNode::NODE_NAME = toXMLString("#node");
|
||||
@@ -232,14 +233,7 @@ bool AbstractNode::hasAttributes() const
|
||||
|
||||
XMLString AbstractNode::innerText() const
|
||||
{
|
||||
XMLString result = nodeValue();
|
||||
Node* pChild = firstChild();
|
||||
while (pChild)
|
||||
{
|
||||
result.append(pChild->innerText());
|
||||
pChild = pChild->nextSibling();
|
||||
}
|
||||
return result;
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
|
||||
@@ -380,4 +374,4 @@ void AbstractNode::setOwnerDocument(Document* pOwnerDocument)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Attr.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Attr.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Attr.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Attr.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "XML/NamePool.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/XML/NamePool.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Attr::Attr(Document* pOwnerDocument, Element* pOwnerElement, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const XMLString& value, bool specified):
|
||||
@@ -139,10 +140,16 @@ const XMLString& Attr::localName() const
|
||||
}
|
||||
|
||||
|
||||
XMLString Attr::innerText() const
|
||||
{
|
||||
return nodeValue();
|
||||
}
|
||||
|
||||
|
||||
Node* Attr::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
{
|
||||
return new Attr(pOwnerDocument, *this);
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// AttrMap.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/AttrMap.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/AttrMap.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,14 +34,15 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/AttrMap.h"
|
||||
#include "DOM/Attr.h"
|
||||
#include "DOM/Element.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/AttrMap.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/DOM/Element.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
AttrMap::AttrMap(Element* pElement):
|
||||
@@ -140,5 +141,5 @@ void AttrMap::autoRelease()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Attributes.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Attributes.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Attributes.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/Attributes.h"
|
||||
#include "Poco/SAX/Attributes.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Attributes::~Attributes()
|
||||
@@ -45,4 +46,4 @@ Attributes::~Attributes()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// AttributesImpl.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/AttributesImpl.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/AttributesImpl.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/AttributesImpl.h"
|
||||
#include "Poco/SAX/AttributesImpl.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
AttributesImpl::AttributesImpl()
|
||||
@@ -51,6 +52,12 @@ AttributesImpl::AttributesImpl(const Attributes& attributes)
|
||||
}
|
||||
|
||||
|
||||
AttributesImpl::AttributesImpl(const AttributesImpl& attributes)
|
||||
{
|
||||
setAttributes(attributes);
|
||||
}
|
||||
|
||||
|
||||
AttributesImpl::~AttributesImpl()
|
||||
{
|
||||
}
|
||||
@@ -389,4 +396,4 @@ AttributesImpl::Attribute* AttributesImpl::find(const XMLString& namespaceURI, c
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// CDATASection.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/CDATASection.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/CDATASection.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/CDATASection.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/CDATASection.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString CDATASection::NODE_NAME = toXMLString("#cdata-section");
|
||||
@@ -92,4 +93,4 @@ Node* CDATASection::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// CharacterData.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/CharacterData.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/CharacterData.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/CharacterData.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Foundation/String.h"
|
||||
#include "Poco/DOM/CharacterData.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
#include "Poco/String.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
CharacterData::CharacterData(Document* pOwnerDocument, const XMLString& data):
|
||||
@@ -133,8 +134,8 @@ void CharacterData::setNodeValue(const XMLString& value)
|
||||
|
||||
XMLString CharacterData::trimmedData() const
|
||||
{
|
||||
return Foundation::trim(_data);
|
||||
return Poco::trim(_data);
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ChildNodesList.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/ChildNodesList.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/ChildNodesList.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/ChildNodesList.h"
|
||||
#include "DOM/Node.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "Poco/DOM/ChildNodesList.h"
|
||||
#include "Poco/DOM/Node.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ChildNodesList::ChildNodesList(const Node* pParent):
|
||||
@@ -88,4 +89,4 @@ void ChildNodesList::autoRelease()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Comment.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Comment.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Comment.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Comment.h"
|
||||
#include "Poco/DOM/Comment.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString Comment::NODE_NAME = toXMLString("#comment");
|
||||
@@ -78,4 +79,4 @@ Node* Comment::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ContentHandler.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/ContentHandler.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/ContentHandler.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/ContentHandler.h"
|
||||
#include "Poco/SAX/ContentHandler.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ContentHandler::~ContentHandler()
|
||||
@@ -45,4 +46,4 @@ ContentHandler::~ContentHandler()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMBuilder.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMBuilder.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMBuilder.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,25 +34,26 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DOMBuilder.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/CharacterData.h"
|
||||
#include "DOM/Text.h"
|
||||
#include "DOM/Comment.h"
|
||||
#include "DOM/CDATASection.h"
|
||||
#include "DOM/Element.h"
|
||||
#include "DOM/Attr.h"
|
||||
#include "DOM/Entity.h"
|
||||
#include "DOM/EntityReference.h"
|
||||
#include "DOM/Notation.h"
|
||||
#include "DOM/ProcessingInstruction.h"
|
||||
#include "DOM/AutoPtr.h"
|
||||
#include "SAX/XMLReader.h"
|
||||
#include "SAX/AttributesImpl.h"
|
||||
#include "Poco/DOM/DOMBuilder.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/CharacterData.h"
|
||||
#include "Poco/DOM/Text.h"
|
||||
#include "Poco/DOM/Comment.h"
|
||||
#include "Poco/DOM/CDATASection.h"
|
||||
#include "Poco/DOM/Element.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/DOM/Entity.h"
|
||||
#include "Poco/DOM/EntityReference.h"
|
||||
#include "Poco/DOM/Notation.h"
|
||||
#include "Poco/DOM/ProcessingInstruction.h"
|
||||
#include "Poco/DOM/AutoPtr.h"
|
||||
#include "Poco/SAX/XMLReader.h"
|
||||
#include "Poco/SAX/AttributesImpl.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString DOMBuilder::EMPTY_STRING;
|
||||
@@ -310,4 +311,4 @@ void DOMBuilder::comment(const XMLChar ch[], int start, int length)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMException.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMException.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMException.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const std::string DOMException::MESSAGES[_NUMBER_OF_MESSAGES] =
|
||||
@@ -104,12 +105,18 @@ const char* DOMException::className() const throw()
|
||||
}
|
||||
|
||||
|
||||
Foundation::Exception* DOMException::clone() const
|
||||
Poco::Exception* DOMException::clone() const
|
||||
{
|
||||
return new DOMException(*this);
|
||||
}
|
||||
|
||||
|
||||
void DOMException::rethrow() const
|
||||
{
|
||||
throw *this;
|
||||
}
|
||||
|
||||
|
||||
const std::string& DOMException::message(unsigned short code)
|
||||
{
|
||||
if (code >= 1 && code < _NUMBER_OF_MESSAGES)
|
||||
@@ -119,4 +126,4 @@ const std::string& DOMException::message(unsigned short code)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMImplementation.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMImplementation.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMImplementation.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,15 +34,16 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DOMImplementation.h"
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/Element.h"
|
||||
#include "Foundation/String.h"
|
||||
#include "Foundation/SingletonHolder.h"
|
||||
#include "Poco/DOM/DOMImplementation.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/Element.h"
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/SingletonHolder.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString DOMImplementation::FEATURE_XML = toXMLString("xml");
|
||||
@@ -64,7 +65,7 @@ DOMImplementation::~DOMImplementation()
|
||||
|
||||
bool DOMImplementation::hasFeature(const XMLString& feature, const XMLString& version) const
|
||||
{
|
||||
XMLString lcFeature = Foundation::toLower(feature);
|
||||
XMLString lcFeature = Poco::toLower(feature);
|
||||
return lcFeature == FEATURE_XML && version == "1.0" ||
|
||||
lcFeature == FEATURE_CORE && version == "2.0" ||
|
||||
lcFeature == FEATURE_EVENTS && version == "2.0" ||
|
||||
@@ -92,9 +93,9 @@ Document* DOMImplementation::createDocument(const XMLString& namespaceURI, const
|
||||
|
||||
const DOMImplementation& DOMImplementation::instance()
|
||||
{
|
||||
static Foundation::SingletonHolder<DOMImplementation> sh;
|
||||
static Poco::SingletonHolder<DOMImplementation> sh;
|
||||
return *sh.get();
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMObject.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMObject.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMObject.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DOMObject.h"
|
||||
#include "Poco/DOM/DOMObject.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DOMObject::DOMObject(): _rc(1)
|
||||
@@ -50,4 +51,4 @@ DOMObject::~DOMObject()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMParser.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMParser.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMParser.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,15 +34,16 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DOMParser.h"
|
||||
#include "DOM/DOMBuilder.h"
|
||||
#include "SAX/WhitespaceFilter.h"
|
||||
#include "SAX/InputSource.h"
|
||||
#include "XML/NamePool.h"
|
||||
#include "Poco/DOM/DOMParser.h"
|
||||
#include "Poco/DOM/DOMBuilder.h"
|
||||
#include "Poco/SAX/WhitespaceFilter.h"
|
||||
#include "Poco/SAX/InputSource.h"
|
||||
#include "Poco/XML/NamePool.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString DOMParser::FEATURE_WHITESPACE = toXMLString("http://www.appinf.com/features/no-whitespace-in-element-content");
|
||||
@@ -74,7 +75,7 @@ const XMLString& DOMParser::getEncoding() const
|
||||
}
|
||||
|
||||
|
||||
void DOMParser::addEncoding(const XMLString& name, Foundation::TextEncoding* pEncoding)
|
||||
void DOMParser::addEncoding(const XMLString& name, Poco::TextEncoding* pEncoding)
|
||||
{
|
||||
_saxParser.addEncoding(name, pEncoding);
|
||||
}
|
||||
@@ -150,4 +151,4 @@ void DOMParser::setEntityResolver(EntityResolver* pEntityResolver)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMSerializer.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMSerializer.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMSerializer.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,30 +34,31 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DOMSerializer.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/DocumentFragment.h"
|
||||
#include "DOM/Element.h"
|
||||
#include "DOM/Attr.h"
|
||||
#include "DOM/Text.h"
|
||||
#include "DOM/CDATASection.h"
|
||||
#include "DOM/Comment.h"
|
||||
#include "DOM/ProcessingInstruction.h"
|
||||
#include "DOM/Entity.h"
|
||||
#include "DOM/Notation.h"
|
||||
#include "DOM/NamedNodeMap.h"
|
||||
#include "DOM/AutoPtr.h"
|
||||
#include "SAX/EntityResolver.h"
|
||||
#include "SAX/DTDHandler.h"
|
||||
#include "SAX/ContentHandler.h"
|
||||
#include "SAX/LexicalHandler.h"
|
||||
#include "SAX/AttributesImpl.h"
|
||||
#include "SAX/ErrorHandler.h"
|
||||
#include "SAX/SAXException.h"
|
||||
#include "Poco/DOM/DOMSerializer.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/DocumentFragment.h"
|
||||
#include "Poco/DOM/Element.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/DOM/Text.h"
|
||||
#include "Poco/DOM/CDATASection.h"
|
||||
#include "Poco/DOM/Comment.h"
|
||||
#include "Poco/DOM/ProcessingInstruction.h"
|
||||
#include "Poco/DOM/Entity.h"
|
||||
#include "Poco/DOM/Notation.h"
|
||||
#include "Poco/DOM/NamedNodeMap.h"
|
||||
#include "Poco/DOM/AutoPtr.h"
|
||||
#include "Poco/SAX/EntityResolver.h"
|
||||
#include "Poco/SAX/DTDHandler.h"
|
||||
#include "Poco/SAX/ContentHandler.h"
|
||||
#include "Poco/SAX/LexicalHandler.h"
|
||||
#include "Poco/SAX/AttributesImpl.h"
|
||||
#include "Poco/SAX/ErrorHandler.h"
|
||||
#include "Poco/SAX/SAXException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString DOMSerializer::CDATA = toXMLString("CDATA");
|
||||
@@ -335,4 +336,4 @@ void DOMSerializer::handleEntity(const Entity* pEntity) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DOMWriter.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DOMWriter.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DOMWriter.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -35,19 +35,20 @@
|
||||
|
||||
|
||||
|
||||
#include "DOM/DOMWriter.h"
|
||||
#include "XML/XMLWriter.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DocumentFragment.h"
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "DOM/DOMSerializer.h"
|
||||
#include "SAX/LexicalHandler.h"
|
||||
#include "XML/XMLException.h"
|
||||
#include "Poco/DOM/DOMWriter.h"
|
||||
#include "Poco/XML/XMLWriter.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DocumentFragment.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
#include "Poco/DOM/DOMSerializer.h"
|
||||
#include "Poco/SAX/LexicalHandler.h"
|
||||
#include "Poco/XML/XMLException.h"
|
||||
#include <fstream>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DOMWriter::DOMWriter():
|
||||
@@ -62,7 +63,7 @@ DOMWriter::~DOMWriter()
|
||||
}
|
||||
|
||||
|
||||
void DOMWriter::setEncoding(const XMLString& encodingName, Foundation::TextEncoding& textEncoding)
|
||||
void DOMWriter::setEncoding(const XMLString& encodingName, Poco::TextEncoding& textEncoding)
|
||||
{
|
||||
_encodingName = encodingName;
|
||||
_pTextEncoding = &textEncoding;
|
||||
@@ -106,9 +107,9 @@ void DOMWriter::writeNode(const XMLString& systemId, const Node* pNode)
|
||||
if (ostr.good())
|
||||
writeNode(ostr, pNode);
|
||||
else
|
||||
throw Foundation::CreateFileException(systemId);
|
||||
throw Poco::CreateFileException(systemId);
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DTDHandler.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DTDHandler.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DTDHandler.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/DTDHandler.h"
|
||||
#include "Poco/SAX/DTDHandler.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DTDHandler::~DTDHandler()
|
||||
@@ -45,4 +46,4 @@ DTDHandler::~DTDHandler()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DTDMap.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DTDMap.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DTDMap.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,13 +34,14 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DTDMap.h"
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/DTDMap.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DTDMap::DTDMap(const DocumentType* pDocumentType, unsigned short type):
|
||||
@@ -135,4 +136,4 @@ void DTDMap::autoRelease()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DeclHandler.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DeclHandler.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DeclHandler.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/DeclHandler.h"
|
||||
#include "Poco/SAX/DeclHandler.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DeclHandler::~DeclHandler()
|
||||
@@ -45,4 +46,4 @@ DeclHandler::~DeclHandler()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DefaultHandler.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DefaultHandler.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DefaultHandler.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/DefaultHandler.h"
|
||||
#include "Poco/SAX/DefaultHandler.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DefaultHandler::DefaultHandler()
|
||||
@@ -141,4 +142,4 @@ void DefaultHandler::fatalError(const SAXException& exc)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Document.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Document.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Document.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,26 +34,27 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/DOMImplementation.h"
|
||||
#include "DOM/Element.h"
|
||||
#include "DOM/Attr.h"
|
||||
#include "DOM/DocumentFragment.h"
|
||||
#include "DOM/Text.h"
|
||||
#include "DOM/Comment.h"
|
||||
#include "DOM/CDATASection.h"
|
||||
#include "DOM/ProcessingInstruction.h"
|
||||
#include "DOM/EntityReference.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "DOM/ElementsByTagNameList.h"
|
||||
#include "DOM/Entity.h"
|
||||
#include "DOM/Notation.h"
|
||||
#include "XML/Name.h"
|
||||
#include "XML/NamePool.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/DOMImplementation.h"
|
||||
#include "Poco/DOM/Element.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/DOM/DocumentFragment.h"
|
||||
#include "Poco/DOM/Text.h"
|
||||
#include "Poco/DOM/Comment.h"
|
||||
#include "Poco/DOM/CDATASection.h"
|
||||
#include "Poco/DOM/ProcessingInstruction.h"
|
||||
#include "Poco/DOM/EntityReference.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
#include "Poco/DOM/ElementsByTagNameList.h"
|
||||
#include "Poco/DOM/Entity.h"
|
||||
#include "Poco/DOM/Notation.h"
|
||||
#include "Poco/XML/Name.h"
|
||||
#include "Poco/XML/NamePool.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString Document::NODE_NAME = toXMLString("#document");
|
||||
@@ -305,4 +306,4 @@ Notation* Document::createNotation(const XMLString& name, const XMLString& publi
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DocumentEvent.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DocumentEvent.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DocumentEvent.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DocumentEvent.h"
|
||||
#include "Poco/DOM/DocumentEvent.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DocumentEvent::~DocumentEvent()
|
||||
@@ -45,4 +46,4 @@ DocumentEvent::~DocumentEvent()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DocumentFragment.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DocumentFragment.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DocumentFragment.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DocumentFragment.h"
|
||||
#include "Poco/DOM/DocumentFragment.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString DocumentFragment::NODE_NAME = toXMLString("#document-fragment");
|
||||
@@ -88,4 +89,4 @@ Node* DocumentFragment::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// DocumentType.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/DocumentType.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/DocumentType.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,13 +34,14 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/DocumentType.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DTDMap.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/DocumentType.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DTDMap.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
DocumentType::DocumentType(Document* pOwner, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
@@ -102,4 +103,4 @@ Node* DocumentType::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Element.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Element.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Element.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,16 +34,17 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Element.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/Attr.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "DOM/ElementsByTagNameList.h"
|
||||
#include "DOM/Text.h"
|
||||
#include "DOM/AttrMap.h"
|
||||
#include "Poco/DOM/Element.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/Attr.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
#include "Poco/DOM/ElementsByTagNameList.h"
|
||||
#include "Poco/DOM/Text.h"
|
||||
#include "Poco/DOM/AttrMap.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Element::Element(Document* pOwnerDocument, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname):
|
||||
@@ -332,6 +333,19 @@ bool Element::hasAttributes() const
|
||||
}
|
||||
|
||||
|
||||
XMLString Element::innerText() const
|
||||
{
|
||||
XMLString result;
|
||||
Node* pChild = firstChild();
|
||||
while (pChild)
|
||||
{
|
||||
result.append(pChild->innerText());
|
||||
pChild = pChild->nextSibling();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Element* Element::getChildElement(const XMLString& name) const
|
||||
{
|
||||
Node* pNode = firstChild();
|
||||
@@ -390,5 +404,5 @@ Node* Element::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ElementsByTagNameList.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/ElementsByTagNameList.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/ElementsByTagNameList.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/ElementsByTagNameList.h"
|
||||
#include "DOM/Node.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "Poco/DOM/ElementsByTagNameList.h"
|
||||
#include "Poco/DOM/Node.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ElementsByTagNameList::ElementsByTagNameList(const Node* pParent, const XMLString& name):
|
||||
@@ -166,4 +167,4 @@ void ElementsByTagNameListNS::autoRelease()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Entity.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Entity.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Entity.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Entity.h"
|
||||
#include "Poco/DOM/Entity.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString Entity::NODE_NAME = toXMLString("#entity");
|
||||
@@ -86,4 +87,4 @@ Node* Entity::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EntityReference.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EntityReference.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EntityReference.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/EntityReference.h"
|
||||
#include "Poco/DOM/EntityReference.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EntityReference::EntityReference(Document* pOwnerDocument, const XMLString& name):
|
||||
@@ -77,4 +78,4 @@ Node* EntityReference::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EntityResolver.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EntityResolver.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EntityResolver.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/EntityResolver.h"
|
||||
#include "Poco/SAX/EntityResolver.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EntityResolver::~EntityResolver()
|
||||
@@ -45,4 +46,4 @@ EntityResolver::~EntityResolver()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EntityResolverImpl.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EntityResolverImpl.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EntityResolverImpl.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,24 +34,25 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/EntityResolverImpl.h"
|
||||
#include "SAX/InputSource.h"
|
||||
#include "XML/XMLString.h"
|
||||
#include "Foundation/URI.h"
|
||||
#include "Foundation/Path.h"
|
||||
#include "Foundation/Exception.h"
|
||||
#include "Poco/SAX/EntityResolverImpl.h"
|
||||
#include "Poco/SAX/InputSource.h"
|
||||
#include "Poco/XML/XMLString.h"
|
||||
#include "Poco/URI.h"
|
||||
#include "Poco/Path.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <fstream>
|
||||
|
||||
|
||||
using Foundation::URIStreamOpener;
|
||||
using Foundation::URI;
|
||||
using Foundation::Path;
|
||||
using Foundation::Exception;
|
||||
using Foundation::IOException;
|
||||
using Foundation::OpenFileException;
|
||||
using Poco::URIStreamOpener;
|
||||
using Poco::URI;
|
||||
using Poco::Path;
|
||||
using Poco::Exception;
|
||||
using Poco::IOException;
|
||||
using Poco::OpenFileException;
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EntityResolverImpl::EntityResolverImpl():
|
||||
@@ -97,4 +98,4 @@ std::istream* EntityResolverImpl::resolveSystemId(const XMLString& systemId)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ErrorHandler.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/ErrorHandler.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/ErrorHandler.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/ErrorHandler.h"
|
||||
#include "Poco/SAX/ErrorHandler.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ErrorHandler::~ErrorHandler()
|
||||
@@ -45,4 +46,4 @@ ErrorHandler::~ErrorHandler()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Event.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Event.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Event.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Event.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "Poco/DOM/Event.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Event::Event(Document* pOwnerDocument, const XMLString& type):
|
||||
@@ -120,4 +121,4 @@ void Event::autoRelease()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EventDispatcher.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EventDispatcher.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EventDispatcher.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,9 +34,9 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/EventDispatcher.h"
|
||||
#include "DOM/Event.h"
|
||||
#include "DOM/EventListener.h"
|
||||
#include "Poco/DOM/EventDispatcher.h"
|
||||
#include "Poco/DOM/Event.h"
|
||||
#include "Poco/DOM/EventListener.h"
|
||||
|
||||
|
||||
namespace
|
||||
@@ -61,7 +61,8 @@ namespace
|
||||
}
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EventDispatcher::EventDispatcher():
|
||||
@@ -164,4 +165,4 @@ void EventDispatcher::bubbleEvent(Event* evt)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EventException.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EventException.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EventException.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/EventException.h"
|
||||
#include "Poco/DOM/EventException.h"
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EventException::EventException(int code):
|
||||
@@ -77,10 +78,10 @@ const char* EventException::className() const throw()
|
||||
}
|
||||
|
||||
|
||||
Foundation::Exception* EventException::clone() const
|
||||
Poco::Exception* EventException::clone() const
|
||||
{
|
||||
return new EventException(*this);
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EventListener.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EventListener.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EventListener.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/EventListener.h"
|
||||
#include "Poco/DOM/EventListener.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EventListener::~EventListener()
|
||||
@@ -45,4 +46,4 @@ EventListener::~EventListener()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// EventTarget.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/EventTarget.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/EventTarget.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/EventTarget.h"
|
||||
#include "Poco/DOM/EventTarget.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
EventTarget::~EventTarget()
|
||||
@@ -45,4 +46,4 @@ EventTarget::~EventTarget()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// InputSource.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/InputSource.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/InputSource.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/InputSource.h"
|
||||
#include "Poco/SAX/InputSource.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
InputSource::InputSource():
|
||||
@@ -97,5 +98,5 @@ void InputSource::setCharacterStream(XMLCharInputStream& cistr)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// LexicalHandler.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/LexicalHandler.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/LexicalHandler.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/LexicalHandler.h"
|
||||
#include "Poco/SAX/LexicalHandler.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
LexicalHandler::~LexicalHandler()
|
||||
@@ -45,4 +46,4 @@ LexicalHandler::~LexicalHandler()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Locator.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Locator.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Locator.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/Locator.h"
|
||||
#include "Poco/SAX/Locator.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Locator::~Locator()
|
||||
@@ -45,4 +46,4 @@ Locator::~Locator()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// LocatorImpl.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/LocatorImpl.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/LocatorImpl.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/LocatorImpl.h"
|
||||
#include "Poco/SAX/LocatorImpl.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
LocatorImpl::LocatorImpl()
|
||||
@@ -122,4 +123,4 @@ void LocatorImpl::setColumnNumber(int columnNumber)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// MutationEvent.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/MutationEvent.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/MutationEvent.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/MutationEvent.h"
|
||||
#include "Poco/DOM/MutationEvent.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString MutationEvent::DOMSubtreeModified = toXMLString("DOMSubtreeModified");
|
||||
@@ -94,4 +95,4 @@ void MutationEvent::initMutationEvent(const XMLString& type, bool canBubble, boo
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Name.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Name.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Name.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/Name.h"
|
||||
#include "Poco/XML/Name.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString Name::EMPTY_NAME;
|
||||
@@ -188,4 +189,4 @@ XMLString Name::prefix(const XMLString& qname)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NamePool.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NamePool.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NamePool.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/NamePool.h"
|
||||
#include "Foundation/Exception.h"
|
||||
#include "Poco/XML/NamePool.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
class NamePoolItem
|
||||
@@ -116,7 +117,7 @@ const Name& NamePool::insert(const XMLString& qname, const XMLString& namespaceU
|
||||
while (!_pItems[n].set(qname, namespaceURI, localName) && i++ < _size)
|
||||
n = (n + 1) % _size;
|
||||
|
||||
if (i > _size) throw Foundation::PoolOverflowException("XML name pool");
|
||||
if (i > _size) throw Poco::PoolOverflowException("XML name pool");
|
||||
|
||||
return _pItems[n].get();
|
||||
}
|
||||
@@ -144,4 +145,4 @@ unsigned long NamePool::hash(const XMLString& qname, const XMLString& namespaceU
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NamedNodeMap.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NamedNodeMap.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NamedNodeMap.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/NamedNodeMap.h"
|
||||
#include "Poco/DOM/NamedNodeMap.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
NamedNodeMap::~NamedNodeMap()
|
||||
@@ -45,4 +46,4 @@ NamedNodeMap::~NamedNodeMap()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NamespaceStrategy.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NamespaceStrategy.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NamespaceStrategy.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,14 +34,15 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/NamespaceStrategy.h"
|
||||
#include "SAX/AttributesImpl.h"
|
||||
#include "SAX/ContentHandler.h"
|
||||
#include "XML/XMLException.h"
|
||||
#include "XML/Name.h"
|
||||
#include "Poco/XML/NamespaceStrategy.h"
|
||||
#include "Poco/SAX/AttributesImpl.h"
|
||||
#include "Poco/SAX/ContentHandler.h"
|
||||
#include "Poco/XML/XMLException.h"
|
||||
#include "Poco/XML/Name.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString NamespaceStrategy::NOTHING;
|
||||
@@ -207,4 +208,4 @@ void NamespacePrefixesStrategy::endElement(const XMLChar* name, ContentHandler*
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NamespaceSupport.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NamespaceSupport.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NamespaceSupport.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/NamespaceSupport.h"
|
||||
#include "XML/Name.h"
|
||||
#include "Poco/SAX/NamespaceSupport.h"
|
||||
#include "Poco/XML/Name.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString NamespaceSupport::EMPTY_STRING;
|
||||
@@ -205,4 +206,4 @@ void NamespaceSupport::reset()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Node.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Node.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Node.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Node.h"
|
||||
#include "Poco/DOM/Node.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Node::~Node()
|
||||
@@ -45,4 +46,4 @@ Node::~Node()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NodeFilter.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NodeFilter.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NodeFilter.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/NodeFilter.h"
|
||||
#include "Poco/DOM/NodeFilter.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
NodeFilter::~NodeFilter()
|
||||
@@ -45,4 +46,4 @@ NodeFilter::~NodeFilter()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NodeIterator.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NodeIterator.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NodeIterator.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,13 +34,14 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/NodeIterator.h"
|
||||
#include "DOM/AbstractNode.h"
|
||||
#include "DOM/NodeFilter.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/NodeIterator.h"
|
||||
#include "Poco/DOM/AbstractNode.h"
|
||||
#include "Poco/DOM/NodeFilter.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
NodeIterator::NodeIterator(Node* root, unsigned long whatToShow, NodeFilter* pFilter):
|
||||
@@ -194,4 +195,4 @@ Node* NodeIterator::last()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// NodeList.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/NodeList.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/NodeList.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/NodeList.h"
|
||||
#include "Poco/DOM/NodeList.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
NodeList::~NodeList()
|
||||
@@ -45,4 +46,4 @@ NodeList::~NodeList()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Notation.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Notation.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Notation.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Notation.h"
|
||||
#include "Poco/DOM/Notation.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
Notation::Notation(Document* pOwnerDocument, const XMLString& name, const XMLString& publicId, const XMLString& systemId):
|
||||
@@ -81,4 +82,4 @@ Node* Notation::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ParserEngine.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/ParserEngine.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/ParserEngine.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,29 +34,30 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/ParserEngine.h"
|
||||
#include "XML/NamespaceStrategy.h"
|
||||
#include "XML/XMLException.h"
|
||||
#include "SAX/EntityResolver.h"
|
||||
#include "SAX/EntityResolverImpl.h"
|
||||
#include "SAX/DTDHandler.h"
|
||||
#include "SAX/DeclHandler.h"
|
||||
#include "SAX/ContentHandler.h"
|
||||
#include "SAX/LexicalHandler.h"
|
||||
#include "SAX/ErrorHandler.h"
|
||||
#include "SAX/InputSource.h"
|
||||
#include "SAX/Locator.h"
|
||||
#include "SAX/LocatorImpl.h"
|
||||
#include "SAX/SAXException.h"
|
||||
#include "Foundation/URI.h"
|
||||
#include "Poco/XML/ParserEngine.h"
|
||||
#include "Poco/XML/NamespaceStrategy.h"
|
||||
#include "Poco/XML/XMLException.h"
|
||||
#include "Poco/SAX/EntityResolver.h"
|
||||
#include "Poco/SAX/EntityResolverImpl.h"
|
||||
#include "Poco/SAX/DTDHandler.h"
|
||||
#include "Poco/SAX/DeclHandler.h"
|
||||
#include "Poco/SAX/ContentHandler.h"
|
||||
#include "Poco/SAX/LexicalHandler.h"
|
||||
#include "Poco/SAX/ErrorHandler.h"
|
||||
#include "Poco/SAX/InputSource.h"
|
||||
#include "Poco/SAX/Locator.h"
|
||||
#include "Poco/SAX/LocatorImpl.h"
|
||||
#include "Poco/SAX/SAXException.h"
|
||||
#include "Poco/URI.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
using Foundation::URI;
|
||||
using Foundation::TextEncoding;
|
||||
using Poco::URI;
|
||||
using Poco::TextEncoding;
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
class ContextLocator: public Locator
|
||||
@@ -527,7 +528,7 @@ void ParserEngine::handleError(int errorNo)
|
||||
if (_pErrorHandler) _pErrorHandler->error(exc);
|
||||
throw;
|
||||
}
|
||||
catch (Foundation::Exception& exc)
|
||||
catch (Poco::Exception& exc)
|
||||
{
|
||||
if (_pErrorHandler) _pErrorHandler->fatalError(SAXParseException("Fatal error", locator(), exc));
|
||||
throw;
|
||||
@@ -828,4 +829,4 @@ int ParserEngine::convert(void* data, const char* s)
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// ProcessingInstruction.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/ProcessingInstruction.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/ProcessingInstruction.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/ProcessingInstruction.h"
|
||||
#include "Poco/DOM/ProcessingInstruction.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
ProcessingInstruction::ProcessingInstruction(Document* pOwnerDocument, const XMLString& target, const XMLString& data):
|
||||
@@ -97,4 +98,4 @@ Node* ProcessingInstruction::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// SAXException.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/SAXException.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/SAXException.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,13 +34,14 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/SAXException.h"
|
||||
#include "SAX/Locator.h"
|
||||
#include "Poco/SAX/SAXException.h"
|
||||
#include "Poco/SAX/Locator.h"
|
||||
#include <typeinfo>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
POCO_IMPLEMENT_EXCEPTION(SAXException, XMLException, "SAX Exception")
|
||||
@@ -58,7 +59,7 @@ SAXParseException::SAXParseException(const std::string& msg, const Locator& loc)
|
||||
}
|
||||
|
||||
|
||||
SAXParseException::SAXParseException(const std::string& msg, const Locator& loc, const Foundation::Exception& exc):
|
||||
SAXParseException::SAXParseException(const std::string& msg, const Locator& loc, const Poco::Exception& exc):
|
||||
SAXException(buildMessage(msg, loc.getPublicId(), loc.getSystemId(), loc.getLineNumber(), loc.getColumnNumber()), exc),
|
||||
_publicId(loc.getPublicId()),
|
||||
_systemId(loc.getSystemId()),
|
||||
@@ -78,7 +79,7 @@ SAXParseException::SAXParseException(const std::string& msg, const XMLString& pu
|
||||
}
|
||||
|
||||
|
||||
SAXParseException::SAXParseException(const std::string& msg, const XMLString& publicId, const XMLString& systemId, int lineNumber, int columnNumber, const Foundation::Exception& exc):
|
||||
SAXParseException::SAXParseException(const std::string& msg, const XMLString& publicId, const XMLString& systemId, int lineNumber, int columnNumber, const Poco::Exception& exc):
|
||||
SAXException(buildMessage(msg, publicId, systemId, lineNumber, columnNumber), exc),
|
||||
_publicId(publicId),
|
||||
_systemId(systemId),
|
||||
@@ -129,12 +130,18 @@ const char* SAXParseException::className() const throw()
|
||||
}
|
||||
|
||||
|
||||
Foundation::Exception* SAXParseException::clone() const
|
||||
Poco::Exception* SAXParseException::clone() const
|
||||
{
|
||||
return new SAXParseException(*this);
|
||||
}
|
||||
|
||||
|
||||
void SAXParseException::rethrow() const
|
||||
{
|
||||
throw *this;
|
||||
}
|
||||
|
||||
|
||||
std::string SAXParseException::buildMessage(const std::string& msg, const XMLString& publicId, const XMLString& systemId, int lineNumber, int columnNumber)
|
||||
{
|
||||
std::ostringstream result;
|
||||
@@ -150,4 +157,4 @@ std::string SAXParseException::buildMessage(const std::string& msg, const XMLStr
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// SAXParser.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/SAXParser.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/SAXParser.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,15 +34,16 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/SAXParser.h"
|
||||
#include "SAX/SAXException.h"
|
||||
#include "SAX/EntityResolverImpl.h"
|
||||
#include "SAX/InputSource.h"
|
||||
#include "XML/NamespaceStrategy.h"
|
||||
#include "Poco/SAX/SAXParser.h"
|
||||
#include "Poco/SAX/SAXException.h"
|
||||
#include "Poco/SAX/EntityResolverImpl.h"
|
||||
#include "Poco/SAX/InputSource.h"
|
||||
#include "Poco/XML/NamespaceStrategy.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
SAXParser::SAXParser():
|
||||
@@ -77,7 +78,7 @@ const XMLString& SAXParser::getEncoding() const
|
||||
}
|
||||
|
||||
|
||||
void SAXParser::addEncoding(const XMLString& name, Foundation::TextEncoding* pEncoding)
|
||||
void SAXParser::addEncoding(const XMLString& name, Poco::TextEncoding* pEncoding)
|
||||
{
|
||||
_engine.addEncoding(name, pEncoding);
|
||||
}
|
||||
@@ -244,4 +245,4 @@ void SAXParser::setupParse()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Text.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/Text.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/Text.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/Text.h"
|
||||
#include "DOM/Document.h"
|
||||
#include "DOM/DOMException.h"
|
||||
#include "Poco/DOM/Text.h"
|
||||
#include "Poco/DOM/Document.h"
|
||||
#include "Poco/DOM/DOMException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString Text::NODE_NAME = toXMLString("#text");
|
||||
@@ -86,10 +87,16 @@ unsigned short Text::nodeType() const
|
||||
}
|
||||
|
||||
|
||||
XMLString Text::innerText() const
|
||||
{
|
||||
return nodeValue();
|
||||
}
|
||||
|
||||
|
||||
Node* Text::copyNode(bool deep, Document* pOwnerDocument) const
|
||||
{
|
||||
return new Text(pOwnerDocument, *this);
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TreeWalker.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/TreeWalker.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/TreeWalker.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: DOM
|
||||
@@ -34,12 +34,13 @@
|
||||
//
|
||||
|
||||
|
||||
#include "DOM/TreeWalker.h"
|
||||
#include "DOM/Node.h"
|
||||
#include "DOM/NodeFilter.h"
|
||||
#include "Poco/DOM/TreeWalker.h"
|
||||
#include "Poco/DOM/Node.h"
|
||||
#include "Poco/DOM/NodeFilter.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
TreeWalker::TreeWalker(Node* root, unsigned long whatToShow, NodeFilter* pFilter):
|
||||
@@ -245,4 +246,4 @@ Node* TreeWalker::previous(Node* pNode) const
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// WhitespaceFilter.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/WhitespaceFilter.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/WhitespaceFilter.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/WhitespaceFilter.h"
|
||||
#include "SAX/SAXException.h"
|
||||
#include "Poco/SAX/WhitespaceFilter.h"
|
||||
#include "Poco/SAX/SAXException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
WhitespaceFilter::WhitespaceFilter():
|
||||
@@ -230,4 +231,4 @@ void WhitespaceFilter::setupParse()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// XMLException.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/XMLException.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/XMLException.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,17 +34,18 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/XMLException.h"
|
||||
#include "Poco/XML/XMLException.h"
|
||||
#include <typeinfo>
|
||||
|
||||
|
||||
using Foundation::RuntimeException;
|
||||
using Poco::RuntimeException;
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
POCO_IMPLEMENT_EXCEPTION(XMLException, RuntimeException, "XML Exception")
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// XMLFilter.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/XMLFilter.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/XMLFilter.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/XMLFilter.h"
|
||||
#include "Poco/SAX/XMLFilter.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
XMLFilter::~XMLFilter()
|
||||
@@ -45,4 +46,4 @@ XMLFilter::~XMLFilter()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// XMLFilterImpl.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/XMLFilterImpl.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/XMLFilterImpl.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,11 +34,12 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/XMLFilterImpl.h"
|
||||
#include "SAX/SAXException.h"
|
||||
#include "Poco/SAX/XMLFilterImpl.h"
|
||||
#include "Poco/SAX/SAXException.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
XMLFilterImpl::XMLFilterImpl():
|
||||
@@ -324,4 +325,4 @@ void XMLFilterImpl::setupParse()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// XMLReader.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/XMLReader.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/XMLReader.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: SAX
|
||||
@@ -34,10 +34,11 @@
|
||||
//
|
||||
|
||||
|
||||
#include "SAX/XMLReader.h"
|
||||
#include "Poco/SAX/XMLReader.h"
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const XMLString XMLReader::FEATURE_VALIDATION = toXMLString("http://xml.org/sax/features/validation");
|
||||
@@ -55,4 +56,4 @@ XMLReader::~XMLReader()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// XMLString.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/XMLString.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/XMLString.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,7 +34,7 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/XMLString.h"
|
||||
#include "Poco/XML/XMLString.h"
|
||||
|
||||
|
||||
#if defined(XML_UNICODE_WCHAR_T)
|
||||
@@ -42,7 +42,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
#if defined(XML_UNICODE_WCHAR_T)
|
||||
@@ -82,4 +83,4 @@ XMLString toXMLString(const std::string& str)
|
||||
#endif // XML_UNICODE_WCHAR_T
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// XMLWriter.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/XMLWriter.cpp#2 $
|
||||
// $Id: //poco/1.2/XML/src/XMLWriter.cpp#1 $
|
||||
//
|
||||
// Library: XML
|
||||
// Package: XML
|
||||
@@ -34,15 +34,16 @@
|
||||
//
|
||||
|
||||
|
||||
#include "XML/XMLWriter.h"
|
||||
#include "XML/XMLString.h"
|
||||
#include "XML/XMLException.h"
|
||||
#include "SAX/AttributesImpl.h"
|
||||
#include "Foundation/UTF8Encoding.h"
|
||||
#include "Poco/XML/XMLWriter.h"
|
||||
#include "Poco/XML/XMLString.h"
|
||||
#include "Poco/XML/XMLException.h"
|
||||
#include "Poco/SAX/AttributesImpl.h"
|
||||
#include "Poco/UTF8Encoding.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
XML_BEGIN
|
||||
namespace Poco {
|
||||
namespace XML {
|
||||
|
||||
|
||||
const std::string XMLWriter::NEWLINE_DEFAULT;
|
||||
@@ -68,16 +69,16 @@ const std::string XMLWriter::MARKUP_END_CDATA = "]]>";
|
||||
|
||||
|
||||
#if defined(XML_UNICODE_WCHAR_T)
|
||||
#define NATIVE_ENCODING Foundation::UTF16Encoding
|
||||
#define NATIVE_ENCODING Poco::UTF16Encoding
|
||||
#else
|
||||
#define NATIVE_ENCODING Foundation::UTF8Encoding
|
||||
#define NATIVE_ENCODING Poco::UTF8Encoding
|
||||
#endif
|
||||
|
||||
|
||||
XMLWriter::XMLWriter(XMLByteOutputStream& str, int options):
|
||||
_pTextConverter(0),
|
||||
_pInEncoding(new NATIVE_ENCODING),
|
||||
_pOutEncoding(new Foundation::UTF8Encoding),
|
||||
_pOutEncoding(new Poco::UTF8Encoding),
|
||||
_options(options),
|
||||
_encoding("UTF-8"),
|
||||
_depth(-1),
|
||||
@@ -90,12 +91,12 @@ XMLWriter::XMLWriter(XMLByteOutputStream& str, int options):
|
||||
_unclosedStartTag(false),
|
||||
_prefix(0)
|
||||
{
|
||||
_pTextConverter = new Foundation::OutputStreamConverter(str, *_pInEncoding, *_pOutEncoding);
|
||||
_pTextConverter = new Poco::OutputStreamConverter(str, *_pInEncoding, *_pOutEncoding);
|
||||
setNewLine(NEWLINE_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
XMLWriter::XMLWriter(XMLByteOutputStream& str, int options, const std::string& encodingName, Foundation::TextEncoding& textEncoding):
|
||||
XMLWriter::XMLWriter(XMLByteOutputStream& str, int options, const std::string& encodingName, Poco::TextEncoding& textEncoding):
|
||||
_pTextConverter(0),
|
||||
_pInEncoding(new NATIVE_ENCODING),
|
||||
_pOutEncoding(0),
|
||||
@@ -111,12 +112,12 @@ XMLWriter::XMLWriter(XMLByteOutputStream& str, int options, const std::string& e
|
||||
_unclosedStartTag(false),
|
||||
_prefix(0)
|
||||
{
|
||||
_pTextConverter = new Foundation::OutputStreamConverter(str, *_pInEncoding, textEncoding);
|
||||
_pTextConverter = new Poco::OutputStreamConverter(str, *_pInEncoding, textEncoding);
|
||||
setNewLine(NEWLINE_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
XMLWriter::XMLWriter(XMLByteOutputStream& str, int options, const std::string& encodingName, Foundation::TextEncoding* pTextEncoding):
|
||||
XMLWriter::XMLWriter(XMLByteOutputStream& str, int options, const std::string& encodingName, Poco::TextEncoding* pTextEncoding):
|
||||
_pTextConverter(0),
|
||||
_pInEncoding(new NATIVE_ENCODING),
|
||||
_pOutEncoding(0),
|
||||
@@ -134,13 +135,13 @@ XMLWriter::XMLWriter(XMLByteOutputStream& str, int options, const std::string& e
|
||||
{
|
||||
if (pTextEncoding)
|
||||
{
|
||||
_pTextConverter = new Foundation::OutputStreamConverter(str, *_pInEncoding, *pTextEncoding);
|
||||
_pTextConverter = new Poco::OutputStreamConverter(str, *_pInEncoding, *pTextEncoding);
|
||||
}
|
||||
else
|
||||
{
|
||||
_encoding = "UTF-8";
|
||||
_pOutEncoding = new Foundation::UTF8Encoding;
|
||||
_pTextConverter = new Foundation::OutputStreamConverter(str, *_pInEncoding, *_pOutEncoding);
|
||||
_pOutEncoding = new Poco::UTF8Encoding;
|
||||
_pTextConverter = new Poco::OutputStreamConverter(str, *_pInEncoding, *_pOutEncoding);
|
||||
}
|
||||
setNewLine(NEWLINE_DEFAULT);
|
||||
}
|
||||
@@ -300,7 +301,7 @@ void XMLWriter::emptyElement(const XMLString& namespaceURI, const XMLString& loc
|
||||
void XMLWriter::characters(const XMLChar ch[], int start, int length)
|
||||
{
|
||||
if (_unclosedStartTag) closeStartTag();
|
||||
_contentWritten = length > 0;
|
||||
_contentWritten = _contentWritten || length > 0;
|
||||
if (_inCDATA)
|
||||
{
|
||||
while (length-- > 0) writeXML(ch[start++]);
|
||||
@@ -340,6 +341,8 @@ void XMLWriter::characters(const XMLString& str)
|
||||
|
||||
void XMLWriter::rawCharacters(const XMLString& str)
|
||||
{
|
||||
if (_unclosedStartTag) closeStartTag();
|
||||
_contentWritten = _contentWritten || !str.empty();
|
||||
writeXML(str);
|
||||
}
|
||||
|
||||
@@ -650,6 +653,13 @@ void XMLWriter::declareAttributeNamespaces(const Attributes& attributes)
|
||||
XMLString splitLocalName;
|
||||
Name::split(qname, prefix, splitLocalName);
|
||||
if (prefix.empty()) prefix = _namespaces.getPrefix(namespaceURI);
|
||||
if (prefix.empty() && !namespaceURI.empty() && !_namespaces.isMapped(namespaceURI))
|
||||
{
|
||||
prefix = newPrefix();
|
||||
_namespaces.declarePrefix(prefix, namespaceURI);
|
||||
}
|
||||
|
||||
|
||||
const XMLString& uri = _namespaces.getURI(prefix);
|
||||
if ((uri.empty() || uri != namespaceURI) && !namespaceURI.empty())
|
||||
{
|
||||
@@ -796,4 +806,4 @@ XMLString XMLWriter::newPrefix()
|
||||
}
|
||||
|
||||
|
||||
XML_END
|
||||
} } // namespace Poco::XML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// expat_config.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/XML/src/expat_config.h#2 $
|
||||
// $Id: //poco/1.2/XML/src/expat_config.h#1 $
|
||||
//
|
||||
// Poco XML specific configuration for expat.
|
||||
//
|
||||
@@ -36,9 +36,7 @@
|
||||
#define EXPAT_CONFIG_H
|
||||
|
||||
|
||||
#ifndef Foundation_Platform_INCLUDED
|
||||
#include "Foundation/Platform.h"
|
||||
#endif
|
||||
#include "Poco/Platform.h"
|
||||
|
||||
|
||||
#include <memory.h>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include "expat_config.h"
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include "XML/expat.h"
|
||||
#include "Poco/XML/expat.h"
|
||||
|
||||
#ifdef XML_UNICODE
|
||||
#define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#endif
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include "XML/expat_external.h"
|
||||
#include "Poco/XML/expat_external.h"
|
||||
#include "internal.h"
|
||||
#include "xmlrole.h"
|
||||
#include "ascii.h"
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#endif
|
||||
#endif /* ndef COMPILED_FROM_DSP */
|
||||
|
||||
#include "XML/expat_external.h"
|
||||
#include "Poco/XML/expat_external.h"
|
||||
#include "internal.h"
|
||||
#include "xmltok.h"
|
||||
#include "nametab.h"
|
||||
|
Reference in New Issue
Block a user