Java Doc for SerializerBase.java in  » XML » xalan » org » apache » xml » serializer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xml.serializer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xml.serializer.SerializerBase

All known Subclasses:   org.apache.xml.serializer.ToUnknownStream,  org.apache.xml.serializer.ToStream,  org.apache.xml.serializer.ToSAXHandler,
SerializerBase
abstract public class SerializerBase implements SerializationHandler,SerializerConstants(Code)
This class acts as a base class for the XML "serializers" and the stream serializers. It contains a number of common fields and methods.


Field Summary
protected  char[]m_attrBuff
     A utility buffer for converting Strings passed to attribute methods to character arrays.
protected  AttributesImplSerializerm_attributes
     All the attributes of the current element, collected from startPrefixMapping() calls, or addAddtribute() calls, or from the SAX attributes in a startElement() call.
protected  Vectorm_cdataSectionElements
     Pairs of local names and corresponding URIs of CDATA sections.
protected  booleanm_cdataTagOpen
     True if a trailing "]]>" still needs to be written to be written out.
protected  char[]m_charsBuff
     A utility buffer for converting Strings passed to character() methods to character arrays.
protected  booleanm_doIndent
     Flag to tell if indenting (pretty-printing) is on.
protected  ElemContextm_elemContext
     A reference to "stack frame" corresponding to the current element.
protected  booleanm_inEntityRef
     Tells if we're in an EntityRef event.
protected  booleanm_inExternalDTD
    
protected  intm_indentAmount
     Amount to indent.
protected  booleanm_needToCallStartDocument
    
 booleanm_needToOutputDocTypeDecl
     Flag to tell that we need to add the doctype decl, which we can't do until the first element is encountered.
protected  NamespaceMappingsm_prefixMap
     Namespace support, that keeps track of currently defined prefix/uri mappings.
protected  SourceLocatorm_sourceLocator
    
protected  booleanm_standaloneWasSpecified
     True if standalone was specified.
protected  SerializerTracem_tracer
     Handle for firing generate events.
protected  java.io.Writerm_writer
     The writer to send output to.


Method Summary
public  voidaddAttribute(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute)
     Adds the given attribute to the set of collected attributes , but only if there is a currently open element. An element is currently open if a startElement() notification has occured but the start of the element has not yet been written to the output.
public  voidaddAttribute(String name, String value)
     Adds the given attribute to the set of collected attributes, but only if there is a currently open element.
public  voidaddAttribute(String uri, String localName, String rawName, String type, String value)
     This method adds an attribute the the current element, but should not be used for an xsl:attribute child.
public  booleanaddAttributeAlways(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute)
     Adds the given attribute to the set of attributes, even if there is no currently open element.
public  voidaddAttributes(Attributes atts)
     Add the given attributes to the currently collected ones.
public  voidaddXSLAttribute(String name, String value, String uri)
     Adds the given xsl:attribute to the set of collected attributes, but only if there is a currently open element.
public  ContentHandlerasContentHandler()
     Return a ContentHandler interface into this serializer.
public  DOMSerializerasDOMSerializer()
     Return a DOMSerializer interface into this serializer.
public  voidcharacters(org.w3c.dom.Node node)
     This method gets the nodes value as a String and uses that String as if it were an input character notification.
public  voidclose()
     Flush and close the underlying java.io.Writer.
public  voidcomment(String data)
     Receive notification of a comment.
public  voidendEntity(String name)
     Report the end of an entity.
public  voidentityReference(String name)
     Entity reference event.
public  voiderror(SAXParseException exc)
    
public  voidfatalError(SAXParseException exc)
    
protected  voidfireCDATAEvent(char[] chars, int start, int length)
    
protected  voidfireCharEvent(char[] chars, int start, int length)
    
protected  voidfireCommentEvent(char[] chars, int start, int length)
    
protected  voidfireEndDoc()
    
protected  voidfireEndElem(String name)
    
public  voidfireEndEntity(String name)
    
protected  voidfireEntityReference(String name)
    
protected  voidfireEscapingEvent(String name, String data)
    
