forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <>
Subject Re: Plugging into a site.xml
Date Wed, 16 Mar 2005 07:35:41 GMT
På 16. mar. 2005 kl. 08.14 skrev Ferdinand Soethe:

> What I don't know/ haven't asked if this works with tabs as well, but
> you could always ask Sjur.

It does work, without problems. Actually, out present use of the 
XInclude enhancements in site.xml and tabs.xml utilise XPointer (part 
of XInclude) to extract fragments of an external file to create several 
tabs. That is, we have all our external modifications in one file, but 
extract once for each tab we want to add to tabs.xml. It looks like:

<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab 
V1.1//EN" "">
<tabs title="Divvun" software="Divvun" copyright="Norgga Sámedikkis" >
     <tab dir="" id="Home" label="Home" indexfile="index.html" >
         <tab dir="" id="northern-sami" label="Davvisámegiella" 
indexfile="index_sme.html" />
         <tab dir="" id="lule-sami"     label="Julevsámegiella" 
indexfile="index_smi.html" />
         <tab dir="" id="norwegian"     label="Norsk"           
indexfile="index_nb.html" />
         <tab dir="" id="swedish"       label="Svenska"         
indexfile="index_sv.html" />
         <tab dir="" id="finnish"       label="Suomeksi"        
indexfile="index_fi.html" />

     <tab id="adm" label="Administration" dir="adm" 
indexfile="index.html" >
         <tab id="adm-gen" label="General" dir="adm" 
indexfile="index.html" />
         <tab id="reports" label="Reports" dir="adm/reports" 
indexfile="monthoverview.html" />

     <tab href="" label="Sami Disamb. Proj." />

     <xi:include href="doc/tabs-frag.xml#xpointer(/tabs/tab[1])" 
     <xi:include href="doc/tabs-frag.xml#xpointer(/tabs/tab[2])" 


The external tabs file (named tabs-frag.xml in our case) looks like 

   <tab dir="doc" id="TechDoc" label="Tech. doc" indexfile="intro.html" >
     <tab dir="doc/admin" id="admin" label="Project" 
indexfile="workplan.html" />
     <tab dir="doc/admin/weekly" id="weekly" label="Weekly" 
indexfile="index.html" />
     <tab dir="doc/infra" id="infra" label="Infrastucture" 
indexfile="workenvironment.html" />
     <tab dir="doc/lang"  id="lang"  label="Languages" 
indexfile="index.html" />
     <tab dir="doc/ling"  id="ling"  label="Linguistics" 
indexfile="common.html" />
     <tab dir="doc/tools" id="tools" label="Tools" 
indexfile="tools.html" />
   <tab id="how" label="HowTos" dir="doc" indexfile="howtos.html" />

Since the site.xml and its external extensions were quoted in 
Ferdinand's e-mail, I won't repeat it here. But suffice to say that you 
can include anything that is possible to express in XInclude, which 
include the full power of XPointer, assuming that your XInclude 
processor (ie the Cocoon XInclude processor) can handle it. I am not 
aware of any limitations, but I haven't looked for them either.


View raw message