From 61ff9cee67228fd5b430eb929687ca0cac992a7c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 27 Jul 2004 21:34:03 +0000 Subject: - Element comparison fixes - Other XML fixup fixes --- src/xmlfixups.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xmlfixups.cpp') diff --git a/src/xmlfixups.cpp b/src/xmlfixups.cpp index 45fa59a..3b56f6b 100644 --- a/src/xmlfixups.cpp +++ b/src/xmlfixups.cpp @@ -75,7 +75,7 @@ XmlFixups::XmlFixups() { loadStringSet(m_duplicates, kNoDuplicates); loadStringSet(m_removes, kRemoveTags); - loadStringSet(m_removes, kRemoveEmpty); + loadStringSet(m_removeEmpty, kRemoveEmpty); loadStringSet(m_requireAttrs, kRequireAttrs); loadStringSet(m_consolidateStart, kConsolidateStart); loadStringSet(m_consolidateEnd, kConsolidateEnd); @@ -511,7 +511,7 @@ void XmlFixups::runPassTwo(const DOM::Document& doc) if(font != NULL) el.setAttribute(kAtName, font.getAttribute(kAtName)); - font.removeAttribute(kAtId); + el.removeAttribute(kAtId); } } @@ -545,7 +545,7 @@ void XmlFixups::runPassTwo(const DOM::Document& doc) // Tags that get removed but contents preserved. Also here are // tags that get removed if they have no attributes if(m_removes.find(name) != m_removes.end() || - (m_requireAttrs.find(name) != m_requireAttrs.end() && el.hasAttributes())) + (m_requireAttrs.find(name) != m_requireAttrs.end() && !el.hasAttributes())) { DOM::Node parent = el->getParentNode(); @@ -569,7 +569,7 @@ void XmlFixups::runPassTwo(const DOM::Document& doc) } // Tags that get removed when no child nodes exist - if(m_removeEmpty.find(name) != m_removeEmpty.end() && el.hasChildNodes()) + if(m_removeEmpty.find(name) != m_removeEmpty.end() && !el.hasChildNodes()) { DOM::Node parent = el->getParentNode(); -- cgit v1.2.3