File: Poco.XML.LexicalHandler.html

package info (click to toggle)
poco-doc 1.3.6-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 10,076 kB
  • ctags: 9,611
  • sloc: makefile: 31
file content (100 lines) | stat: -rw-r--r-- 10,761 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::XML::LexicalHandler</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.XML.html" class="namespace">Poco::XML</a></h1>
<h1 class="symbol">class LexicalHandler</h1>
</div>
<div class="body">
<p>
<b>Library:</b> XML<br />
<b>Package:</b> SAX<br />
<b>Header:</b> Poco/SAX/LexicalHandler.h</p>
<h2>Description</h2>
<div class="description">
<p>This is an optional extension handler for SAX2 to provide lexical information  about an <a href="Poco.XML.html" title="namespace Poco::XML">XML</a> document, such as comments and CDATA section boundaries.  <a href="Poco.XML.html" title="namespace Poco::XML">XML</a> readers are not required to recognize this handler, and it is not part of  core-only SAX2 distributions. </p>
<p>The events in the lexical handler apply to the entire document, not just to the  document element, and all lexical handler events must appear between the content  handler's startDocument and endDocument events. </p>
<p>To set the <a href="Poco.XML.LexicalHandler.html" title="class Poco::XML::LexicalHandler">LexicalHandler</a> for an <a href="Poco.XML.html" title="namespace Poco::XML">XML</a> reader, use the setProperty method with the  property name <a href="http://xml.org/sax/properties/lexical-handler" target="_blank">http://xml.org/sax/properties/lexical-handler</a> and an object implementing  this interface (or null) as the value. If the reader does not report lexical events,  it will throw a <a href="Poco.XML.SAXNotRecognizedException.html" title="class Poco::XML::SAXNotRecognizedException">SAXNotRecognizedException</a> when you attempt to register the handler. </p>
</div>
<h2>Inheritance</h2>
<p><b>Known Derived Classes: </b><a href="Poco.XML.DOMBuilder.html" title="class Poco::XML::DOMBuilder">DOMBuilder</a>, <a href="Poco.XML.WhitespaceFilter.html" title="class Poco::XML::WhitespaceFilter">WhitespaceFilter</a>, <a href="Poco.XML.XMLWriter.html" title="class Poco::XML::XMLWriter">XMLWriter</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.XML.LexicalHandler.html#19037" title="Poco::XML::LexicalHandler::comment()">comment</a>, <a href="Poco.XML.LexicalHandler.html#19036" title="Poco::XML::LexicalHandler::endCDATA()">endCDATA</a>, <a href="Poco.XML.LexicalHandler.html#19030" title="Poco::XML::LexicalHandler::endDTD()">endDTD</a>, <a href="Poco.XML.LexicalHandler.html#19033" title="Poco::XML::LexicalHandler::endEntity()">endEntity</a>, <a href="Poco.XML.LexicalHandler.html#19035" title="Poco::XML::LexicalHandler::startCDATA()">startCDATA</a>, <a href="Poco.XML.LexicalHandler.html#19026" title="Poco::XML::LexicalHandler::startDTD()">startDTD</a>, <a href="Poco.XML.LexicalHandler.html#19031" title="Poco::XML::LexicalHandler::startEntity()">startEntity</a></p>
<h2>Destructor</h2>
<h3><a name="19041">~LexicalHandler</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.XML.LexicalHandler.html" title="class Poco::XML::LexicalHandler">LexicalHandler</a>();</p>
<div class="description">
<p></p>
</div>
<h2>Member Functions</h2>
<h3><a name="19037">comment</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void comment(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.XML.html#19840" title="Poco::XML::XMLChar">XMLChar</a> ch[],<br />&nbsp;&nbsp;&nbsp;&nbsp;int start,<br />&nbsp;&nbsp;&nbsp;&nbsp;int length<br />) = 0;</p>
<div class="description">
<p>Report an <a href="Poco.XML.html" title="namespace Poco::XML">XML</a> comment anywhere in the document. </p>
<p>This callback will be used for comments inside or outside the document element,  including comments in the external DTD subset (if read). Comments in the DTD must  be properly nested inside start/endDTD and start/endEntity events (if used). </p>
</div>
<h3><a name="19036">endCDATA</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void endCDATA() = 0;</p>
<div class="description">
<p>Report the end of a CDATA section. </p>
</div>
<h3><a name="19030">endDTD</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void endDTD() = 0;</p>
<div class="description">
<p>Report the end of DTD declarations. </p>
<p>This method is intended to report the end of the DOCTYPE declaration; if the document  has no DOCTYPE declaration, this method will not be invoked. </p>
</div>
<h3><a name="19033">endEntity</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void endEntity(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.XML.html#19841" title="Poco::XML::XMLString">XMLString</a> &amp; name<br />) = 0;</p>
<div class="description">
<p>Report the end of an entity. </p>
</div>
<h3><a name="19035">startCDATA</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void startCDATA() = 0;</p>
<div class="description">
<p>Report the start of a CDATA section. </p>
<p>The contents of the CDATA section will be reported through the regular characters event;  this event is intended only to report the boundary. </p>
</div>
<h3><a name="19026">startDTD</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void startDTD(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.XML.html#19841" title="Poco::XML::XMLString">XMLString</a> &amp; name,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.XML.html#19841" title="Poco::XML::XMLString">XMLString</a> &amp; publicId,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.XML.html#19841" title="Poco::XML::XMLString">XMLString</a> &amp; systemId<br />) = 0;</p>
<div class="description">
<p>Report the start of DTD declarations, if any. </p>
<p>This method is intended to report the beginning of the DOCTYPE declaration;  if the document has no DOCTYPE declaration, this method will not be invoked. </p>
<p>All declarations reported through <a href="Poco.XML.DTDHandler.html" title="class Poco::XML::DTDHandler">DTDHandler</a> or <a href="Poco.XML.DeclHandler.html" title="class Poco::XML::DeclHandler">DeclHandler</a> events must appear  between the startDTD and endDTD events. Declarations are assumed to belong to  the internal DTD subset unless they appear between startEntity and endEntity  events. Comments and processing instructions from the DTD should also be reported  between the startDTD and endDTD events, in their original order of (logical) occurrence;  they are not required to appear in their correct locations relative to <a href="Poco.XML.DTDHandler.html" title="class Poco::XML::DTDHandler">DTDHandler</a> or  <a href="Poco.XML.DeclHandler.html" title="class Poco::XML::DeclHandler">DeclHandler</a> events, however. </p>
<p>Note that the start/endDTD events will appear within the start/endDocument events from  <a href="Poco.XML.ContentHandler.html" title="class Poco::XML::ContentHandler">ContentHandler</a> and before the first startElement event. </p>
</div>
<h3><a name="19031">startEntity</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void startEntity(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.XML.html#19841" title="Poco::XML::XMLString">XMLString</a> &amp; name<br />) = 0;</p>
<div class="description">
<p>Report the beginning of some internal and external <a href="Poco.XML.html" title="namespace Poco::XML">XML</a> entities. </p>
<p>The reporting of parameter entities (including the external DTD subset) is optional,  and SAX2 drivers that report <a href="Poco.XML.LexicalHandler.html" title="class Poco::XML::LexicalHandler">LexicalHandler</a> events may not implement it; you can use the  <a href="http://xml.org/sax/features/lexical-handler/parameter-entities" target="_blank">http://xml.org/sax/features/lexical-handler/parameter-entities</a> feature to query or control  the reporting of parameter entities. </p>
<p>General entities are reported with their regular names, parameter entities have '%'  prepended to their names, and the external DTD subset has the pseudo-entity name &quot;[dtd]&quot;. </p>
<p>When a SAX2 driver is providing these events, all other events must be properly nested  within start/end entity events. There is no additional requirement that events from  <a href="Poco.XML.DeclHandler.html" title="class Poco::XML::DeclHandler">DeclHandler</a> or <a href="Poco.XML.DTDHandler.html" title="class Poco::XML::DTDHandler">DTDHandler</a> be properly ordered. </p>
<p>Note that skipped entities will be reported through the skippedEntity event, which is part of  the <a href="Poco.XML.ContentHandler.html" title="class Poco::XML::ContentHandler">ContentHandler</a> interface. </p>
<p>Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under  any circumstances: </p>
<p></p>
<ul>
<li>general entities within attribute values </li>
<li>parameter entities within declarations </li>
</ul>
<p>These will be silently expanded, with no indication of where the original entity boundaries were. </p>
<p>Note also that the boundaries of character references (which are not really entities anyway) are not reported. </p>
<p>All start/endEntity events must be properly nested.  </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>