Java Doc for DTDEventListener.java in  » 6.0-JDK-Modules » jaxb-xjc » com » sun » xml » dtdparser » 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 » 6.0 JDK Modules » jaxb xjc » com.sun.xml.dtdparser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.xml.dtdparser.DTDEventListener

All known Subclasses:   com.sun.xml.dtdparser.DTDHandlerBase,
DTDEventListener
public interface DTDEventListener extends EventListener(Code)
All DTD parsing events are signaled through this interface.


Field Summary
final public  shortCHOICE
    
final public  shortCONTENT_MODEL_ANY
    
final public  shortCONTENT_MODEL_CHILDREN
    
final public  shortCONTENT_MODEL_EMPTY
    
final public  shortCONTENT_MODEL_MIXED
    
final public  shortOCCURENCE_ONCE
    
final public  shortOCCURENCE_ONE_OR_MORE
    
final public  shortOCCURENCE_ZERO_OR_MORE
    
final public  shortOCCURENCE_ZERO_OR_ONE
    
final public  shortSEQUENCE
    
final public  shortUSE_FIXED
    
final public  shortUSE_IMPLIED
    
final public  shortUSE_NORMAL
    
final public  shortUSE_REQUIRED
    


Method Summary
public  voidattributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue)
     For each entry in an ATTLIST declaration, this event will be fired.

DTD allows the same attributes to be declared more than once, and in that case the first one wins.

public  voidcharacters(char ch, int start, int length)
     Receive notification of character data.

The Parser will call this method to report each chunk of character data.

public  voidchildElement(String elementName, short occurence)
    
public  voidcomment(String text)
     Receive notification that a comment has been read.
public  voidconnector(short connectorType)
     Connectors in one model group is guaranteed to be the same.
public  voidendCDATA()
     Receive notification that the CDATA section finished.
public  voidendContentModel(String elementName, short contentModelType)
     receives notification that parsing of content model is finished.
public  voidendDTD()
     Receive notification of the end of a DTD.
public  voidendModelGroup(short occurence)
    
public  voiderror(SAXParseException e)
    
public  voidexternalGeneralEntityDecl(String name, String publicId, String systemId)
     Receive notification of an external parsed general entity declaration event.
public  voidexternalParameterEntityDecl(String name, String publicId, String systemId)
     Receive notification of an external parameter entity declaration event.
public  voidfatalError(SAXParseException e)
    
public  voidignorableWhitespace(char ch, int start, int length)
     Receive notification of ignorable whitespace in element content.
public  voidinternalGeneralEntityDecl(String name, String value)
     Receive notification of a internal general entity declaration event.
Parameters:
  name - The internal general entity name.
Parameters:
  value - The value of the entity, which may include unexpandedentity references.
public  voidinternalParameterEntityDecl(String name, String value)
     Receive notification of a internal parameter entity declaration event.
Parameters:
  name - The internal parameter entity name.
Parameters:
  value - The value of the entity, which may include unexpandedentity references.
public  voidmixedElement(String elementName)
     receives notification of child element of mixed content model.
public  voidnotationDecl(String name, String publicId, String systemId)
     Receive notification of a Notation Declaration.
public  voidprocessingInstruction(String target, String data)
     Receive notification of a Processing Instruction.
public  voidsetDocumentLocator(Locator loc)
    
public  voidstartCDATA()
     Receive notification that a CDATA section is beginning.
public  voidstartContentModel(String elementName, short contentModelType)
     receives notification that parsing of content model is beginning.
Parameters:
  elementName - name of the element whose content model is going to be defined.
Parameters:
  contentModelType - DTDEventListener.CONTENT_MODEL_EMPTYthis element has EMPTY content model.
public  voidstartDTD(InputEntity in)
     Receive notification of the beginning of the DTD.
public  voidstartModelGroup()
    
public  voidunparsedEntityDecl(String name, String publicId, String systemId, String notationName)
     Receive notification of an unparsed entity declaration.
public  voidwarning(SAXParseException err)
    

Field Detail
CHOICE
final public short CHOICE(Code)



