I lied: when I went back and looked at my code I found I had used a mixture of Tero's approach and my suggestion.

Context

The ruleset has a large array of spells, which fall into six classes (Contact, Enchantment, etc) and I want to show either a single class of spells, or all spells. The list which displays the spells then has a filter control (magnifying glass) to allow you to search for a sub-string in the spell name.

Approach

The database has a single list of spells. Each spell has a 'type' string node, and the library shortcuts include a 'source' node (which points to the single list) and a 'spelltype' node (which is either empty, to show the full list, or specifies which type of spell to display).

There is a custom reference window class which loads the spell data from its onInit handler by iterating over all of the nodes in the spell list and only adding those which match the spelltype criterion. The onFilter handler is then used to manage the filter control and only display entries which match the user's search string.

Example Data

The link entry in the reference module looks like this:
Code:
<id-00002>
  <listlink type='windowreference'>
    <class>referencespells</class>
    <recordname>..</recordname>
  </listlink>
  <spelltype type='string'>Contact</spelltype>
  <source type='string'>reference.spells@Reference</source>
</id-00002>
You can see that the list link points to the current node, not to the node which contains the list of spells. That means the reference window class is instantiated at this point. The window class therefore has access to the spelltype argument, but a source node also tells it where to find the actual spells.

The spells themselves look like this:
Code:
<reference>
  <spells>
:
    <id-00069>
      <name type='string'>Contact Ghoul</name>
      <type type='string'>Contact</type>
      <text type='formattedtext'>
        <p>The spell costs 8 magic points to cast, and 1D3 Sanity points.Unless there are no ghouls nearby, it succeeds automatically. Ghouls are found wherever large concentrations of humans are, especially near graveyards and crypts. Places of burial more than a century old are propitious locations for this spell. Moonlit nights are best.</p>
      </text>
    </id-00069>
:
  </spells>
</reference>
Window Class

The onInit event handler in the window class loads the spells from the source node that match the given spelltype:
Code:
function onInit()
  local src = window.getDatabaseNode().createChild("source","string").getValue();
  local source = nil;
  local spelltype = window.getDatabaseNode().createChild("spelltype","string").getValue();
  if src and src~="" then
    source = DB.findNode(src);
  end
  if source then
    for k,node in pairs(source.getChildren()) do
      if spelltype=="" or node.createChild("type","string").getValue()==spelltype then
        createWindow(node);
      end
    end
  end
end
I was reluctant to post this here, as it is a fairly thorough copy of code from a DA ruleset which hasn't even been published yet. Vroomfogle is working on another DA project and I would have preferred to contact him direct.

That said, this stuff will be under OGL and therefore available for folks to examine and re-use once it hits the streets, provided you acknowledge DA's and SW's contribution.

Stuart