<html><head><link rel=StyleSheet href='api-content.css' TYPE='text/css' MEDIA='screen'><title>.Named buffers</title> <script> function navToEntry(entry) { window.location.href='api-' + entry + '.html'; } function navToGroup(group) { var f = parent.frames['toc-container']; if (!f) window.open ('sparse-toc.html#' + group, 'toc_container'); else { if (f.location.href.search('abc') != -1) f.location.href = 'sparse-toc.html#' + group; else f.location.hash = group; } } </script> </head><body bgcolor='white'> <!-- -- HEADS UP! This page was *GENERATED* by APIDOC, -- DO NOT EDIT THIS FILE BY HAND! -- See http://www.mozilla.org/projects/apidoc for information on APIDOC -- The original source file was sablot.xml --> <h1 class='title'>Sablotron Guide and Reference</h1> <center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'> <tr><td class='entry-heading'> <table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr> <td class='entry-title' valign='center'><font size='+5'>Named buffers</font></td> <td class='entry-type' align='center' width='25%'>.Implementation Notes</td> </tr></table> </td></tr> <tr><td class='entry-summary'> <h4 class='entry-subhead'>Summary</h4> Sablotron can store XML strings and parsed trees to so called named buffers. </td></tr> <tr><td class='entry-description'> <h4 class='entry-subhead'>Description</h4> Sablotron introduces an URI scheme 'arg:' which enables one to use strings and parsed trees in named memory buffers. Named buffers are can be set using <code><a href='javascript:navToEntry("SablotAddArgBuffer");'>SablotAddArgBuffer</a></code> or <code><a href='javascript:navToEntry("SablotAddArgTree");'>SablotAddArgTree</a></code> functions. The content of buffers can be accessed with the <code>document()</code> function or <code>xsl:include/import</code> instructions (e.g. document('arg:/my_buffer')/root). <P> The buffer names can have a tree-like structure so that a relative reference from a document in a buffer can be resolved as pointing to another buffer. <P> For instance, if we invoke Sablotron specifying that a buffer named <code>/mybuf/1</code> contains the string "<a>contents</a>", then the expression <code>document('arg:/mybuf/1')/a</code> has string-value <code>"contents"</code>. If the document in <code>arg:/mybuf/1</code> contained a relative URI reference <code>"../theirbuf/2"</code> then this would be resolved as pointing to <code>"arg:/theirbuf/2"</code>. </td></tr> <tr><td class='entry-seealso'> <h4 class='entry-subhead'>See Also</h4> <table class='seealso-table'> <tr class='seealso-groups'><td>Groups</td> <td>[ <a href='javascript:navToGroup("GROUP_.Implementation Notes")'>.Implementation Notes</a> ]</td></tr> <tr class='seealso-internals'><td>Entries</td> <td>[ <a href='javascript:navToEntry("SablotAddArgBuffer");'>SablotAddArgBuffer</a> | <a href='javascript:navToEntry("SablotAddArgTree");'>SablotAddArgTree</a> ]</td></tr> </table> </td></tr> </table></center><br> © 2002-2003 Ginger Alliance<BR><i>revision 03-06-30</i><BR> <center>This page was generated by <a href='http://www.mozilla.org/projects/apidoc' target='other_window'><b>APIDOC</b></a></center> </body></html>