CONTENT_MODEL_ANY
final public short CONTENT_MODEL_ANY(Code)



CONTENT_MODEL_CHILDREN
final public short CONTENT_MODEL_CHILDREN(Code)



CONTENT_MODEL_EMPTY
final public short CONTENT_MODEL_EMPTY(Code)



CONTENT_MODEL_MIXED
final public short CONTENT_MODEL_MIXED(Code)



OCCURENCE_ONCE
final public short OCCURENCE_ONCE(Code)



OCCURENCE_ONE_OR_MORE
final public short OCCURENCE_ONE_OR_MORE(Code)



OCCURENCE_ZERO_OR_MORE
final public short OCCURENCE_ZERO_OR_MORE(Code)



OCCURENCE_ZERO_OR_ONE
final public short OCCURENCE_ZERO_OR_ONE(Code)



SEQUENCE
final public short SEQUENCE(Code)



USE_FIXED
final public short USE_FIXED(Code)



USE_IMPLIED
final public short USE_IMPLIED(Code)



USE_NORMAL
final public short USE_NORMAL(Code)



USE_REQUIRED
final public short USE_REQUIRED(Code)





Method Detail
attributeDecl
public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) throws SAXException(Code)
For each entry in an ATTLIST declaration, this event will be fired.

DTD allows the same attributes to be declared more than once, and in that case the first one wins. I think this method will be only fired for the first one, but I need to check.




characters
public void characters(char ch, int start, int length) throws SAXException(Code)
Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).


Parameters:
  ch - The characters from the DTD.
Parameters:
  start - The start position in the array.
Parameters:
  length - The number of characters to read from the array.
throws:
  SAXException -
See Also:   DTDEventListener.ignorableWhitespace(char[],int,int)



childElement
public void childElement(String elementName, short occurence) throws SAXException(Code)



comment
public void comment(String text) throws SAXException(Code)
Receive notification that a comment has been read.

Note that processing instructions are the mechanism designed to hold information for consumption by applications, not comments. XML systems may rely on applications being able to access information found in processing instructions; this is not true of comments, which are typically discarded.
Parameters:
  text - the text within the comment delimiters.
throws:
  SAXException -




connector
public void connector(short connectorType) throws SAXException(Code)
Connectors in one model group is guaranteed to be the same.

IOW, you'll never see an event sequence like (a|b,c) DTDEventListener.CHOICE or DTDEventListener.SEQUENCE.




endCDATA
public void endCDATA() throws SAXException(Code)
Receive notification that the CDATA section finished.
throws:
  SAXException -
See Also:   DTDEventListener.startCDATA()



endContentModel
public void endContentModel(String elementName, short contentModelType) throws SAXException(Code)
receives notification that parsing of content model is finished.



endDTD
public void endDTD() throws SAXException(Code)
Receive notification of the end of a DTD. The parser will invoke this method only once.
throws:
  SAXException -
See Also:   DTDEventListener.startDTD(InputEntity)



endModelGroup
public void endModelGroup(short occurence) throws SAXException(Code)



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



externalGeneralEntityDecl
public void externalGeneralEntityDecl(String name, String publicId, String systemId) throws SAXException(Code)
Receive notification of an external parsed general entity declaration event.

If a system identifier is present, and it is a relative URL, the parser will have resolved it fully before passing it through this method to a listener.


Parameters:
  name - The entity name.
Parameters:
  publicId - The entity's public identifier, or null ifnone was given.
Parameters:
  systemId - The entity's system identifier.
throws:
  SAXException -
See Also:   DTDEventListener.unparsedEntityDecl(String,String,String,String)



externalParameterEntityDecl
public void externalParameterEntityDecl(String name, String publicId, String systemId) throws SAXException(Code)
Receive notification of an external parameter entity declaration event.

If a system identifier is present, and it is a relative URL, the parser will have resolved it fully before passing it through this method to a listener.


Parameters:
  name - The parameter entity name.
Parameters:
  publicId - The entity's public identifier, or null ifnone was given.
Parameters:
  systemId - The entity's system identifier.
throws:
  SAXException -
