rpms/xalan-c/devel xalan-c-1.10.0-new-xerces-c.patch,NONE,1.1
Lubomir Rintel
lkundrak at fedoraproject.org
Fri Feb 5 16:00:48 UTC 2010
Author: lkundrak
Update of /cvs/pkgs/rpms/xalan-c/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14427
Added Files:
xalan-c-1.10.0-new-xerces-c.patch
Log Message:
Actually commit the gentoo fix
xalan-c-1.10.0-new-xerces-c.patch:
Tests/Conf/conf.cpp | 9
samples/SimpleTransform/XalanMemoryManagerImpl.hpp | 8
src/xalanc/DOMSupport/DOMServices.hpp | 2
src/xalanc/DOMSupport/DOMSupportDefault.cpp | 10
src/xalanc/Harness/XalanDiagnosticMemoryManager.cpp | 8
src/xalanc/Harness/XalanDiagnosticMemoryManager.hpp | 3
src/xalanc/Include/PlatformDefinitions.hpp | 10
src/xalanc/Include/VCPPDefinitions.hpp | 2
src/xalanc/PlatformSupport/AttributeListImpl.cpp | 14 -
src/xalanc/PlatformSupport/AttributeListImpl.hpp | 10
src/xalanc/PlatformSupport/AttributesImpl.cpp | 69 ++++-
src/xalanc/PlatformSupport/AttributesImpl.hpp | 33 +-
src/xalanc/PlatformSupport/DOMStringHelper.hpp | 2
src/xalanc/PlatformSupport/FormatterListener.hpp | 2
src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp | 20 -
src/xalanc/PlatformSupport/NamedNodeMapAttributeList.hpp | 19 -
src/xalanc/PlatformSupport/StdBinInputStream.cpp | 14 -
src/xalanc/PlatformSupport/StdBinInputStream.hpp | 9
src/xalanc/PlatformSupport/XSLException.hpp | 7
src/xalanc/PlatformSupport/XalanLocator.hpp | 18 -
src/xalanc/PlatformSupport/XalanMemoryManagement.cpp | 11
src/xalanc/PlatformSupport/XalanMemoryManagerDefault.cpp | 8
src/xalanc/PlatformSupport/XalanMemoryManagerDefault.hpp | 3
src/xalanc/PlatformSupport/XalanTranscodingServices.hpp | 4
src/xalanc/Utils/MsgCreator/ICUResHandler.cpp | 19 -
src/xalanc/Utils/MsgCreator/ICUResHandler.hpp | 12
src/xalanc/Utils/MsgCreator/InMemHandler.cpp | 23 +
src/xalanc/Utils/MsgCreator/InMemHandler.hpp | 14 -
src/xalanc/Utils/MsgCreator/MsgCreator.cpp | 4
src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp | 17 -
src/xalanc/Utils/MsgCreator/MsgFileOutputStream.hpp | 17 -
src/xalanc/Utils/MsgCreator/NLSHandler.cpp | 11
src/xalanc/Utils/MsgCreator/NLSHandler.hpp | 11
src/xalanc/Utils/MsgCreator/SAX2Handler.cpp | 13
src/xalanc/Utils/MsgCreator/SAX2Handler.hpp | 9
src/xalanc/XMLSupport/FormatterToHTML.cpp | 42 +--
src/xalanc/XMLSupport/FormatterToHTML.hpp | 28 --
src/xalanc/XMLSupport/FormatterToNull.cpp | 10
src/xalanc/XMLSupport/FormatterToNull.hpp | 8
src/xalanc/XMLSupport/FormatterToText.cpp | 8
src/xalanc/XMLSupport/FormatterToText.hpp | 8
src/xalanc/XMLSupport/FormatterToXML.cpp | 86 +++---
src/xalanc/XMLSupport/FormatterToXML.hpp | 78 ++---
src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp | 56 ++--
src/xalanc/XMLSupport/XalanFormatterWriter.hpp | 13
src/xalanc/XMLSupport/XalanIndentWriter.hpp | 9
src/xalanc/XMLSupport/XalanUTF16Writer.hpp | 32 +-
src/xalanc/XMLSupport/XalanUTF8Writer.hpp | 66 ++--
src/xalanc/XMLSupport/XalanXMLSerializerBase.cpp | 68 ++--
src/xalanc/XMLSupport/XalanXMLSerializerBase.hpp | 138 +++++-----
src/xalanc/XPath/FormatterStringLengthCounter.cpp | 16 -
src/xalanc/XPath/FormatterStringLengthCounter.hpp | 10
src/xalanc/XPath/XObject.hpp | 2
src/xalanc/XPath/XPath.hpp | 2
src/xalanc/XPath/XPathConstructionContext.hpp | 22 -
src/xalanc/XPath/XPathExecutionContext.hpp | 7
src/xalanc/XPath/XPathExecutionContextDefault.cpp | 12
src/xalanc/XPath/XPathExecutionContextDefault.hpp | 9
src/xalanc/XPath/XPathProcessorImpl.cpp | 64 ++--
src/xalanc/XPath/XPathProcessorImpl.hpp | 10
src/xalanc/XSLT/CountersTable.hpp | 2
src/xalanc/XSLT/DecimalToRoman.hpp | 2
src/xalanc/XSLT/ElemApplyImport.cpp | 10
src/xalanc/XSLT/ElemApplyImport.hpp | 5
src/xalanc/XSLT/ElemApplyTemplates.cpp | 8
src/xalanc/XSLT/ElemApplyTemplates.hpp | 10
src/xalanc/XSLT/ElemAttribute.cpp | 9
src/xalanc/XSLT/ElemAttribute.hpp | 4
src/xalanc/XSLT/ElemAttributeSet.cpp | 16 -
src/xalanc/XSLT/ElemAttributeSet.hpp | 4
src/xalanc/XSLT/ElemCallTemplate.cpp | 8
src/xalanc/XSLT/ElemChoose.cpp | 20 -
src/xalanc/XSLT/ElemChoose.hpp | 4
src/xalanc/XSLT/ElemCopy.cpp | 16 -
src/xalanc/XSLT/ElemCopy.hpp | 4
src/xalanc/XSLT/ElemCopyOf.cpp | 22 -
src/xalanc/XSLT/ElemCopyOf.hpp | 6
src/xalanc/XSLT/ElemDecimalFormat.cpp | 30 +-
src/xalanc/XSLT/ElemDecimalFormat.hpp | 6
src/xalanc/XSLT/ElemElement.cpp | 9
src/xalanc/XSLT/ElemElement.hpp | 4
src/xalanc/XSLT/ElemForEach.cpp | 24 -
src/xalanc/XSLT/ElemForEach.hpp | 22 -
src/xalanc/XSLT/ElemSort.cpp | 26 -
src/xalanc/XSLT/ElemSort.hpp | 10
src/xalanc/XSLT/ElemTemplateElement.cpp | 23 -
src/xalanc/XSLT/ElemTemplateElement.hpp | 30 +-
src/xalanc/XSLT/ElemUse.cpp | 6
src/xalanc/XSLT/ElemUse.hpp | 6
src/xalanc/XSLT/ElemValueOf.cpp | 8
src/xalanc/XSLT/KeyDeclaration.hpp | 12
src/xalanc/XSLT/Stylesheet.cpp | 36 +-
src/xalanc/XSLT/Stylesheet.hpp | 13
src/xalanc/XSLT/StylesheetConstructionContext.hpp | 6
src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp | 34 +-
src/xalanc/XSLT/StylesheetConstructionContextDefault.hpp | 7
src/xalanc/XSLT/StylesheetExecutionContext.hpp | 21 -
src/xalanc/XSLT/StylesheetExecutionContextDefault.cpp | 12
src/xalanc/XSLT/StylesheetExecutionContextDefault.hpp | 15 -
src/xalanc/XSLT/StylesheetHandler.cpp | 16 -
src/xalanc/XSLT/StylesheetHandler.hpp | 28 +-
src/xalanc/XSLT/XSLTEngineImpl.cpp | 83 +++---
src/xalanc/XSLT/XSLTEngineImpl.hpp | 124 ++++----
src/xalanc/XSLT/XSLTProcessor.hpp | 2
src/xalanc/XSLT/XalanElemApplyTemplatesAllocator.cpp | 8
src/xalanc/XSLT/XalanElemApplyTemplatesAllocator.hpp | 8
src/xalanc/XSLT/XalanElemAttributeAllocator.cpp | 8
src/xalanc/XSLT/XalanElemAttributeAllocator.hpp | 8
src/xalanc/XSLT/XalanElemAttributeSetAllocator.cpp | 8
src/xalanc/XSLT/XalanElemAttributeSetAllocator.hpp | 8
src/xalanc/XSLT/XalanElemElementAllocator.cpp | 8
src/xalanc/XSLT/XalanElemElementAllocator.hpp | 8
src/xalanc/XalanDOM/XalanDOMString.hpp | 4
src/xalanc/XalanSourceTree/FormatterToSourceTree.cpp | 12
src/xalanc/XalanSourceTree/FormatterToSourceTree.hpp | 12
src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp | 10
src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.hpp | 13
src/xalanc/XercesParserLiaison/FormatterToXercesDOM.cpp | 8
src/xalanc/XercesParserLiaison/FormatterToXercesDOM.hpp | 10
src/xalanc/XercesParserLiaison/XercesDOMWrapperException.hpp | 6
src/xalanc/XercesParserLiaison/XercesNamedNodeMapAttributeList.cpp | 11
src/xalanc/XercesParserLiaison/XercesNamedNodeMapAttributeList.hpp | 10
src/xalanc/XercesParserLiaison/XercesParserLiaison.cpp | 9
123 files changed, 1212 insertions(+), 969 deletions(-)
--- NEW FILE xalan-c-1.10.0-new-xerces-c.patch ---
Make Xalan-C++ 1.10.0 compile with Xerces-C++ 3.
This patch is a backport of the following changesets:
http://svn.apache.org/viewvc?view=rev&revision=482425
http://svn.apache.org/viewvc?view=rev&revision=572759
http://svn.apache.org/viewvc?view=rev&revision=651671
http://svn.apache.org/viewvc?view=rev&revision=671671
http://svn.apache.org/viewvc?view=rev&revision=672824
http://svn.apache.org/viewvc?view=rev&revision=672963
http://svn.apache.org/viewvc?view=rev&revision=696900
They were applied against the following tag:
web: http://svn.apache.org/viewvc/xalan/c/tags/Xalan-C_1_10_0/
svn: http://svn.apache.org/repos/asf/xalan/c/tags/Xalan-C_1_10_0/
Conflicts were resolved manually, trying to keep the intended meaning
of the change. No guarantees, though.
See also:
https://bugs.gentoo.org/show_bug.cgi?id=242218
http://thread.gmane.org/gmane.text.xml.xalan.c++.user/3600/focus=3601
https://issues.apache.org/jira/browse/XALANC-622
https://issues.apache.org/jira/browse/XALANC-652
2008-10-20 Martin von Gagern
Index: src/xalanc/PlatformSupport/AttributesImpl.cpp
===================================================================
--- src/xalanc/PlatformSupport/AttributesImpl.cpp (revision 706129)
+++ src/xalanc/PlatformSupport/AttributesImpl.cpp (working copy)
@@ -109,7 +109,7 @@
// until we're done.
AttributesVectorType tempVector(getMemoryManager());
- const unsigned int theLength = theRHS.getLength();
+ const XalanSize_t theLength = theRHS.getLength();
if (theLength > 0)
{
@@ -167,12 +167,12 @@
// safe and don't need any try blocks.
AttributesImpl theTempList(getMemoryManager());
- const unsigned int theLength = theRHS.getLength();
+ const XalanSize_t theLength = theRHS.getLength();
theTempList.reserve(theLength);
// Add each attribute.
- for(unsigned int i = 0; i < theLength; i++)
+ for(XalanSize_t i = 0; i < theLength; i++)
{
theTempList.addAttribute(
theRHS.getURI(i),
@@ -192,7 +192,7 @@
-unsigned int
+XalanSize_t
AttributesImpl::getLength() const
{
return unsigned(m_attributesVector.size());
@@ -201,7 +201,7 @@
const XMLCh*
-AttributesImpl::getURI(const unsigned int index) const
+AttributesImpl::getURI(const XalanSize_t index) const
{
assert(index < getLength());
@@ -211,7 +211,7 @@
const XMLCh*
-AttributesImpl::getLocalName(const unsigned int index) const
+AttributesImpl::getLocalName(const XalanSize_t index) const
{
assert(index < getLength());
@@ -221,7 +221,7 @@
const XMLCh*
-AttributesImpl::getQName(const unsigned int index) const
+AttributesImpl::getQName(const XalanSize_t index) const
{
assert(index < getLength());
@@ -231,7 +231,7 @@
const XMLCh*
-AttributesImpl::getType(const unsigned int index) const
+AttributesImpl::getType(const XalanSize_t index) const
{
assert(index < getLength());
@@ -241,7 +241,7 @@
const XMLCh*
-AttributesImpl::getValue(const unsigned int index) const
+AttributesImpl::getValue(const XalanSize_t index) const
{
assert(index < getLength());
@@ -380,18 +380,41 @@
+bool
+AttributesImpl::getIndex(
+ const XMLCh* const uri,
+ const XMLCh* const localPart,
+ XalanSize_t& index) const
+{
+ const int tempIndex =
+ getIndex(uri, localPart);
+
+ if (tempIndex == -1)
+ {
+ return false;
+ }
+ else
+ {
+ index = tempIndex;
+
+ return true;
+ }
+}
+
+
+
int
AttributesImpl::getIndex(
const XMLCh* const uri,
- const XMLCh* const localName) const
+ const XMLCh* const localPart) const
{
- assert(uri != 0 && localName != 0);
+ assert(uri != 0 && localPart != 0);
const AttributesVectorType::const_iterator i =
XALAN_STD_QUALIFIER find_if(
m_attributesVector.begin(),
m_attributesVector.end(),
- URIAndLocalNameCompareFunctor(uri, localName));
+ URIAndLocalNameCompareFunctor(uri, localPart));
if (i != m_attributesVector.end())
{
@@ -407,6 +430,28 @@
+bool
+AttributesImpl::getIndex(
+ const XMLCh* const qName,
+ XalanSize_t& index) const
+{
+ const int tempIndex =
+ getIndex(qName);
+
+ if (tempIndex == -1)
+ {
+ return false;
+ }
+ else
+ {
+ index = tempIndex;
+
+ return true;
+ }
+}
+
+
+
int
AttributesImpl::getIndex(const XMLCh* const qname) const
{
Index: src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp
===================================================================
--- src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp (revision 706129)
+++ src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp (working copy)
@@ -43,13 +43,15 @@
-NamedNodeMapAttributeList::NamedNodeMapAttributeList(const XalanNamedNodeMap& theMap,
- MemoryManagerType& theManager) :
+NamedNodeMapAttributeList::NamedNodeMapAttributeList(
+ const XalanNamedNodeMap& theMap,
+ MemoryManagerType& theManager) :
ParentType(),
m_nodeMap(theMap),
m_lastIndex(theMap.getLength() - 1),
m_memoryManager(theManager)
[...6270 lines suppressed...]
- const unsigned int /* length */)
+ const size_type /* length */)
{
}
@@ -402,8 +402,8 @@
void
FormatterToSourceTree::doCharacters(
- const XMLCh* chars,
- XalanDOMString::size_type length)
+ const XMLCh* chars,
+ size_type length)
{
if (m_currentElement != 0)
{
Index: src/xalanc/XalanSourceTree/FormatterToSourceTree.hpp
===================================================================
--- src/xalanc/XalanSourceTree/FormatterToSourceTree.hpp (revision 706129)
+++ src/xalanc/XalanSourceTree/FormatterToSourceTree.hpp (working copy)
@@ -141,7 +141,7 @@
virtual void
charactersRaw(
const XMLCh* const chars,
- const unsigned int length);
+ const size_type length);
virtual void
comment(const XMLCh* const data);
@@ -149,7 +149,7 @@
virtual void
cdata(
const XMLCh* const ch,
- const unsigned int length);
+ const size_type length);
virtual void
entityReference(const XMLCh* const name);
@@ -174,12 +174,12 @@
virtual void
characters(
const XMLCh* const chars,
- const unsigned int length);
+ const size_type length);
virtual void
ignorableWhitespace(
const XMLCh* const chars,
- const unsigned int length);
+ const size_type length);
virtual void
processingInstruction(
@@ -203,8 +203,8 @@
void
doCharacters(
- const XalanDOMChar* chars,
- XalanDOMString::size_type length);
+ const XalanDOMChar* chars,
+ size_type length);
void
doProcessingInstruction(
Index: src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp
===================================================================
--- src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp (revision 706129)
+++ src/xalanc/XalanSourceTree/XalanSourceTreeContentHandler.cpp (working copy)
@@ -65,7 +65,7 @@
void
XalanSourceTreeContentHandler::characters(
const XMLCh* const chars,
- const unsigned int length)
+ const size_type length)
{
assert(m_inDTD == false);
@@ -194,7 +194,7 @@
void
XalanSourceTreeContentHandler::ignorableWhitespace(
const XMLCh* const chars,
- const unsigned int length)
+ const size_type length)
{
assert(m_inDTD == false);
@@ -370,7 +370,7 @@
void
XalanSourceTreeContentHandler::comment(
const XMLCh* const chars,
- const unsigned int length)
+ const size_type length)
{
assert(m_document != 0);
@@ -499,8 +499,8 @@
void
XalanSourceTreeContentHandler::doCharacters(
- const XMLCh* chars,
- XalanDOMString::size_type length)
+ const XMLCh* chars,
+ size_type length)
{
assert(m_inDTD == false);
Index: src/xalanc/DOMSupport/DOMSupportDefault.cpp
===================================================================
--- src/xalanc/DOMSupport/DOMSupportDefault.cpp (revision 706129)
+++ src/xalanc/DOMSupport/DOMSupportDefault.cpp (working copy)
@@ -90,18 +90,14 @@
if (theNode != 0 && theNode->getNodeType() == XalanNode::ENTITY_NODE)
{
- const XalanEntity* theEntity =
+ const XalanEntity* const theEntity =
#if defined(XALAN_OLD_STYLE_CASTS)
(const XalanEntity*)theNode;
#else
static_cast<const XalanEntity*>(theNode);
#endif
- const XalanDOMString theNotationName(
- theEntity->getNotationName(),
- theMemoryManager);
-
- if(isEmpty(theNotationName) == false) // then it's unparsed
+ if(length(theEntity->getNotationName()) != 0) // then it's unparsed
{
// The draft says: "The XSLT processor may use the public
// identifier to generate a URI for the entity instead of the URI
@@ -114,7 +110,7 @@
// So I'm falling a bit short here.
theURI = theEntity->getSystemId();
- if(isEmpty(theURI) == true)
+ if(theURI.length() == 0)
{
theURI = theEntity->getPublicId();
}
Index: src/xalanc/DOMSupport/DOMServices.hpp
===================================================================
--- src/xalanc/DOMSupport/DOMServices.hpp (revision 706129)
+++ src/xalanc/DOMSupport/DOMServices.hpp (working copy)
@@ -203,7 +203,7 @@
append(data, text.getData());
}
- typedef void (FormatterListener::*MemberFunctionPtr)(const XMLCh* const, const unsigned int);
+ typedef void (FormatterListener::*MemberFunctionPtr)(const XMLCh* const, const FormatterListener::size_type);
/**
* Sends the data for a node to a FormatterListener
Index: Tests/Conf/conf.cpp
===================================================================
--- Tests/Conf/conf.cpp (revision 706129)
+++ Tests/Conf/conf.cpp (working copy)
@@ -207,7 +207,12 @@
XercesDOMParser theParser(0, &mgr);
+#if XERCES_VERSION_MAJOR < 3
theParser.setDoValidation(true);
+#else
+ theParser.setValidationScheme(XercesDOMParser::Val_Auto);
+#endif
+
theParser.setDoNamespaces(true);
theParser.parse(xmlInput);
@@ -308,7 +313,9 @@
//
const XalanDOMString& currentDir = dirs[j];
- if (length(h.args.sub) == 0 || equals(currentDir, h.args.sub) == true)
+ if ((length(h.args.sub) == 0 ||
+ equals(currentDir, h.args.sub) == true) &&
+ currentDir[0] != XalanUnicode::charFullStop)
{
// Check that output directory is there.
//
Index: samples/SimpleTransform/XalanMemoryManagerImpl.hpp
===================================================================
--- samples/SimpleTransform/XalanMemoryManagerImpl.hpp (revision 706129)
+++ samples/SimpleTransform/XalanMemoryManagerImpl.hpp (working copy)
@@ -96,7 +96,13 @@
}
- virtual
+ MemoryManager*
+ getExceptionMemoryManager()
+ {
+ return this;
+ }
+
+ virtual
~XalanMemoryManagerImpl()
{
if( 0 == HeapDestroy(m_heapHandle) )
More information about the scm-commits
mailing list