Sablotron Guide and Reference

Named buffers .Implementation Notes

Summary

Sablotron can store XML strings and parsed trees to so called named buffers.

Description

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 SablotAddArgBuffer or SablotAddArgTree functions. The content of buffers can be accessed with the document() function or xsl:include/import instructions (e.g. document('arg:/my_buffer')/root).

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.

For instance, if we invoke Sablotron specifying that a buffer named /mybuf/1 contains the string "<a>contents</a>", then the expression document('arg:/mybuf/1')/a has string-value "contents". If the document in arg:/mybuf/1 contained a relative URI reference "../theirbuf/2" then this would be resolved as pointing to "arg:/theirbuf/2".

See Also

Groups [ .Implementation Notes ]
Entries [ SablotAddArgBuffer | SablotAddArgTree ]

© 2002-2003 Ginger Alliance
revision 03-06-30
This page was generated by APIDOC