See Also:   DTDEventListener.unparsedEntityDecl(String,String,String,String)



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



ignorableWhitespace
public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)
Receive notification of ignorable whitespace in element content.

Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.


Parameters:
  ch - The characters from the DTD.
Parameters:
  start - The start position in the array.
Parameters:
  length - The number of characters to read from the array.
throws:
  SAXException -
See Also:   DTDEventListener.characters(char[],int,int)



internalGeneralEntityDecl
public void internalGeneralEntityDecl(String name, String value) throws SAXException(Code)
Receive notification of a internal general entity declaration event.
Parameters:
  name - The internal general entity name.
Parameters:
  value - The value of the entity, which may include unexpandedentity references. Character references will have beenexpanded.
throws:
  SAXException -
See Also:   DTDEventListener.externalGeneralEntityDecl(String,String,String)



internalParameterEntityDecl
public void internalParameterEntityDecl(String name, String value) throws SAXException(Code)
Receive notification of a internal parameter entity declaration event.
Parameters:
  name - The internal parameter entity name.
Parameters:
  value - The value of the entity, which may include unexpandedentity references. Character references will have beenexpanded.
throws:
  SAXException -
See Also:   DTDEventListener.externalParameterEntityDecl(String,String,String)



mixedElement
public void mixedElement(String elementName) throws SAXException(Code)
receives notification of child element of mixed content model. this method is called for each child element.
See Also:   DTDEventListener.startContentModel(String,short)



notationDecl
public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)
Receive notification of a Notation Declaration. Notation declarations are used by elements and entities for identifying embedded non-XML data.
Parameters:
  name - The notation name, referred to by entities andelements.
Parameters:
  publicId - The public identifier
Parameters:
  systemId - The system identifier



processingInstruction
public void processingInstruction(String target, String data) throws SAXException(Code)
Receive notification of a Processing Instruction. Processing instructions contain information meaningful to the application.
Parameters:
  target - The target of the proceessing instructionwhich should have meaning to the application.
Parameters:
  data - The instruction itself which should containvalid XML characters.
throws:
  SAXException -



setDocumentLocator
public void setDocumentLocator(Locator loc)(Code)



startCDATA
public void startCDATA() throws SAXException(Code)
Receive notification that a CDATA section is beginning. Data in a CDATA section is is reported through the appropriate event, either characters() or ignorableWhitespace.
throws:
  SAXException -
See Also:   DTDEventListener.endCDATA()



startContentModel
public void startContentModel(String elementName, short contentModelType) throws SAXException(Code)
receives notification that parsing of content model is beginning.
Parameters:
  elementName - name of the element whose content model is going to be defined.
Parameters:
  contentModelType - DTDEventListener.CONTENT_MODEL_EMPTYthis element has EMPTY content model. This notificationwill be immediately followed by the corresponding endContentModel.DTDEventListener.CONTENT_MODEL_ANYthis element has ANY content model. This notificationwill be immediately followed by the corresponding endContentModel.DTDEventListener.CONTENT_MODEL_MIXEDthis element has mixed content model. #PCDATA will not be reported.each child element will be reported by mixedElement method.DTDEventListener.CONTENT_MODEL_CHILDRENthis elemen has child content model. The actual content model willbe reported by childElement, startModelGroup, endModelGroup, andconnector methods. Possible call sequences are:

START := MODEL_GROUPMODEL_GROUP := startModelGroup TOKEN (connector TOKEN)* endModelGroupTOKEN := childElement| MODEL_GROUP




startDTD
public void startDTD(InputEntity in) throws SAXException(Code)
Receive notification of the beginning of the DTD.
Parameters:
  in - Current input entity.
See Also:   DTDEventListener.endDTD()



startModelGroup
public void startModelGroup() throws SAXException(Code)



unparsedEntityDecl
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)
Receive notification of an unparsed entity declaration. Unparsed entities are non-XML data.
Parameters:
  name - The name of the unparsed entity.
Parameters:
  publicId - The public identifier
Parameters:
  systemId - The system identifier
Parameters:
  notationName - The associated notation



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



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