[daisy] Hierarchical document structure visible in navigation tree

Bruno Dumon bruno at outerthought.org
Thu Jan 3 04:20:50 CST 2008


On Mon, 2007-12-17 at 15:53 +0100, ccmail wrote:
> ccmail wrote:
> > ccmail wrote:
> >> Hi all,
> >>
> >> Is this possible to create hierarchical tree of documents visible 
> >> automatically in the navigation tree of daisy wiki? If so - how can I 
> >> achieve this? I suspect that if it's possible then via hierarchical 
> >> link field - but this field type is not described (or I didn't manage 
> >> to find it) anywhere. I tried to create a field with following params:
> >> name: MyField
> >> type: link
> >> hierarchical: true
> >> selection list :query based parent-linked
> >> link field: MyField
> >>
> >> and then add such a field to MyDocument
> >>
> >> unfortunately it causes exception when trying to access "fields" tab 
> >> while creating new instance of MyDocument...
> >>
> >> So my question could be rephrased as:
> >> if navigation tree can be made to display automatically (via query 
> >> node in the tree?) hierarchical set of documents based on hierarchic 
> >> link field of a document then how should I set it up to work instead 
> >> of throwing exceptions at me?
> > And this is the exception being thrown while accessing fields tab:
> >
> > Error fetching hierarchical query selection list data.
> > Received exception from repository server.
> > Parent-linked selection list field is not primitive (= non-multivalue 
> > and non-hierarchical): ParentHelpEntry
> >
> > Regards,
> > Wojtek
> I've already figured out that it's happening when such a field is marked 
> as hierarchical. If I set it as non-hierarchical then it's working: 
> field value selection list is showing hierarchical list of possible 
> entries. The problem is that query embedded in the navigational tree is 
> not showing proper tree if I insert query like:
> 
> SELECT $MyLinkField, name WHERE documentType = 'MyLinkedDocument'
> 
> So - is there a way to create such a tree without hard-coding tree 
> structure neither in navigation descriptor nor static list of values of 
> some custom hierarchical string-based categorizing field?
> 

Yes, simply select the hierarchical field in the navigation tree query,
for example:

select $MyField, name where documentType = 'MyDocument'

If I understand your example correctly, in your query you are selecting
the documents which define the hierarchical tree, and not the documents
which are classified in that hierarchical tree.

We probably need a tutorial showing how to use this stuff...

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org


More information about the daisy mailing list