This method is called after we read the entire SGML document It resolves the dobious Elements this way: 1. We don't have a DTD so we will consider that all dubious elements followed by text will close at the end of the text... 2. If a dubious element is followed by another element
(CustomObject aCustomObject)
| 583 | * @param aCustomObject an object from the dubiousElements list |
| 584 | */ |
| 585 | private void makeFinalModifications(CustomObject aCustomObject) { |
| 586 | String endElement = null; |
| 587 | // if the element is empty then we add / before > like this: |
| 588 | // <w> -> <w/> |
| 589 | if (aCustomObject.isEmpty()) |
| 590 | m_modifier.insert(aCustomObject.getClosePos(),"/"); |
| 591 | // otherwhise we create an end element |
| 592 | // <w> -> </w> |
| 593 | else{ |
| 594 | // create the end element |
| 595 | endElement = "</" + aCustomObject.getElemName() + ">"; |
| 596 | // insert it where the closePos indicates |
| 597 | m_modifier.insert(aCustomObject.getClosePos(), endElement); |
| 598 | } |
| 599 | } // makeFinalModifications |
| 600 | |
| 601 | /** |
| 602 | * Tests if c is a white space char |
no test coverage detected