fi.karppinen.xml
Class RootLangInjector

java.lang.Object
  extended by gnu.xml.pipeline.EventFilter
      extended by fi.karppinen.xml.RootLangInjector
All Implemented Interfaces:
gnu.xml.pipeline.EventConsumer, ContentHandler, DTDHandler, DeclHandler, LexicalHandler

public class RootLangInjector
extends gnu.xml.pipeline.EventFilter

Adds an xml:lang attribute to the root element.

Version:
$Id: RootLangInjector.java,v 1.1 2006/10/30 19:57:09 hsivonen Exp $
Author:
hsivonen

Field Summary
private  boolean injected
           
private  Locale lang
           
 
Fields inherited from class gnu.xml.pipeline.EventFilter
DECL_HANDLER, FEATURE_URI, LEXICAL_HANDLER, PROPERTY_URI
 
Constructor Summary
RootLangInjector(Locale lang)
           
RootLangInjector(Locale lang, gnu.xml.pipeline.EventConsumer consumer)
           
 
Method Summary
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 
Methods inherited from class gnu.xml.pipeline.EventFilter
attributeDecl, bind, chainTo, characters, comment, elementDecl, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, externalEntityDecl, getContentHandler, getDocumentLocator, getDTDHandler, getErrorHandler, getNext, getProperty, ignorableWhitespace, internalEntityDecl, notationDecl, processingInstruction, setContentHandler, setDocumentLocator, setDTDHandler, setErrorHandler, setProperty, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lang

private Locale lang

injected

private boolean injected
Constructor Detail

RootLangInjector

public RootLangInjector(Locale lang)

RootLangInjector

public RootLangInjector(Locale lang,
                        gnu.xml.pipeline.EventConsumer consumer)
Parameters:
consumer -
Method Detail

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class gnu.xml.pipeline.EventFilter
Throws:
SAXException
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)