From: Petr C. <pci...@us...> - 2004-08-06 10:23:49
|
Update of /cvsroot/perl-xml/sax-perl-org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31422 Modified Files: changes-2.1 index.html sax-2.1-adv.html sax-2.1-idx.html sax-2.1-ref.html sax-2.1.html Log Message: parse_uri(), attribute_decl() Index: changes-2.1 =================================================================== RCS file: /cvsroot/perl-xml/sax-perl-org/changes-2.1,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- changes-2.1 19 Feb 2004 09:50:04 -0000 1.1 +++ changes-2.1 6 Aug 2004 10:23:38 -0000 1.2 @@ -15,12 +15,23 @@ (as in Locator2 interface of SAX 2.0 Ext. 1.1) +[C2] (issue I4) The definition of parse() unified in the Basic and +Advanced documents. parse_uri() added. The new definition fits to +the current XML::SAX::Base implementation (as of XML::SAX v0.12). + + +[C3] (issue I6) Changes in attribute_decl(): ValueDefault renamed +to Mode. The new name is less confusing and corresponds to SAX +Java API. + + --------------------------------------- Issues --------------------------------------- [I1] Resolution: none +--------------------------------------- A parser should advertise SAX version it supports. There can be a new method ($parser->get_sax_version()) or a read-only feature (http://xmlns.perl.org/sax/version). This feature should be introduced @@ -29,6 +40,7 @@ [I2] Resolution: none +--------------------------------------- "http://xml.org/sax/handlers/LexicalHandler" feature on the parser needs to be set to the object to receive lexical events currently. If the reader does not support lexical events, it will throw @@ -48,8 +60,30 @@ [I3] Resolution: none +--------------------------------------- SAX 2.0 Ext. 1.1 has a new Attributes2 interface which extends attributes with new properties (Declared, Specified) to distinguish between attributed specified in an XML doc and those declared in DTD. This could be introduced into Perl SAX 2.1 as an optional extension (advertised by a feature). + + +[I4] Resolution: applied as [C2] +--------------------------------------- +The parse() method is defined in different ways in the Basic and +Advanced documents. +Proposed solution: to add an explicit parse_uri() method, parse() +would call either parse_uri(), parse_string(), or parse_stream() +based on InputSource. + + +[I5] Resolution: none +--------------------------------------- +All hash references could be replaced with blessed classes. Need to +clarify what would be benefits of such change. + + +[I6] Resolution: applied as [C3] +--------------------------------------- +Changes in attribute_decl +eName, aName, Type, Mode (was ValueDefault), Value \ No newline at end of file Index: index.html =================================================================== RCS file: /cvsroot/perl-xml/sax-perl-org/index.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.html 19 Feb 2004 13:49:18 -0000 1.3 +++ index.html 6 Aug 2004 10:23:38 -0000 1.4 @@ -1,61 +1,47 @@ -<html> - <head> - - <title>Perl SAX</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - </head> -<body bgcolor="#ffffff" text="#000000"> -<div align="center"> - <p><font size="6"><b>Perl SAX (Simple API for XML) Page</b></font></p> - <p align="center"><b>The <a href="http://perl-xml.sourceforge.net/">Perl XML - Project</a> is hosted by <a href="http://www.sourceforge.net/">Sourceforge</a>. - This is the official Perl SAX page.</b></p> - <table width="95%" border="0"> - <tbody><tr> - <td><b>SAX 2.0</b></td> - </tr> - <tr> - <td height="11"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Perl SAX</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="perl-sax.css" rel="STYLESHEET" type="text/css" /> + </head> + <body> + <div class="Header"> + <div class="Title">Perl SAX (Simple API for XML) Page</div> + This is the current Perl SAX page. The former official + <a href="http://sax.perl.org">Perl SAX page</a> is no more + maintained for various reasons. + Perl SAX is a part of + the <a href="http://perl-xml.sourceforge.net/">Perl XML Project</a> + hosted by <a href="http://www.sourceforge.net/">Sourceforge</a>. + </div> + <div> + <div class="SubTitle">SAX 2.0</div> + Current stable version of Perl SAX is 2.0. The API is defined + by the following documents: <ul> <li><a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/perl-xml/libxml-perl/doc/sax-2.0.html?rev=HEAD&content-type=text/html">Perl SAX 2.0 Binding</a></li> <li><a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/perl-xml/libxml-perl/doc/sax-2.0-adv.html?rev=HEAD&content-type=text/html">Perl SAX 2.0 Advanced</a></li> - <li>List of Perl's SAX Modules</li> </ul> - </td> - </tr> - - <tr> - <td><b>SAX 2.1 Working Drafts</b></td> - </tr> - <tr> - <td> + </div> + <div> + <div class="SubTitle">SAX 2.1</div> + The version 2.1 is under development: <ul> - <li><a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/sax-2.1.html?rev=HEAD&content-type=text/html">Perl - SAX 2.1 Binding</a></li> - <li><a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/sax-2.1-adv.html?rev=HEAD&content-type=text/html">Perl - SAX 2.1 Advanced</a></li> - <li><a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/sax-2.1-ref.html?rev=HEAD&content-type=text/html">Perl - SAX 2.1 Reference</a></li> - <li><a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/changes-2.1?rev=HEAD&content-type=text/plain">Changes - and Issues</a></li> + <li><a href="sax-2.1.html">Perl SAX 2.1 Binding</a></li> + <li><a href="sax-2.1-adv.html">Perl SAX 2.1 Advanced</a></li> + <li><a href="sax-2.1-ref.html">Perl SAX 2.1 Reference</a> (an indexed view of the two above docs)</li> + <li><a href="changes-2.1">Changes and Issues</a></li> </ul> - </td> - </tr> - - <tr> - <td><b>Misc.</b></td> - </tr> - <tr> - <td> + </div> + <div> + <div class="SubTitle">Related Pages</div> <ul> <li><a href="http://www.saxproject.org/">Official SAX Page</a></li> </ul> - </td> - </tr> - </tbody></table> - -</div> + </div> -</body></html> + </body> +</html> \ No newline at end of file Index: sax-2.1-adv.html =================================================================== RCS file: /cvsroot/perl-xml/sax-perl-org/sax-2.1-adv.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sax-2.1-adv.html 19 Feb 2004 09:50:04 -0000 1.1 +++ sax-2.1-adv.html 6 Aug 2004 10:23:38 -0000 1.2 @@ -239,7 +239,7 @@ <dd> Look up all Features that this parser claims to support. <p> -This method returns a reference to hash of Features which the parser +This method returns a hash of Features which the parser claims to support. The value of the hash is currently unspecified though it may be used later. This method is meant to be inherited so that Features supported by the base parser @@ -562,8 +562,8 @@ <td>The name of the attribute.</td></tr> <tr><td><b><tt>Type</tt></b></td> <td>A string representing the attribute type.</td></tr> -<tr><td><b><tt>ValueDefault</tt></b></td> -<td>A string representing the attribute default ("<tt>#IMPLIED</tt>", +<tr><td><b><tt>Mode</tt></b></td> +<td>A string representing the attribute mode ("<tt>#IMPLIED</tt>", "<tt>#REQUIRED</tt>", or "<tt>#FIXED</tt>") or undef if none of these applies.</td></tr> <tr><td><b><tt>Value</tt></b></td> @@ -724,6 +724,9 @@ alternative URI, or that it use an entirely different input source.</p> +<p>This method returns an <a href="sax-2.1-adv.html#InputSources">Input +Source</a> hash reference.</p> + <p>Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a database or other input Index: sax-2.1-idx.html =================================================================== RCS file: /cvsroot/perl-xml/sax-perl-org/sax-2.1-idx.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sax-2.1-idx.html 19 Feb 2004 13:49:18 -0000 1.2 +++ sax-2.1-idx.html 6 Aug 2004 10:23:38 -0000 1.3 @@ -18,7 +18,7 @@ <div class="box" style="background-color:#eeeeee"> <div class="title">Perl SAX 2.1</div> - <div class="right">[<a href="http://sax.perl.org">home</a>]</div> + <div class="right">[<a target="_top" href="http://perl-xml.sourceforge.net/perl-sax/">home</a>]</div> <div class="item"> <a href="#parser">Parser</a> </div> @@ -26,19 +26,19 @@ <a href="#content">ContentHandler</a> </div> <div class="item"> - <a href="#error">ErrorHandler</a> + <a href="#dtd">DTDHandler</a> </div> <div class="item"> - <a href="#lexical">LexicalHandler</a> + <a href="#error">ErrorHandler</a> </div> <div class="item"> - <a href="#dtd">DTDHandler</a> + <a href="#resolver">Entity Resolver</a> </div> <div class="item"> - <a href="#decl">DeclHandler</a> + <a href="#lexical">LexicalHandler</a> </div> <div class="item"> - <a href="#resolver">Entity Resolver</a> + <a href="#decl">DeclHandler</a> </div> <div class="item"> <a href="#other">other objects</a> @@ -49,22 +49,25 @@ <div class="title"><a name="parser"/>Parser</div> <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#parse" target="cnt">parse()</a> + <a href="sax-2.1.html?#parse" target="cnt">parse()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#parseFile" target="cnt">parse_file()</a> + <a href="sax-2.1.html?#parseURI" target="cnt">parse_uri()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#parseString" target="cnt">parse_string()</a> + <a href="sax-2.1.html?#parseFile" target="cnt">parse_file()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#getFeature" target="cnt">get_feature()</a> + <a href="sax-2.1.html?#parseString" target="cnt">parse_string()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#setFeature" target="cnt">set_feature()</a> + <a href="sax-2.1-adv.html?#getFeature" target="cnt">get_feature()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#getFeatures" target="cnt">get_features()</a> + <a href="sax-2.1-adv.html?#setFeature" target="cnt">set_feature()</a> + </div> + <div class="item"> + <a href="sax-2.1-adv.html?#getFeatures" target="cnt">get_features()</a> </div> </div> @@ -72,37 +75,48 @@ <div class="title"><a name="content"/>ContentHandler</div> <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#setDocumentLocator" target="cnt">set_document_locator()</a> + <a href="sax-2.1-adv.html?#setDocumentLocator" target="cnt">set_document_locator()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#startDocument" target="cnt">start_document()</a> + <a href="sax-2.1.html?#startDocument" target="cnt">start_document()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#endDocument" target="cnt">end_document()</a> + <a href="sax-2.1.html?#endDocument" target="cnt">end_document()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#startElement" target="cnt">start_element()</a> + <a href="sax-2.1.html?#startElement" target="cnt">start_element()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#endElement" target="cnt">end_element()</a> + <a href="sax-2.1.html?#endElement" target="cnt">end_element()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#characters" target="cnt">characters()</a> + <a href="sax-2.1.html?#characters" target="cnt">characters()</a> </div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#ignorableWhitespace" target="cnt">ignorable_whitespace()</a> + <a href="sax-2.1.html?#ignorableWhitespace" target="cnt">ignorable_whitespace()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#startPrefixMapping" target="cnt">start_prefix_mapping()</a> + <a href="sax-2.1-adv.html?#startPrefixMapping" target="cnt">start_prefix_mapping()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#endPrefixMapping" target="cnt">end_prefix_mapping()</a> + <a href="sax-2.1-adv.html?#endPrefixMapping" target="cnt">end_prefix_mapping()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#processingInstruction" target="cnt">processing_instruction()</a> + <a href="sax-2.1-adv.html?#processingInstruction" target="cnt">processing_instruction()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#skippedEntity" target="cnt">skipped_entity()</a> + <a href="sax-2.1-adv.html?#skippedEntity" target="cnt">skipped_entity()</a> + </div> +</div> + +<div class="box"> + <div class="title"><a name="dtd"/>DTDHandler</div> + <div class="right">[<a href="#top">top</a>]</div> + <div class="item"> + <a href="sax-2.1-adv.html?#notationDecl" target="cnt">notation_decl()</a> + </div> + <div class="item"> + <a href="sax-2.1-adv.html?#unparsedEntity" target="cnt">unparsed_entity_decl()</a> </div> </div> @@ -110,50 +124,47 @@ <div class="title"><a name="error"/>ErrorHandler</div> <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#warning" target="cnt">warning()</a> + <a href="sax-2.1-adv.html?#warning" target="cnt">warning()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#error" target="cnt">error()</a> + <a href="sax-2.1-adv.html?#error" target="cnt">error()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#fatalError" target="cnt">fatal_error()</a> + <a href="sax-2.1-adv.html?#fatalError" target="cnt">fatal_error()</a> </div> </div> <div class="box"> - <div class="title"><a name="lexical"/>LexicalHandler</div> + <div class="title"><a name="resolver"/>EntityResolver</div> <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#startDTD" target="cnt">start_dtd()</a> + <a href="sax-2.1-adv.html?#resolveEntity" target="cnt">resolve_entity()</a> </div> +</div> + +<div class="box"> + <div class="title"><a name="lexical"/>LexicalHandler</div> + <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#endDTD" target="cnt">end_dtd()</a> + <a href="sax-2.1-adv.html?#startDTD" target="cnt">start_dtd()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#startEntity" target="cnt">start_entity()</a> + <a href="sax-2.1-adv.html?#endDTD" target="cnt">end_dtd()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#endEntity" target="cnt">end_entity()</a> + <a href="sax-2.1-adv.html?#startEntity" target="cnt">start_entity()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#startCDATA" target="cnt">start_cdata()</a> + <a href="sax-2.1-adv.html?#endEntity" target="cnt">end_entity()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#endCDATA" target="cnt">end_cdata()</a> + <a href="sax-2.1-adv.html?#startCDATA" target="cnt">start_cdata()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#comment" target="cnt">comment()</a> - </div> -</div> - -<div class="box"> - <div class="title"><a name="dtd"/>DTDHandler</div> - <div class="right">[<a href="#top">top</a>]</div> - <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#notationDecl" target="cnt">notation_decl()</a> + <a href="sax-2.1-adv.html?#endCDATA" target="cnt">end_cdata()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#unparsedEntity" target="cnt">unparsed_entity_decl()</a> + <a href="sax-2.1-adv.html?#comment" target="cnt">comment()</a> </div> </div> @@ -161,24 +172,16 @@ <div class="title"><a name="decl"/>DeclHandler</div> <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#elementDecl" target="cnt">element_decl()</a> - </div> - <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#attributeDecl" target="cnt">attribute_decl()</a> + <a href="sax-2.1-adv.html?#elementDecl" target="cnt">element_decl()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#internalEntityDecl" target="cnt">internal_entity_decl()</a> + <a href="sax-2.1-adv.html?#attributeDecl" target="cnt">attribute_decl()</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#externalEntityDecl" target="cnt">external_entity_decl()</a> + <a href="sax-2.1-adv.html?#internalEntityDecl" target="cnt">internal_entity_decl()</a> </div> -</div> - -<div class="box"> - <div class="title"><a name="resolver"/>EntityResolver</div> - <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#resolveEntity" target="cnt">resolve_entity()</a> + <a href="sax-2.1-adv.html?#externalEntityDecl" target="cnt">external_entity_decl()</a> </div> </div> @@ -186,13 +189,13 @@ <div class="title"><a name="other"/>other objects</div> <div class="right">[<a href="#top">top</a>]</div> <div class="item"> - <a href="sax-2.1.html?rev=HEAD&content-type=text/html#Exceptions" target="cnt">Exceptions</a> + <a href="sax-2.1.html?#Exceptions" target="cnt">Exceptions</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#InputSources" target="cnt">Input Sources</a> + <a href="sax-2.1-adv.html?#InputSources" target="cnt">Input Sources</a> </div> <div class="item"> - <a href="sax-2.1-adv.html?rev=HEAD&content-type=text/html#Features" target="cnt">Features</a> + <a href="sax-2.1-adv.html?#Features" target="cnt">Features</a> </div> </div> Index: sax-2.1-ref.html =================================================================== RCS file: /cvsroot/perl-xml/sax-perl-org/sax-2.1-ref.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sax-2.1-ref.html 19 Feb 2004 13:49:18 -0000 1.2 +++ sax-2.1-ref.html 6 Aug 2004 10:23:38 -0000 1.3 @@ -3,9 +3,9 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <frameset cols="225, *"> <noframes> - <a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/sax-2.1.html?rev=HEAD&content-type=text/html">Perl SAX 2.1 Binding</a> + <a href="sax-2.1.html">Perl SAX 2.1 Binding</a> </noframes> - <frame name="idx" id="idx" src="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/sax-2.1-idx.html?rev=HEAD&content-type=text/html" /> - <frame name="cnt" id="cnt"src="http://cvs.sourceforge.net/viewcvs.py/*checkout*/perl-xml/sax-perl-org/sax-2.1.html?rev=HEAD&content-type=text/html" /> + <frame name="idx" id="idx" src="sax-2.1-idx.html" /> + <frame name="cnt" id="cnt"src="sax-2.1.html" /> </frameset> Index: sax-2.1.html =================================================================== RCS file: /cvsroot/perl-xml/sax-perl-org/sax-2.1.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sax-2.1.html 19 Feb 2004 09:50:04 -0000 1.1 +++ sax-2.1.html 6 Aug 2004 10:23:38 -0000 1.2 @@ -89,15 +89,15 @@ unless otherwise specified. </p> -<p><a name="parse"/> -<dl><dt><b><tt class='function'>parse</tt></b>(<var>uri</var> [, <var>options</var>])</dt> +<p><a name="parseURI"/> +<dl><dt><b><tt class='function'>parse_uri</tt></b>(<var>uri</var> [, <var>options</var>])</dt> <dd> Parses the XML instance identified by <var>uri</var> (a system identifier). <var>options</var> can be a list of options, value pairs or a hash (reference). Options include <tt>Handler</tt>, features and properties, -and advanced SAX parser options. <tt>parse()</tt> returns the result +and advanced SAX parser options. <tt>parse_uri()</tt> returns the result of calling the <tt>end_document()</tt> handler. The options supported -by <tt>parse()</tt> may vary slightly if what is being "parsed" isn't +by <tt>parse_uri()</tt> may vary slightly if what is being "parsed" isn't XML. </dd></dl></p> @@ -117,6 +117,14 @@ <tt>parse_string()</tt> returns the result of calling the <tt>end_document()</tt> handler.</dd></dl></p> +<p><a name="parse"/> +<dl><dt><b><tt class='function'>parse</tt></b>([<var>options</var>])</dt> +<dd> +This is a generic method that calls one of the above methods based on +the <tt>Source</tt> option. <var>options</var> can be a list of +options, value pairs or a hash (reference).</dd> +</p> + <p> <dl><dt><b><tt>Handler</tt></b></dt> <dd> |