protected  voidfireStartDoc()
    
protected  voidfireStartElem(String elemName)
     Report the start element trace event.
protected  voidfireStartEntity(String name)
    
public  StringgetDoctypePublic()
     Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD).
public  StringgetDoctypeSystem()
     Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD).
public  StringgetEncoding()
     Returns the character encoding to be used in the output document.
public  booleangetIndent()
    
public  intgetIndentAmount()
    
protected static  StringgetLocalName(String qname)
     Returns the local name of a qualified name.
public  StringgetMediaType()
     Gets the mediatype the media-type or MIME type associated with the output document.
public  NamespaceMappingsgetNamespaceMappings()
    
public  StringgetNamespaceURI(String qname, boolean isElement)
     Returns the URI of an element or attribute.
public  StringgetNamespaceURIFromPrefix(String prefix)
    
public  booleangetOmitXMLDeclaration()
    
public  StringgetPrefix(String namespaceURI)
     Returns the prefix currently pointing to the given URI (if any).
final protected static  StringgetPrefixPart(String qname)
     Returns the local name of a qualified name.
public  StringgetStandalone()
    
public  TransformergetTransformer()
    
public  StringgetVersion()
     Gets the version of the output format.
final  booleaninTemporaryOutputState()
     Returns true if the serializer is used for temporary output rather than final output.
protected  voidinitCDATA()
    
protected  booleanisCdataSection()
     Push a boolean state based on if the name of the current element is found in the list of qnames.
public  voidnamespaceAfterStartElement(String uri, String prefix)
     This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement().
public  voidnotationDecl(String arg0, String arg1, String arg2)
    
protected  StringpatchName(String qname)
     If at runtime, when the qname of the attribute is known, another prefix is specified for the attribute, then we can patch or hack the name with this method.
public  booleanreset()
    
public  voidsetDTDEntityExpansion(boolean expand)
     If set to false the serializer does not expand DTD entities, but leaves them as is, the default value is true.
public  voidsetDoctype(String doctypeSystem, String doctypePublic)
    
public  voidsetDoctypePublic(String doctypePublic)
     Set the value coming from the xsl:output doctype-public stylesheet attribute.
public  voidsetDoctypeSystem(String doctypeSystem)
     Set the value coming from the xsl:output doctype-system stylesheet attribute.
public  voidsetDocumentLocator(Locator locator)
     Receive an object for locating the origin of SAX document events.
Parameters:
  locator - An object that can return the location of any SAX documentevent.Receive an object for locating the origin of SAX document events.

SAX parsers are strongly encouraged (though not absolutelyrequired) to supply a locator: if it does so, it must supplythe locator to the application by invoking this method beforeinvoking any of the other methods in the DocumentHandlerinterface.

The locator allows the application to determine the endposition of any document-related event, even if the parser isnot reporting an error.

public  voidsetEncoding(String m_encoding)
     Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
public  voidsetIndent(boolean doIndent)
     Sets the value coming from the xsl:output indent stylesheet attribute.
public  voidsetIndentAmount(int m_indentAmount)
     Sets the indentation amount.
public  voidsetMediaType(String mediaType)
     Sets the value coming from the xsl:output media-type stylesheet attribute.
public  voidsetNamespaceMappings(NamespaceMappings mappings)
     Used only by TransformerSnapshotImpl to restore the serialization to a previous state.
public  voidsetOmitXMLDeclaration(boolean b)
    
public  voidsetSourceLocator(SourceLocator locator)
     This method is used to set the source locator, which might be used to generated an error message.
public  voidsetStandalone(String standalone)
     Sets the value coming from the xsl:output standalone stylesheet attribute.
Parameters:
  standalone - a value of "yes" indicates that thestandalone delaration is to be included in the outputdocument.
protected  voidsetStandaloneInternal(String standalone)
     Sets the XSL standalone attribute, but does not remember if this is a default or explicite setting.
public  voidsetTransformer(Transformer t)
    
public  voidsetVersion(String version)
     Sets the value coming from the xsl:output version attribute.
