[cxml-cvs] CVS cxml/doc

dlichteblau dlichteblau at common-lisp.net
Sun Apr 22 13:23:54 UTC 2007


Update of /project/cxml/cvsroot/cxml/doc
In directory clnet:/tmp/cvs-serv17056/doc

Modified Files:
	cxml.css index.xml klacks.xml sax.xml 
Log Message:
+      <li>New class <tt>broadcast-handler</tt> as a generalization
+      of the older <tt>sax-proxy</tt>.</li>

+      <li>New class <tt>tapping-source</tt>, a klacks source that
+      relays events from an upstream klacks source unchanged, while also
+      emitting them as SAX events to a user-specified handler at the
+      same time.</li>

+      Fixed serialize-event to generate
+      start-prefix-mapping and end-prefix-mapping events.  New function
+      map-current-namespace-declarations.</li>


--- /project/cxml/cvsroot/cxml/doc/cxml.css	2006/08/20 11:48:58	1.6
+++ /project/cxml/cvsroot/cxml/doc/cxml.css	2007/04/22 13:23:54	1.7
@@ -10,10 +10,11 @@
   background-color: #9c0000;
   border: solid #9c0000;
   border-top-width: 1px;
-  border-bottom-width: 0px;
+  border-bottom-width: 2px;
   border-left-width: 4px;
   border-right-width: 0px;
-  margin: 0em 2pt 1px 2em;
+  padding-left: 1px;
+  margin: 0em 2pt 0px 2em;
 }
 
 div.sidebar-title a {
@@ -21,15 +22,14 @@
 }
 
 div.sidebar-main {
-  background-color: #eeeeee;
+  background-color: #f7f7f7;
   border: solid #9c0000;
   border-top-width: 0px;
   border-bottom-width: 0px;
   border-left-width: 4px;
   border-right-width: 0px;
   margin: 0em 2pt 1em 2em;
-  padding-top: 2px;
-  padding-left: 2px;
+  padding: 1em;
 }
 
 div.sidebar ul.main {
--- /project/cxml/cvsroot/cxml/doc/index.xml	2007/03/04 21:04:11	1.4
+++ /project/cxml/cvsroot/cxml/doc/index.xml	2007/04/22 13:23:54	1.5
@@ -55,12 +55,20 @@
       <li>xml:base support (SAX and Klacks only, not yet used in DOM).
       See documentation <a href="sax.html#saxparser">here</a> and <a
       href="klacks.html#locator">here</a>.</li>
-      <li>Fixed attributes to carry an lname even without when occurring
+      <li>New class <tt>broadcast-handler</tt> as a generalization
+      of the older <tt>sax-proxy</tt>.</li>
+      <li>New class <tt>tapping-source</tt>, a klacks source that
+      relays events from an upstream klacks source unchanged, while also
+      emitting them as SAX events to a user-specified handler at the
+      same time.</li>
+      <li>Changed attributes to carry an lname even when occurring
       without a namespace.</li>
       <li>Klacks improvements: Incompatibly changed
       klacks:find-element and find-event to consider the current event
       as a result.  Added klacks-error, klacks:expect, klacks:skip,
-      klacks:expecting-element.</li>
+      klacks:expecting-element.  Fixed serialize-event to generate
+      start-prefix-mapping and end-prefix-mapping events.  New function
+      map-current-namespace-declarations.</li>
     </ul>
     <p class="nomargin"><tt>rel-2007-02-18</tt></p>
     <ul class="nomargin">
--- /project/cxml/cvsroot/cxml/doc/klacks.xml	2007/03/04 21:04:11	1.8
+++ /project/cxml/cvsroot/cxml/doc/klacks.xml	2007/04/22 13:23:54	1.9
@@ -180,6 +180,18 @@
      signal an error.
     </p>
     <p>
+      <div class="def">Function KLACKS:MAP-CURRENT-NAMESPACE-DECLARATIONS (fn source) => nil</div>
+    </p>
+    <p>
+     For use only on :start-element and :end-element events, this
+     function report every namespace declaration on the current element.
+     On :start-element, these correspond to the xmlns attributes of the
+     start tag.  On :end-element, the declarations of the corresponding
+     start tag are reported.  No inherited namespaces are
+     included.  <tt>fn</tt> is called only for each declaration with two
+     arguments, the prefix and uri.
+    </p>
+    <p>
       <div class="def">Function KLACKS:MAP-ATTRIBUTES (fn source)</div>
     </p>
     <p>
@@ -281,6 +293,19 @@
       Read all klacks events from <tt>source</tt> and send them as SAX
       events to the SAX <tt>handler</tt>.
     </p>
+    <p>
+      <div class="def">Class KLACKS:TAPPING-SOURCE (source)</div>
+      A klacks source that relays events from an upstream klacks source
+      unchanged, while also emitting them as SAX events to a
+      user-specified handler at the same time.
+    </p>
+    <p>
+      <div class="def">Functon KLACKS:MAKE-TAPPING-SOURCE
+      (upstream-source &optional sax-handler)</div>
+      Create a tapping source relaying events
+      for <tt>upstream-source</tt>, and sending SAX events
+      to <tt>sax-handler</tt>.
+    </p>
 
     <a name="locator"/>
     <h3>Location information</h3>
--- /project/cxml/cvsroot/cxml/doc/sax.xml	2007/03/04 21:04:11	1.2
+++ /project/cxml/cvsroot/cxml/doc/sax.xml	2007/04/22 13:23:54	1.3
@@ -358,16 +358,35 @@
   (dom:map-document (cxml:make-validator x #"foo") d))</pre>
 
     <p>
-      <div class="def">Class CXML:SAX-PROXY ()</div>
+      <div class="def">Class CXML:BROADCAST-HANDLER ()</div>
+      <div class="def">Accessor CXML:BROADCAST-HANDLER-HANDLERS</div>
+      <div class="def">Function CXML:MAKE-BROADCAST-HANDLER (&rest handlers)</div>
+      <tt>broadcast-handler</tt> is a SAX handler which passes every event it
+      receives on to each of several chained handlers, somewhat similar
+      to the way a <tt>broadcast-stream</tt> works.
+    </p>
+    <p>
+      You can subclass <tt>broadcast-stream</tt> to modify the events
+      before they are being passed on.  Define methods on your handler
+      class for the events to be modified.  All other events will pass
+      through to the chained handlers unmodified.
+    </p>
+    <p>
+      Broadcast handler functions return the result of calling the event
+      function on the <i>last</i> handler in the list.  In particular,
+      the overall result from <tt>sax:end-document</tt> will be ignored
+      for all other handlers.
+    </p>
+
+    <p>
+      <div class="def">Class CXML:SAX-PROXY (broadcast-handler)</div>
       <div class="def">Accessor CXML:PROXY-CHAINED-HANDLER</div>
-      <tt>sax-proxy</tt> is a SAX handler which passes all events it
-      receives on to a user-defined second handler, which defaults
-      to <tt>nil</tt>.  Use <tt>sax-proxy</tt> to modify the events a
-      SAX handler receives by defining your own subclass
-      of <tt>sax-proxy</tt>.  Setting the chained handler to the target
-      handler, and define methods on your handler class for the events
-      to be modified.  All other events will pass through to the chained
-      handler unmodified.
+      <tt>sax-proxy</tt> is a subclass of <tt>broadcast-handler</tt>
+      which sends events to exactly one chained handler.  This class is
+      still included for compatibility with older versions of
+      CXML which did not include the more
+      general <tt>broadcast-handler</tt> yet, but has been retrofitted
+      as a subclass of the latter.
     </p>
 
     <p>




More information about the Cxml-cvs mailing list