forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <>
Subject Re: Q: Integrate multipage externally generated content
Date Tue, 22 Feb 2005 13:26:48 GMT
På 22. feb. 2005 kl. 14.40 skrev Ferdinand Soethe:

> RG> However, I have remembered another way of doing what you want to 
> do, it
> RG> is a new feature and currently undocumented other than at
> RG>
> Cool. That looks just like the thing I was looking for. Will try to
> implement an example to understand it better. Would the fragments for
> site and tabs have the same header as the main files?

 From the author of that feature request: Here's a short example of how 
we have used it:-)

In site.xml:

<site xmlns="" href="" 
label="MyProj" tab="" >
     <about label="Home" tab="Home" >
         <index   href="index.html" label="Index" description="Welcome 
to" />
         <changes href="changes.html" label="Changes" description="The 
projects history" />
         <todo    href="todo.html" label="Todo" description="The plan 
for the project" />

     <xi:include href="doc/site-frag.xml#xpointer(/tech/*)" 


In site-frag.xml:

<?xml version="1.0" encoding="UTF-8"?>
   <techdoc href="doc/" label="Technical doc" tab="TechDoc">
     <index href="intro.html" label="Introduction" />
   <!-- add entries ad lib just as in site.xml -->

The same for tabs.xml and tabs-frag.xml.

The outer element in both fragment files are required to make the files 
valid XML files. Hence the reference to the content of that element in 
the XInclude.

It works like a charm, and having the full power of XInclude makes for 
a very flexible solution.


View raw message