public  voidstartDocument()
     Receive notification of the beginning of a document.
protected  voidstartDocumentInternal()
     This method handles what needs to be done at a startDocument() call, whether from an external caller, or internally called in the serializer.
public  voidunparsedEntityDecl(String arg0, String arg1, String arg2, String arg3)
    
public  voidwarning(SAXParseException exc)
    

Field Detail
m_attrBuff
protected char[] m_attrBuff(Code)
A utility buffer for converting Strings passed to attribute methods to character arrays. Reusing this buffer means not creating a new character array everytime and it runs faster.



m_attributes
protected AttributesImplSerializer m_attributes(Code)
All the attributes of the current element, collected from startPrefixMapping() calls, or addAddtribute() calls, or from the SAX attributes in a startElement() call.



m_cdataSectionElements
protected Vector m_cdataSectionElements(Code)
Pairs of local names and corresponding URIs of CDATA sections. This list comes from the cdata-section-elements attribute. Every second one is a local name, and every other second one is the URI for the local name.



m_cdataTagOpen
protected boolean m_cdataTagOpen(Code)
True if a trailing "]]>" still needs to be written to be written out. Used to merge adjacent CDATA sections



m_charsBuff
protected char[] m_charsBuff(Code)
A utility buffer for converting Strings passed to character() methods to character arrays. Reusing this buffer means not creating a new character array everytime and it runs faster.



m_doIndent
protected boolean m_doIndent(Code)
Flag to tell if indenting (pretty-printing) is on.



m_elemContext
protected ElemContext m_elemContext(Code)
A reference to "stack frame" corresponding to the current element. Such a frame is pushed at a startElement() and popped at an endElement(). This frame contains information about the element, such as its namespace URI.



m_inEntityRef
protected boolean m_inEntityRef(Code)
Tells if we're in an EntityRef event.



m_inExternalDTD
protected boolean m_inExternalDTD(Code)
This flag is set while receiving events from the external DTD



m_indentAmount
protected int m_indentAmount(Code)
Amount to indent.



m_needToCallStartDocument
protected boolean m_needToCallStartDocument(Code)
true if we still need to call startDocumentInternal()



m_needToOutputDocTypeDecl
boolean m_needToOutputDocTypeDecl(Code)
Flag to tell that we need to add the doctype decl, which we can't do until the first element is encountered.



m_prefixMap
protected NamespaceMappings m_prefixMap(Code)
Namespace support, that keeps track of currently defined prefix/uri mappings. As processed elements come and go, so do the associated mappings for that element.



m_sourceLocator
protected SourceLocator m_sourceLocator(Code)



m_standaloneWasSpecified
protected boolean m_standaloneWasSpecified(Code)
True if standalone was specified.



m_tracer
protected SerializerTrace m_tracer(Code)
Handle for firing generate events. This interface may be implemented by the referenced transformer object.



m_writer
protected java.io.Writer m_writer(Code)
The writer to send output to. This field is only used in the ToStream serializers, but exists here just so that the fireStartDoc() and other fire... methods can flush this writer when tracing.





Method Detail
addAttribute
public void addAttribute(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute) throws SAXException(Code)
Adds the given attribute to the set of collected attributes , but only if there is a currently open element. An element is currently open if a startElement() notification has occured but the start of the element has not yet been written to the output. In the stream case this means that we have not yet been forced to close the elements opening tag by another notification, such as a character notification.
Parameters:
  uri - the URI of the attribute
Parameters:
  localName - the local name of the attribute
Parameters:
  rawName - the qualified name of the attribute
Parameters:
  type - the type of the attribute (probably CDATA)
Parameters:
  value - the value of the attribute
Parameters:
  XSLAttribute - true if this attribute is coming from an xsl:attriute element
See Also:   ExtendedContentHandler.addAttribute(StringStringStringStringString)



addAttribute
public void addAttribute(String name, String value)(Code)
Adds the given attribute to the set of collected attributes, but only if there is a currently open element.
Parameters:
  name - the attribute's qualified name
Parameters:
  value - the value of the attribute



