org.xwiki.xml.internal.html.filter
Class ListFilter

java.lang.Object
  extended by org.xwiki.xml.html.filter.AbstractHTMLFilter
      extended by org.xwiki.xml.internal.html.filter.ListFilter
All Implemented Interfaces:
HTMLFilter, HTMLConstants

@Component
@Named(value="list")
@Singleton
public class ListFilter
extends AbstractHTMLFilter

Transform non XHTML list into XHTML valid lists. Specifically, move <ul> and <ol> elements (and any other nodes that are not allowed) nested inside a <ul> or <ol> element inside the previous <li> element.

For example:

   <ul>
     <li>item1</li>
     <ul>
       <li>item2</li>
     </ul>
   </ul>
 
becomes
   <ul>
     <li>item1
       <ul>
         <li>item2</li>
       </ul>
     </li>
   </ul>
 

Since:
1.6M1
Version:
$Id$

Field Summary
 
Fields inherited from interface org.xwiki.xml.html.HTMLConstants
ATTRIBUTE_ALIGN, ATTRIBUTE_ALT, ATTRIBUTE_CLASS, ATTRIBUTE_FONTCOLOR, ATTRIBUTE_FONTFACE, ATTRIBUTE_FONTSIZE, ATTRIBUTE_HREF, ATTRIBUTE_NAME, ATTRIBUTE_ROWSPAN, ATTRIBUTE_SRC, ATTRIBUTE_STYLE, TAG_A, TAG_ABBR, TAG_ACRONYM, TAG_ADDRESS, TAG_B, TAG_BLOCKQUOTE, TAG_BODY, TAG_BR, TAG_CENTER, TAG_CITE, TAG_CODE, TAG_DEL, TAG_DFN, TAG_DIV, TAG_DL, TAG_EM, TAG_FIELDSET, TAG_FONT, TAG_FORM, TAG_H1, TAG_H2, TAG_H3, TAG_H4, TAG_H5, TAG_H6, TAG_HEAD, TAG_HR, TAG_HTML, TAG_I, TAG_IMG, TAG_INS, TAG_KBD, TAG_LI, TAG_NOSCRIPT, TAG_OL, TAG_P, TAG_PRE, TAG_Q, TAG_S, TAG_SAMP, TAG_SCRIPT, TAG_SPAN, TAG_STRIKE, TAG_STRONG, TAG_STYLE, TAG_TABLE, TAG_TD, TAG_TH, TAG_TR, TAG_U, TAG_UL, TAG_VAR, WHITE_SPACE_CHARS
 
Constructor Summary
ListFilter()
           
 
Method Summary
 void filter(org.w3c.dom.Document document, java.util.Map<java.lang.String,java.lang.String> cleaningParameters)
          Performs cleaning of the html code stored in Document.
 
Methods inherited from class org.xwiki.xml.html.filter.AbstractHTMLFilter
filterChildren, filterDescendants, filterDescendants, hasAttribute, moveChildren, replaceWithChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListFilter

public ListFilter()
Method Detail

filter

public void filter(org.w3c.dom.Document document,
                   java.util.Map<java.lang.String,java.lang.String> cleaningParameters)
Performs cleaning of the html code stored in Document.

The ListFilter does not use any cleaningParameters passed in.

Parameters:
document - The Document with html code
cleaningParameters - additional cleaning parameters for the filter.


Copyright © 2004-2011 XWiki. All Rights Reserved.