Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 1820

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- xmerl_sax_parser</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/xmerl-1.3.2.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>xmerl</strong><br><strong>Reference Manual</strong><br><small>Version 1.3.2</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li id="no" title="xmerl_scan " expanded="false">xmerl_scan<ul>
<li><a href="xmerl_scan.html">
                  Top of manual page
                </a></li>
<li title="accumulate_whitespace-4"><a href="xmerl_scan.html#accumulate_whitespace-4">accumulate_whitespace/4</a></li>
<li title="cont_state-1"><a href="xmerl_scan.html#cont_state-1">cont_state/1</a></li>
<li title="cont_state-2"><a href="xmerl_scan.html#cont_state-2">cont_state/2</a></li>
<li title="event_state-1"><a href="xmerl_scan.html#event_state-1">event_state/1</a></li>
<li title="event_state-2"><a href="xmerl_scan.html#event_state-2">event_state/2</a></li>
<li title="fetch_state-1"><a href="xmerl_scan.html#fetch_state-1">fetch_state/1</a></li>
<li title="fetch_state-2"><a href="xmerl_scan.html#fetch_state-2">fetch_state/2</a></li>
<li title="file-1"><a href="xmerl_scan.html#file-1">file/1</a></li>
<li title="file-2"><a href="xmerl_scan.html#file-2">file/2</a></li>
<li title="hook_state-1"><a href="xmerl_scan.html#hook_state-1">hook_state/1</a></li>
<li title="hook_state-2"><a href="xmerl_scan.html#hook_state-2">hook_state/2</a></li>
<li title="rules_state-1"><a href="xmerl_scan.html#rules_state-1">rules_state/1</a></li>
<li title="rules_state-2"><a href="xmerl_scan.html#rules_state-2">rules_state/2</a></li>
<li title="string-1"><a href="xmerl_scan.html#string-1">string/1</a></li>
<li title="string-2"><a href="xmerl_scan.html#string-2">string/2</a></li>
<li title="user_state-1"><a href="xmerl_scan.html#user_state-1">user_state/1</a></li>
<li title="user_state-2"><a href="xmerl_scan.html#user_state-2">user_state/2</a></li>
</ul>
</li>
<li id="no" title="xmerl " expanded="false">xmerl<ul>
<li><a href="xmerl.html">
                  Top of manual page
                </a></li>
<li title="callbacks-1"><a href="xmerl.html#callbacks-1">callbacks/1</a></li>
<li title="export-2"><a href="xmerl.html#export-2">export/2</a></li>
<li title="export-3"><a href="xmerl.html#export-3">export/3</a></li>
<li title="export_content-2"><a href="xmerl.html#export_content-2">export_content/2</a></li>
<li title="export_element-2"><a href="xmerl.html#export_element-2">export_element/2</a></li>
<li title="export_element-3"><a href="xmerl.html#export_element-3">export_element/3</a></li>
<li title="export_simple-2"><a href="xmerl.html#export_simple-2">export_simple/2</a></li>
<li title="export_simple-3"><a href="xmerl.html#export_simple-3">export_simple/3</a></li>
<li title="export_simple_content-2"><a href="xmerl.html#export_simple_content-2">export_simple_content/2</a></li>
<li title="export_simple_element-2"><a href="xmerl.html#export_simple_element-2">export_simple_element/2</a></li>
</ul>
</li>
<li id="no" title="xmerl_xs " expanded="false">xmerl_xs<ul>
<li><a href="xmerl_xs.html">
                  Top of manual page
                </a></li>
<li title="built_in_rules-2"><a href="xmerl_xs.html#built_in_rules-2">built_in_rules/2</a></li>
<li title="select-2"><a href="xmerl_xs.html#select-2">select/2</a></li>
<li title="value_of-1"><a href="xmerl_xs.html#value_of-1">value_of/1</a></li>
<li title="xslapply-2"><a href="xmerl_xs.html#xslapply-2">xslapply/2</a></li>
</ul>
</li>
<li id="no" title="xmerl_eventp " expanded="false">xmerl_eventp<ul>
<li><a href="xmerl_eventp.html">
                  Top of manual page
                </a></li>
