edu.northwestern.at.wordhoard.tools.fixers
Class NukeDiv

java.lang.Object
  extended by edu.northwestern.at.wordhoard.tools.fixers.Fixer
      extended by edu.northwestern.at.wordhoard.tools.fixers.NukeDiv

public class NukeDiv
extends Fixer

Removes superfluous "div" elements.

Removes all "div" elements in the body which have no "head" child or "head" attribute.

For the Chaucer work "The Legend of Good Women", we remove the superfluous "div" element with the "head" child "Legend of Good Women".

For the Chaucer works "Boece" and "Treatise on the Astrolab", we add appropriate "head" attributes to the divs with type="div2" instead of removing them.

For the Shakespeare work "The Phoenix and Turtle", we add the "head" attribute "The Phoenix and Turtle" to the top level div and remove the two second level divs.

For the Shakespeare work "Venus and Adonis", we add the "head" attribute "Venus and Adonis" to the top level div.

For the Shakespeare work "A Lover's Complaint", we add the "head" attribute "A Lover's Complaint" to the top level div.


Constructor Summary
NukeDiv()
           
 
Method Summary
 void fix(java.lang.String corpusTag, java.lang.String workTag, org.w3c.dom.Document document)
          Fixes an XML DOM tree.
 
Methods inherited from class edu.northwestern.at.wordhoard.tools.fixers.Fixer
enableLogMessages, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NukeDiv

public NukeDiv()
Method Detail

fix

public void fix(java.lang.String corpusTag,
                java.lang.String workTag,
                org.w3c.dom.Document document)
         throws java.lang.Exception
Fixes an XML DOM tree.

Specified by:
fix in class Fixer
Parameters:
corpusTag - Corpus tag.
workTag - Work tag.
document - XML DOM tree.
Throws:
java.lang.Exception