addAttribute
public void addAttribute(String uri, String localName, String rawName, String type, String value) throws SAXException(Code)
This method adds an attribute the the current element, but should not be used for an xsl:attribute child.
See Also:   ExtendedContentHandler.addAttribute(java.lang.Stringjava.lang.Stringjava.lang.Stringjava.lang.Stringjava.lang.String)



addAttributeAlways
public boolean addAttributeAlways(String uri, String localName, String rawName, String type, String value, boolean XSLAttribute)(Code)
Adds the given attribute to the set of attributes, even if there is no currently open element. This is useful if a SAX startPrefixMapping() should need to add an attribute before the element name is seen.
Parameters:
  uri - the URI of the attribute
Parameters:
  localName - the local name of the attribute
Parameters:
  rawName - the qualified name of the attribute
Parameters:
  type - the type of the attribute (probably CDATA)
Parameters:
  value - the value of the attribute
Parameters:
  XSLAttribute - true if this attribute is coming from an xsl:attribute element true if the attribute was added, false if an existing value was replaced.



addAttributes
public void addAttributes(Attributes atts) throws SAXException(Code)
Add the given attributes to the currently collected ones. These attributes are always added, regardless of whether on not an element is currently open.
Parameters:
  atts - List of attributes to add to this list



addXSLAttribute
public void addXSLAttribute(String name, String value, String uri)(Code)
Adds the given xsl:attribute to the set of collected attributes, but only if there is a currently open element.
Parameters:
  name - the attribute's qualified name (prefix:localName)
Parameters:
  value - the value of the attribute
Parameters:
  uri - the URI that the prefix of the name points to



asContentHandler
public ContentHandler asContentHandler() throws IOException(Code)
Return a ContentHandler interface into this serializer. If the serializer does not support the ContentHandler interface, it should return null. A ContentHandler interface into this serializer,or null if the serializer is not SAX 2 capable
throws:
  IOException - An I/O exception occured



asDOMSerializer
public DOMSerializer asDOMSerializer() throws IOException(Code)
Return a DOMSerializer interface into this serializer. If the serializer does not support the DOMSerializer interface, it should return null. A DOMSerializer interface into this serializer, or nullif the serializer is not DOM capable
throws:
  IOException - An I/O exception occured
See Also:   Serializer.asDOMSerializer



characters
public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException(Code)
This method gets the nodes value as a String and uses that String as if it were an input character notification.
Parameters:
  node - the Node to serialize
throws:
  org.xml.sax.SAXException -



close
public void close()(Code)
Flush and close the underlying java.io.Writer. This method applies to ToStream serializers, not ToSAXHandler serializers.
See Also:   ToStream



comment
public void comment(String data) throws SAXException(Code)
Receive notification of a comment.
See Also:   ExtendedLexicalHandler.comment(String)



endEntity
public void endEntity(String name) throws org.xml.sax.SAXException(Code)
Report the end of an entity.
Parameters:
  name - The name of the entity that is ending.
throws:
  org.xml.sax.SAXException - The application may raise an exception.
See Also:   SerializerBase.startEntity



entityReference
public void entityReference(String name) throws org.xml.sax.SAXException(Code)
Entity reference event.
Parameters:
  name - Name of entity
throws:
  org.xml.sax.SAXException -



error
public void error(SAXParseException exc) throws SAXException(Code)

See Also:   org.xml.sax.ErrorHandler.error(SAXParseException)



fatalError
public void fatalError(SAXParseException exc) throws SAXException(Code)

See Also:   org.xml.sax.ErrorHandler.fatalError(SAXParseException)



fireCDATAEvent
protected void fireCDATAEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException(Code)
Report the CDATA trace event
Parameters:
  chars - content of CDATA
Parameters:
  start - starting index of characters to output
Parameters:
  length - number of characters to output



fireCharEvent
protected void fireCharEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException(Code)
Report the characters trace event
Parameters:
  chars - content of characters
Parameters:
  start - starting index of characters to output
Parameters:
  length - number of characters to output