<li title="file_sax-4"><a href="xmerl_eventp.html#file_sax-4">file_sax/4</a></li>
<li title="stream-2"><a href="xmerl_eventp.html#stream-2">stream/2</a></li>
<li title="stream_sax-4"><a href="xmerl_eventp.html#stream_sax-4">stream_sax/4</a></li>
<li title="string_sax-4"><a href="xmerl_eventp.html#string_sax-4">string_sax/4</a></li>
</ul>
</li>
<li id="no" title="xmerl_xpath " expanded="false">xmerl_xpath<ul>
<li><a href="xmerl_xpath.html">
                  Top of manual page
                </a></li>
<li title="string-2"><a href="xmerl_xpath.html#string-2">string/2</a></li>
<li title="string-3"><a href="xmerl_xpath.html#string-3">string/3</a></li>
<li title="string-5"><a href="xmerl_xpath.html#string-5">string/5</a></li>
</ul>
</li>
<li id="no" title="xmerl_xsd " expanded="false">xmerl_xsd<ul>
<li><a href="xmerl_xsd.html">
                  Top of manual page
                </a></li>
<li title="file2state-1"><a href="xmerl_xsd.html#file2state-1">file2state/1</a></li>
<li title="format_error-1"><a href="xmerl_xsd.html#format_error-1">format_error/1</a></li>
<li title="process_schema-1"><a href="xmerl_xsd.html#process_schema-1">process_schema/1</a></li>
<li title="process_schema-2"><a href="xmerl_xsd.html#process_schema-2">process_schema/2</a></li>
<li title="process_schemas-1"><a href="xmerl_xsd.html#process_schemas-1">process_schemas/1</a></li>
<li title="process_schemas-2"><a href="xmerl_xsd.html#process_schemas-2">process_schemas/2</a></li>
<li title="process_validate-2"><a href="xmerl_xsd.html#process_validate-2">process_validate/2</a></li>
<li title="process_validate-3"><a href="xmerl_xsd.html#process_validate-3">process_validate/3</a></li>
<li title="state2file-1"><a href="xmerl_xsd.html#state2file-1">state2file/1</a></li>
<li title="state2file-2"><a href="xmerl_xsd.html#state2file-2">state2file/2</a></li>
<li title="validate-2"><a href="xmerl_xsd.html#validate-2">validate/2</a></li>
<li title="validate-3"><a href="xmerl_xsd.html#validate-3">validate/3</a></li>
</ul>
</li>
<li id="loadscrollpos" title="xmerl_sax_parser " expanded="true">xmerl_sax_parser<ul>
<li><a href="xmerl_sax_parser.html">
                  Top of manual page
                </a></li>
<li title="file-2"><a href="xmerl_sax_parser.html#file-2">file/2</a></li>
<li title="stream-2"><a href="xmerl_sax_parser.html#stream-2">stream/2</a></li>
<li title="ContinuationFun-1"><a href="xmerl_sax_parser.html#ContinuationFun-1">ContinuationFun/1</a></li>
<li title="EventFun-3"><a href="xmerl_sax_parser.html#EventFun-3">EventFun/3</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>xmerl_sax_parser</h1></center>
  

  <h3>MODULE</h3>
<div class="REFBODY">xmerl_sax_parser</div>
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">XML SAX parser API</div>

  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
    <p>
      A SAX parser for XML that sends the events through a callback interface.
     SAX is the <strong>Simple API for XML</strong>, originally a Java-only API. SAX was the first widely adopted API for 
     XML in Java, and is a <strong>de facto</strong> standard where there are versions for several programming language 
     environments other than Java.
    </p>
  </p></div>

  <h3><a name="id67042">DATA TYPES</a></h3>
<div class="REFBODY">
    

    <dl>
      <dt><strong><span class="code">option()</span></strong></dt>
       <dd>
       <p>
         Options used to customize the behaviour of the parser.
         Possible options are:
       </p>
