Package org.apache.struts2.util.location
Class LocationAttributes.Pipe
java.lang.Object
org.apache.struts2.util.location.LocationAttributes.Pipe
- All Implemented Interfaces:
- ContentHandler
- Enclosing class:
- LocationAttributes
A SAX filter that adds the information available from the 
Locator as attributes.
 The purpose of having location as attributes is to allow this information to survive transformations
 of the document (an XSL could copy these attributes over) or conversion of SAX events to a DOM.
 The location is added as 3 attributes in a specific namespace to each element.
 <root xmlns:loc="http://opensymphony.com/xwork/location"
       loc:src="file://path/to/file.xml"
       loc:line="1" loc:column="1">
   <foo loc:src="file://path/to/file.xml" loc:line="2" loc:column="3"/>
 </root>
 
 Note: Although this adds a lot of information to the serialized form of the document,
 the overhead in SAX events is not that big, as attribute names are interned, and all src
 attributes point to the same string.- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionPipe()Create a filter.Pipe(ContentHandler next) Create a filter that is chained to another handler.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcharacters(char[] arg0, int arg1, int arg2) voidvoidendElement(String arg0, String arg1, String arg2) voidendPrefixMapping(String arg0) voidignorableWhitespace(char[] arg0, int arg1, int arg2) voidprocessingInstruction(String arg0, String arg1) voidsetDocumentLocator(Locator locator) voidskippedEntity(String arg0) voidvoidstartElement(String uri, String loc, String raw, Attributes attrs) voidstartPrefixMapping(String arg0, String arg1) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandlerdeclaration
- 
Constructor Details- 
Pipepublic Pipe()Create a filter. It has to be chained to another handler to be really useful.
- 
PipeCreate a filter that is chained to another handler.- Parameters:
- next- the next handler in the chain.
 
 
- 
- 
Method Details- 
setDocumentLocator- Specified by:
- setDocumentLocatorin interface- ContentHandler
 
- 
startDocument- Specified by:
- startDocumentin interface- ContentHandler
- Throws:
- SAXException
 
- 
endDocument- Specified by:
- endDocumentin interface- ContentHandler
- Throws:
- SAXException
 
- 
startElement- Specified by:
- startElementin interface- ContentHandler
- Throws:
- SAXException
 
- 
endElement- Specified by:
- endElementin interface- ContentHandler
- Throws:
- SAXException
 
- 
startPrefixMapping- Specified by:
- startPrefixMappingin interface- ContentHandler
- Throws:
- SAXException
 
- 
endPrefixMapping- Specified by:
- endPrefixMappingin interface- ContentHandler
- Throws:
- SAXException
 
- 
characters- Specified by:
- charactersin interface- ContentHandler
- Throws:
- SAXException
 
- 
ignorableWhitespace- Specified by:
- ignorableWhitespacein interface- ContentHandler
- Throws:
- SAXException
 
- 
processingInstruction- Specified by:
- processingInstructionin interface- ContentHandler
- Throws:
- SAXException
 
- 
skippedEntity- Specified by:
- skippedEntityin interface- ContentHandler
- Throws:
- SAXException
 
 
-