+ <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>
This commit is contained in:
10
doc/cxml.css
10
doc/cxml.css
@ -10,10 +10,11 @@ div.sidebar-title {
|
||||
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-title a {
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -179,6 +179,18 @@
|
||||
specified using a CDATA section in the source document. Else,
|
||||
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>
|
||||
@ -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>
|
||||
|
||||
37
doc/sax.xml
37
doc/sax.xml
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user