<p></p>
       <dl>
         <dt><strong><span class="code">{continuation_fun, ContinuationFun}</span></strong></dt>
         <dd>
           <span class="bold_code"><a href="#ContinuationFun-1">ContinuationFun</a></span> is a call back function to decide what to do if 
           the parser runs into EOF before the document is complete. 
         </dd>
         <dt><strong><span class="code">{continuation_state, term()}</span></strong></dt>
         <dd>
           State that is accessible in the continuation call back function. 
         </dd>
         <dt><strong><span class="code">{event_fun, EventFun}</span></strong></dt>
         <dd>
           <span class="bold_code"><a href="#EventFun-3">EventFun</a></span> is the call back function for parser events. 
         </dd>
         <dt><strong><span class="code">{event_state, term()}</span></strong></dt>
         <dd>
           State that is accessible in the event call back function. 
         </dd>
         <dt><strong><span class="code">{file_type, FileType}</span></strong></dt>
         <dd>
           Flag that tells the parser if it's parsing a DTD or a normal XML file (default normal).
           <ul>
             <li><span class="code">FileType = normal | dtd</span></li>
           </ul>
         </dd>
         <dt><strong><span class="code">{encoding, Encoding}</span></strong></dt>
         <dd>
           Set default character set used (default UTF-8). This character set is used only if not explicitly 
           given by the XML document.
           <ul>
             <li><span class="code">Encoding = utf8 | {utf16,big} | {utf16,little} | latin1 | list</span></li>
           </ul>
         </dd>
         <dt><strong><span class="code">skip_external_dtd</span></strong></dt>
         <dd>
           Skips the external DTD during parsing.
         </dd>
       </dl>
       </dd>
      <dt><strong></strong></dt>
 <dd>
<p></p>
       </dd>
      <dt><strong><span class="code">event()</span></strong></dt>
       <dd>
       <p>
         The SAX events that are sent to the user via the callback.
       </p>