fireCommentEvent
protected void fireCommentEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException(Code)
Report the comment trace event
Parameters:
  chars - content of comment
Parameters:
  start - starting index of comment to output
Parameters:
  length - number of characters to output



fireEndDoc
protected void fireEndDoc() throws org.xml.sax.SAXException(Code)
To fire off end document trace event



fireEndElem
protected void fireEndElem(String name) throws org.xml.sax.SAXException(Code)
To fire off the end element trace event
Parameters:
  name - Name of element



fireEndEntity
public void fireEndEntity(String name) throws org.xml.sax.SAXException(Code)
To fire off end entity trace event
Parameters:
  name - Name of entity



fireEntityReference
protected void fireEntityReference(String name) throws org.xml.sax.SAXException(Code)
To fire off the entity reference trace event
Parameters:
  name - Name of entity reference



fireEscapingEvent
protected void fireEscapingEvent(String name, String data) throws org.xml.sax.SAXException(Code)
To fire off the PI trace event
Parameters:
  name - Name of PI



fireStartDoc
protected void fireStartDoc() throws org.xml.sax.SAXException(Code)
To fire off start document trace event



fireStartElem
protected void fireStartElem(String elemName) throws org.xml.sax.SAXException(Code)
Report the start element trace event. This trace method needs to be called just before the attributes are cleared.
Parameters:
  elemName - the qualified name of the element



fireStartEntity
protected void fireStartEntity(String name) throws org.xml.sax.SAXException(Code)
To fire off start entity trace event
Parameters:
  name - Name of entity



getDoctypePublic
public String getDoctypePublic()(Code)
Returns the previously set value of the value to be used as the public identifier in the document type declaration (DTD). the public identifier to be used in the DOCTYPE declaration in theoutput document.



getDoctypeSystem
public String getDoctypeSystem()(Code)
Returns the previously set value of the value to be used as the system identifier in the document type declaration (DTD). the system identifier to be used in the DOCTYPE declaration inthe output document.



getEncoding
public String getEncoding()(Code)
Returns the character encoding to be used in the output document. the character encoding to be used in the output document.



getIndent
public boolean getIndent()(Code)
true if the output document should be indented to visuallyindicate its structure.



getIndentAmount
public int getIndentAmount()(Code)
the number of spaces to indent for each indentation level.



getLocalName
protected static String getLocalName(String qname)(Code)
Returns the local name of a qualified name. If the name has no prefix, then it works as the identity (SAX2).
Parameters:
  qname - the qualified name the name, but excluding any prefix and colon.



getMediaType
public String getMediaType()(Code)
Gets the mediatype the media-type or MIME type associated with the output document. the mediatype the media-type or MIME type associated with theoutput document.



getNamespaceMappings
public NamespaceMappings getNamespaceMappings()(Code)
Some users of the serializer may need the current namespace mappings the current namespace mappings (prefix/uri)
See Also:   ExtendedContentHandler.getNamespaceMappings



getNamespaceURI
public String getNamespaceURI(String qname, boolean isElement)(Code)
Returns the URI of an element or attribute. Note that default namespaces do not apply directly to attributes.
Parameters:
  qname - a qualified name
Parameters:
  isElement - true if the qualified name is the name of an element. returns the namespace URI associated with the qualified name.



getNamespaceURIFromPrefix
public String getNamespaceURIFromPrefix(String prefix)(Code)
Returns the URI of prefix (if any)
Parameters:
  prefix - the prefix whose URI is searched for the namespace URI currently associated with theprefix, null if the prefix is undefined.



getOmitXMLDeclaration
public boolean getOmitXMLDeclaration()(Code)
true if the XML declaration is to be omitted from the outputdocument.



getPrefix
public String getPrefix(String namespaceURI)(Code)
Returns the prefix currently pointing to the given URI (if any).
Parameters:
  namespaceURI - the uri of the namespace in question a prefix pointing to the given URI (if any).
See Also:   ExtendedContentHandler.getPrefix(String)



