XPath functions

These are xpath extension functions in the Tinderbox namespace (use them prefixed by "tb:" in your xpaths.)

Functions that expect a node argument will always take the current node by default, enabling short forms such as


Also note, many functions that give notes from the Tinderbox document are mostly useful when called from within stylesheets, as those stylesheets generally do not operate on the Tinderbox document.


Returns the note containing the command


For XSL stylesheets:

Retrieves the number of text characters already in the note being constructed. Useful for expressing link anchors in terms of text positions.


Generate an error message... Used in "xmlResult" to signal an error.

eval-script(scriptText, args...)

evaluate an arbitrary python function, given in the text.

That function will recieve the TinderboxDoc instance as first arguments, and then any other argument passed to the eval-script.


Returns the text from a given URL.


Given a set of nodes, give all the notes which are linked from them (or to them if direction evaluates to false.)

If linkName is specified, only the links of this type will be considered.

local-property(propName, notes?)

Evaluate the value of a named Tinderbox property on the current note. Will return a value only if the note defines this property locally. Compare property().


Return an ID for a new Tinderbox node. This ID does not exist in the document, and will not be used again.


Return a (list of) Tinderbox note items given a (list of) numeric ID.


given an alias note, return the underlying note.


For use in XSL stylesheets:

Returns the note being constructed. Useful for declaring a link on an existing note.

property(propName, notes?)

Evaluate the value of a named Tinderbox property on the current note. If the value is not defined for that note, will go up the prototype chain to look for the value, and if it is not found, it will return the default for that property.


From a (list of) note, retrieve the name of its prototype. (I use the name to conform to the way Tinderbox handles Prototype, somewhat as a property.)


Returns the prototype note that has a given name, if any.

result-of(command note)

This retrieves the result of the command note passed as a parameter.

It is mostly useful in combination with commands that create notes, but it will also retrieve a value from an Eval command.

It is also used to retrieve the value of the iteration variable in a ForEach


Returns the root note of the Tinderbox document.


Returns the note which is the target of the current command. Allows to anchor XPaths for search.

Last modified on 20/05/04. Created by Marc-Antoine Parent with Tinderbox 3.0.4.