<p></p>
       <dl>

         <dt><strong><span class="code">startDocument</span></strong></dt>
         <dd>
           Receive notification of the beginning of a document. The SAX parser will send this event only once 
           before any other event callbacks.
         </dd>

         <dt><strong><span class="code">endDocument</span></strong></dt>
         <dd>
            Receive notification of the end of a document. The SAX parser will send this event only once, and it will 
            be the last event during the parse. 
         </dd>

         <dt><strong><span class="code">{startPrefixMapping, Prefix, Uri}</span></strong></dt>
         <dd>
           Begin the scope of a prefix-URI Namespace mapping.
           Note that start/endPrefixMapping events are not guaranteed to be properly nested relative to each other: 
           all startPrefixMapping events will occur immediately before the corresponding startElement event, and all 
           endPrefixMapping  events will occur immediately after the corresponding endElement event, but their 
           order is not otherwise guaranteed.
           There will not be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.
           <ul>
             <li><span class="code">Prefix = string()</span></li>
             <li><span class="code">Uri = string()</span></li>
           </ul>
         </dd>

         <dt><strong><span class="code">{endPrefixMapping, Prefix}</span></strong></dt>
         <dd>
           End the scope of a prefix-URI mapping.
           <ul>
             <li><span class="code">Prefix = string()</span></li>
           </ul>
         </dd>

         <dt><strong><span class="code">{startElement, Uri, LocalName, QualifiedName, Attributes}</span></strong></dt>
         <dd>
          Receive notification of the beginning of an element.

          The Parser will send this event at the beginning of every element in the XML document; 
          there will be a corresponding endElement event for every startElement event (even when the element is empty). 
          All of the element's content will be reported, in order, before the corresponding endElement event.
            <ul>
             <li><span class="code">Uri = string()</span></li>
             <li><span class="code">LocalName = string()</span></li>
             <li><span class="code">QualifiedName = {Prefix, LocalName}</span></li>
             <li><span class="code">Prefix = string()</span></li>
             <li><span class="code">Attributes = [{Uri, Prefix, AttributeName, Value}]</span></li>
             <li><span class="code">AttributeName = string()</span></li>
             <li><span class="code">Value = string()</span></li>
           </ul>
        </dd>

         <dt><strong><span class="code">{endElement, Uri, LocalName, QualifiedName}</span></strong></dt>
         <dd>
          Receive notification of the end of an element.

          The SAX parser will send this event at the end of every element in the XML document;
          there will be a corresponding startElement event for every endElement event (even when the element is empty).
            <ul>
             <li><span class="code">Uri = string()</span></li>
             <li><span class="code">LocalName = string()</span></li>
             <li><span class="code">QualifiedName = {Prefix, LocalName}</span></li>
             <li><span class="code">Prefix = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{characters, string()}</span></strong></dt>
         <dd>
          Receive notification of character data. 
         </dd>

         <dt><strong><span class="code">{ignorableWhitespace, string()}</span></strong></dt>
         <dd>
           Receive notification of ignorable whitespace in element content.
         </dd>

         <dt><strong><span class="code">{processingInstruction, Target, Data}</span></strong></dt>
         <dd>
           Receive notification of a processing instruction.

           The Parser will send this event once for each processing instruction found: 
           note that processing instructions may occur before or after the main document element.
            <ul>
             <li><span class="code">Target = string()</span></li>
             <li><span class="code">Data = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{comment, string()}</span></strong></dt>
         <dd>
           Report an XML comment anywhere in the document (both inside and outside of the document element).
         </dd>

         <dt><strong><span class="code">startCDATA</span></strong></dt>
         <dd>
           Report the start of a CDATA section. The contents of the CDATA section will be reported 
           through the regular characters event.
         </dd>

         <dt><strong><span class="code">endCDATA</span></strong></dt>
         <dd>
           Report the end of a CDATA section.
         </dd>

         <dt><strong><span class="code">{startDTD, Name, PublicId, SystemId}</span></strong></dt>
         <dd>
           Report the start of DTD declarations, it's reporting the start of the DOCTYPE declaration.
           If the document has no DOCTYPE declaration, this event will not be sent.
            <ul>
             <li><span class="code">Name = string()</span></li>
             <li><span class="code">PublicId = string()</span></li>
             <li><span class="code">SystemId = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">endDTD</span></strong></dt>
         <dd>
          Report the end of DTD declarations, it's reporting the end of the DOCTYPE declaration.
         </dd>

         <dt><strong><span class="code">{startEntity, SysId}</span></strong></dt>
         <dd> 
           Report the beginning of some internal and external XML entities. ???
         </dd>

         <dt><strong><span class="code">{endEntity, SysId}</span></strong></dt>
         <dd>
           Report the end of an entity. ???
         </dd>

         <dt><strong><span class="code">{elementDecl, Name, Model}</span></strong></dt>
         <dd>
           Report an element type declaration.   
           The content model will consist of the string "EMPTY", the string "ANY", or a parenthesised group, 
           optionally followed by an occurrence indicator. The model will be normalized so that all parameter 
           entities are fully resolved and all whitespace is removed,and will include the enclosing parentheses. 
           Other normalization (such as removing redundant parentheses or simplifying occurrence indicators) 
           is at the discretion of the parser.
            <ul>
             <li><span class="code">Name = string()</span></li>
             <li><span class="code">Model = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{attributeDecl, ElementName, AttributeName, Type, Mode, Value}</span></strong></dt>
         <dd>
           Report an attribute type declaration.
            <ul>
             <li><span class="code">ElementName = string()</span></li>
             <li><span class="code">AttributeName = string()</span></li>
             <li><span class="code">Type = string()</span></li>
             <li><span class="code">Mode = string()</span></li>
             <li><span class="code">Value = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{internalEntityDecl, Name, Value}</span></strong></dt>
         <dd>
          Report an internal entity declaration.
            <ul>
             <li><span class="code">Name = string()</span></li>
             <li><span class="code">Value = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{externalEntityDecl, Name, PublicId, SystemId}</span></strong></dt>
         <dd>
          Report a parsed external entity declaration.
            <ul>
             <li><span class="code">Name = string()</span></li>
             <li><span class="code">PublicId = string()</span></li>
             <li><span class="code">SystemId = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{unparsedEntityDecl, Name, PublicId, SystemId, Ndata}</span></strong></dt>
         <dd>
           Receive notification of an unparsed entity declaration event.
            <ul>
             <li><span class="code">Name = string()</span></li>
             <li><span class="code">PublicId = string()</span></li>
             <li><span class="code">SystemId = string()</span></li>
             <li><span class="code">Ndata = string()</span></li>
            </ul>
         </dd>

         <dt><strong><span class="code">{notationDecl, Name, PublicId, SystemId}</span></strong></dt>
         <dd>
           Receive notification of a notation declaration event.
            <ul>
             <li><span class="code">Name = string()</span></li>
             <li><span class="code">PublicId = string()</span></li>
             <li><span class="code">SystemId = string()</span></li>
            </ul>
         </dd>

       </dl>
       </dd>

       <dt><strong><span class="code">unicode_char()</span></strong></dt>
       <dd>
         Integer representing valid unicode codepoint.
       </dd>

       <dt><strong><span class="code">unicode_binary()</span></strong></dt>
       <dd>
         Binary with characters encoded in UTF-8 or UTF-16.
       </dd>

       <dt><strong><span class="code">latin1_binary()</span></strong></dt>
       <dd>
         Binary with characters encoded in iso-latin-1.
       </dd>

    </dl>

  </div>


  <h3>EXPORTS</h3>

    <p><a name="file-2"><span class="bold_code">file(Filename, Options) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Filename = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Options = [option()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Result = {ok, EventState, Rest} |</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">   {Tag, Location, Reason, EndTags, EventState}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Rest = unicode_binary() | latin1_binary()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Tag = atom() (fatal_error, or user defined tag)</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Location = {CurrentLocation, EntityName, LineNo}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">CurrentLocation = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">EntityName = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">LineNo = integer()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">EventState = term()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Parse file containing an XML document. This functions uses a default continuation function to read the file in blocks.</p>
      </p></div>

    <p><a name="stream-2"><span class="bold_code">stream(Xml, Options) -&gt; Result</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Xml = unicode_binary() | latin1_binary() | [unicode_char()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Options = [option()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Result = {ok, EventState, Rest} |</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">   {Tag, Location, Reason, EndTags, EventState}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Rest =  unicode_binary() | latin1_binary() | [unicode_char()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Tag = atom() (fatal_error or user defined tag)</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Location = {CurrentLocation, EntityName, LineNo}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">CurrentLocation = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">EntityName = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">LineNo = integer()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">EventState = term()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Parse a stream containing an XML document.</p>
      </p></div>

   

  <h3><a name="id67840">CALLBACK FUNCTIONS</a></h3>
<div class="REFBODY">
    
    <p>
      The callback interface is based on that the user sends a fun with the 
      correct signature to the parser.
   </p>
  </div>

  <h3>EXPORTS</h3>

    <p><a name="ContinuationFun-1"><span class="bold_code">ContinuationFun(State) -&gt; {NewBytes, NewState}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">State = NewState = term()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">NewBytes = binary() | list() (should be same as start input in stream/2)</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>
          This function is called whenever the parser runs out of input data.
          If the function can't get hold of more input an empty list or binary 
          (depends on start input in stream/2) is returned.

          Other types of errors is handled through exceptions. Use throw/1 to send the 
          following tuple {Tag = atom(), Reason = string()} if the continuation function encounters a fatal error. 
          Tag is an atom that identifies the functional entity that sends the exception 
          and Reason is a string that describes the problem.
        </p>
      </p></div>

    <p><a name="EventFun-3"><span class="bold_code">EventFun(Event, Location, State) -&gt; NewState</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Event = event()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Location = {CurrentLocation, Entityname, LineNo}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">CurrentLocation = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Entityname = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">LineNo = integer()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">State = NewState = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>
          This function is called for every event sent by the parser. 

          The error handling is done through exceptions. Use throw/1 to send the 
          following tuple {Tag = atom(), Reason = string()} if the application encounters a fatal error. 
          Tag is an atom that identifies the functional entity that sends the exception 
          and Reason is a string that describes the problem.
        </p>
      </p></div>

  



</div>
<div class="footer">
<hr>
<p>Copyright © 2004-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>