cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wagner <mawag...@mail.uni-mainz.de>
Subject xml site organization: how to make it growable?
Date Wed, 29 Nov 2000 22:56:10 GMT
Hi,

I have defined a web site with one menu and a lot of pages as follows:

<web name="MyWeb">

 <menu>
  <group name="About me">
   <item id="1" name="My Interests"/>
   <item id="2" name="My Bookmarks"/>
  </group>
  <group name="...">
   ...
  </group>
 </menu>

 <page id="1" name="My Interests">
  ...content...
 </page>

 <page id="2" name="My Bookmarks">
  ...content...
 </page>

 </web>

Assume this code in a file called "myweb.xml".

I then use parameters to select the actual page to be displayed, e. g.
http://localhost/myweb.xml?id=2

Within my xsl stylesheet I use this parameter to select one page from
the set of defined pages:

<xsl:apply-templates select="page[@id=$id]"/>

This all works fine, but when I have many pages, the organization gets
inefficient. I do not want to keep all page elements in one file. So I
have to declare them as external entities at the beginning and I have to
reference them within the web element.

Isn't it possible to include an external xml file with one single
statement, textually?

Or:

How can I minimize my work when adding or changing my pages?

Many thanks,

Markus


Mime
View raw message