org.xwiki.portlet.view
Class HTMLIdAttributeXMLFilter

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by org.xwiki.portlet.view.HTMLIdAttributeXMLFilter
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, XMLFilter, XMLReader

public class HTMLIdAttributeXMLFilter
extends org.xml.sax.helpers.XMLFilterImpl

An XML filter that rewrites all element identifiers to ensure they are unique in the context of a portal page.

Version:
$Id: 47aea92ae16e4da31bf7c6f0d1fcb3929a202ff5 $

Constructor Summary
HTMLIdAttributeXMLFilter(String namespace, boolean wrapOutput)
          Creates a new XML filter that name-spaces all element identifiers.
 
Method Summary
 void endDocument()
           
 void startDocument()
           
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLIdAttributeXMLFilter

public HTMLIdAttributeXMLFilter(String namespace,
                                boolean wrapOutput)
Creates a new XML filter that name-spaces all element identifiers.

Parameters:
namespace - the string all element identifiers will be prefixed with
wrapOutput - true to wrap the output in a container that has the namespace identifier, false otherwise
Method Detail

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.XMLFilterImpl
Throws:
SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.XMLFilterImpl
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.XMLFilterImpl
Throws:
SAXException


Copyright © 2004-2013 XWiki. All Rights Reserved.