summaryrefslogtreecommitdiff
path: root/src/xmlfixups.cpp
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-07-27 21:34:03 +0000
committerStef Walter <stef@memberwebs.com>2004-07-27 21:34:03 +0000
commit61ff9cee67228fd5b430eb929687ca0cac992a7c (patch)
tree73e27790adf037ce31280ae92e67d494983d18bd /src/xmlfixups.cpp
parentd2105fb3fb2082bb32875eaab6db6a2c04c7eae5 (diff)
- Element comparison fixes
- Other XML fixup fixes
Diffstat (limited to 'src/xmlfixups.cpp')
-rw-r--r--src/xmlfixups.cpp8
1 files changed, 4 insertions, 4 deletions
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();