getPrefixPart
final protected static String getPrefixPart(String qname)(Code)
Returns the local name of a qualified name. If the name has no prefix, then it works as the identity (SAX2).
Parameters:
  qname - a qualified name returns the prefix of the qualified name,or null if there is no prefix.



getStandalone
public String getStandalone()(Code)
Gets the XSL standalone attribute a value of "yes" if the standalone delaration is tobe included in the output document.
See Also:   XSLOutputAttributes.getStandalone



getTransformer
public Transformer getTransformer()(Code)
Gets the transformer associated with this serializer returns the transformer associated with this serializer.
See Also:   SerializationHandler.getTransformer



getVersion
public String getVersion()(Code)
Gets the version of the output format. the version of the output format.



inTemporaryOutputState
final boolean inTemporaryOutputState()(Code)
Returns true if the serializer is used for temporary output rather than final output. This concept is made clear in the XSLT 2.0 draft.



initCDATA
protected void initCDATA()(Code)
Initialize global variables



isCdataSection
protected boolean isCdataSection()(Code)
Push a boolean state based on if the name of the current element is found in the list of qnames. A state is only pushed if there were some cdata-section-names were specified.

Hidden parameters are the vector of qualified elements specified in cdata-section-names attribute, and the m_cdataSectionStates stack onto which whether the current element is in the list is pushed (true or false). Other hidden parameters are the current elements namespaceURI, localName and qName




namespaceAfterStartElement
public void namespaceAfterStartElement(String uri, String prefix) throws SAXException(Code)
This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). startPrefixMapping(prefix,uri) would be used before the startElement() call.
Parameters:
  uri - the URI of the namespace
Parameters:
  prefix - the prefix associated with the given URI.
See Also:   ExtendedContentHandler.namespaceAfterStartElement(StringString)



notationDecl
public void notationDecl(String arg0, String arg1, String arg2) throws SAXException(Code)

See Also:   org.xml.sax.DTDHandler.notationDecl(java.lang.Stringjava.lang.Stringjava.lang.String)



patchName
protected String patchName(String qname)(Code)
If at runtime, when the qname of the attribute is known, another prefix is specified for the attribute, then we can patch or hack the name with this method. For a qname of the form "ns?:otherprefix:name", this function patches the qname by simply ignoring "otherprefix". TODO: This method is a HACK! We do not have access to the XML file, it sometimes generates a NS prefix of the form "ns?" for an attribute.



reset
public boolean reset()(Code)



setDTDEntityExpansion
public void setDTDEntityExpansion(boolean expand)(Code)
If set to false the serializer does not expand DTD entities, but leaves them as is, the default value is true.



setDoctype
public void setDoctype(String doctypeSystem, String doctypePublic)(Code)
Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties
Parameters:
  doctypeSystem - the system identifier to be used in the DOCTYPEdeclaration in the output document.
Parameters:
  doctypePublic - the public identifier to be used in the DOCTYPEdeclaration in the output document.



setDoctypePublic
public void setDoctypePublic(String doctypePublic)(Code)
Set the value coming from the xsl:output doctype-public stylesheet attribute.
Parameters:
  doctypePublic - the public identifier to be used in the DOCTYPEdeclaration in the output document.



setDoctypeSystem
public void setDoctypeSystem(String doctypeSystem)(Code)
Set the value coming from the xsl:output doctype-system stylesheet attribute.
Parameters:
  doctypeSystem - the system identifier to be used in the DOCTYPEdeclaration in the output document.



setDocumentLocator
public void setDocumentLocator(Locator locator)(Code)
Receive an object for locating the origin of SAX document events.
Parameters:
  locator - An object that can return the location of any SAX documentevent.Receive an object for locating the origin of SAX document events.

SAX parsers are strongly encouraged (though not absolutelyrequired) to supply a locator: if it does so, it must supplythe locator to the application by invoking this method beforeinvoking any of the other methods in the DocumentHandlerinterface.

