HTMLSchemaInformation.HTMLTagInformation tagInformation =
schemaInformation.lookupTag(lowercaseTag);
+ Map attributes = new HashMap();
+
+ Iterator i = anAttributes.entrySet().iterator();
+ while (i.hasNext()) {
+ Map.Entry entry = (Map.Entry) i.next();
+
+ attributes.put(((String) entry.getKey()).toLowerCase(), entry.getValue());
+ }
+
if (tagInformation!=null) {
if (tagInformation.getIsBlock()) {
closeAllInlineTags();
closeAllAutoclosingTags(tagInformation);
- Map attributes = new HashMap();
-
- Iterator i = anAttributes.entrySet().iterator();
- while (i.hasNext()) {
- Map.Entry entry = (Map.Entry) i.next();
-
- attributes.put(((String) entry.getKey()).toLowerCase(), entry.getValue());
- }
-
receiver.openTag(lowercaseTag, attributes);
if (tagInformation.getHasBody()) {
tagStack.push(lowercaseTag);
}
}
else {
- tagStack.push(aTag);
+ receiver.openTag(lowercaseTag, attributes);
+ tagStack.push(lowercaseTag);
}
}
public void handleClosingTag(String aTag) throws HTMLParserExc {
String lowercaseTag = aTag.toLowerCase();
- String tag = aTag;
HTMLSchemaInformation.HTMLTagInformation tagInformation =
schemaInformation.lookupTag(lowercaseTag);
if (tagInformation!=null) {
- tag = lowercaseTag;
if (tagInformation.getIsBlock()) {
closeAllInlineTags();
}
}
- int index = tagStack.search(tag);
+ int index = tagStack.search(lowercaseTag);
if (index>-1 && index<4) {
for (int i=0; i<index; i++) {