diff options
author | Stef <stef@ws.local> | 2004-07-27 21:34:03 +0000 |
---|---|---|
committer | Stef <stef@ws.local> | 2004-07-27 21:34:03 +0000 |
commit | 265368a4e19a190469051c7e2464ff4fd43da656 (patch) | |
tree | 73e27790adf037ce31280ae92e67d494983d18bd /src/xmlfixups.cpp | |
parent | d50019d579b4452a66277372d3d007a983805349 (diff) |
- Element comparison fixes
- Other XML fixup fixes
Diffstat (limited to 'src/xmlfixups.cpp')
-rw-r--r-- | src/xmlfixups.cpp | 8 |
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(); |