The locator allows the application to determine the endposition of any document-related event, even if the parser isnot reporting an error. Typically, the application willuse this information for reporting its own errors (such ascharacter content that does not match an application'sbusiness rules). The information returned by the locatoris probably not sufficient for use with a search engine.

Note that the locator will return correct information onlyduring the invocation of the events in this interface. Theapplication should not attempt to use it at any other time.




setEncoding
public void setEncoding(String m_encoding)(Code)
Sets the character encoding coming from the xsl:output encoding stylesheet attribute.
Parameters:
  m_encoding - the character encoding



setIndent
public void setIndent(boolean doIndent)(Code)
Sets the value coming from the xsl:output indent stylesheet attribute.
Parameters:
  doIndent - true if the output document should be indented tovisually indicate its structure.
See Also:   XSLOutputAttributes.setIndent(boolean)



setIndentAmount
public void setIndentAmount(int m_indentAmount)(Code)
Sets the indentation amount.
Parameters:
  m_indentAmount - The m_indentAmount to set



setMediaType
public void setMediaType(String mediaType)(Code)
Sets the value coming from the xsl:output media-type stylesheet attribute.
Parameters:
  mediaType - the non-null media-type or MIME type associated with theoutput document.
See Also:   javax.xml.transform.OutputKeys.MEDIA_TYPE
See Also:   SerializationHandler.setMediaType(String)



setNamespaceMappings
public void setNamespaceMappings(NamespaceMappings mappings)(Code)
Used only by TransformerSnapshotImpl to restore the serialization to a previous state.
Parameters:
  mappings - NamespaceMappings



setOmitXMLDeclaration
public void setOmitXMLDeclaration(boolean b)(Code)
Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute
Parameters:
  b - true if the XML declaration is to be omitted from the outputdocument.



setSourceLocator
public void setSourceLocator(SourceLocator locator)(Code)
This method is used to set the source locator, which might be used to generated an error message.
Parameters:
  locator - the source locator
See Also:   ExtendedContentHandler.setSourceLocator(javax.xml.transform.SourceLocator)



setStandalone
public void setStandalone(String standalone)(Code)
Sets the value coming from the xsl:output standalone stylesheet attribute.
Parameters:
  standalone - a value of "yes" indicates that thestandalone delaration is to be included in the outputdocument. This method remembers if the value was explicitly set usingthis method, verses if the value is the default value.



setStandaloneInternal
protected void setStandaloneInternal(String standalone)(Code)
Sets the XSL standalone attribute, but does not remember if this is a default or explicite setting.
Parameters:
  standalone - "yes" | "no"



setTransformer
public void setTransformer(Transformer t)(Code)
Sets the transformer associated with this serializer
Parameters:
  t - the transformer associated with this serializer.
See Also:   SerializationHandler.setTransformer(Transformer)



setVersion
public void setVersion(String version)(Code)
Sets the value coming from the xsl:output version attribute.
Parameters:
  version - the version of the output format.
See Also:   SerializationHandler.setVersion(String)



startDocument
public void startDocument() throws org.xml.sax.SAXException(Code)
Receive notification of the beginning of a document. This method is never a self generated call, but only called externally.

The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).


throws:
  org.xml.sax.SAXException - Any SAX exception, possiblywrapping another exception.
throws:
  org.xml.sax.SAXException -



startDocumentInternal
protected void startDocumentInternal() throws org.xml.sax.SAXException(Code)
This method handles what needs to be done at a startDocument() call, whether from an external caller, or internally called in the serializer. For historical reasons the serializer is flexible to startDocument() not always being called. Even if no external call is made into startDocument() this method will always be called as a self generated internal startDocument, it handles what needs to be done at a startDocument() call. This method exists just to make sure that startDocument() is only ever called from an external caller, which in principle is just a matter of style.
throws:
  SAXException -



unparsedEntityDecl
public void unparsedEntityDecl(String arg0, String arg1, String arg2, String arg3) throws SAXException(Code)

See Also:   org.xml.sax.DTDHandler.unparsedEntityDecl(java.lang.Stringjava.lang.Stringjava.lang.Stringjava.lang.String)



warning
public void warning(SAXParseException exc) throws SAXException(Code)

See Also:   org.xml.sax.ErrorHandler.warning(SAXParseException)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.