forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric BURGHARD <eburg...@free.fr>
Subject Re: [CONTRIB] auto generation of menus
Date Wed, 08 Oct 2003 20:41:34 GMT
Le Mercredi 08 Octobre 2003 13:12, Jeff Turner a écrit :

> True.
>
> Is there any reason we shouldn't just insist on the use of
> XPathDirectoryGenerator?  Why bother maintaining a subset of
> functionality for DirectoryGenerator?  Having labels equal to the
> filename (minus extension) sounds very unappealing to me.
>

Yeah ;-) you're the integrator, you choose. But it was for backward 
compatibility too (labels equal to the filename). Also you're right: 
XPathDirectoryGenerator is compatible with DirectoryGenerator and XPath is 
only applied on $xmlFiles regexp (match *.xml by default). Who do the most do 
the less. But it sounds weird to me to call XPathDirectoryGenerator on my 
jpegs directories. Just a question of taste.

>
> .. merged with that in CVS.
>

Thanks jeff !

> >
> > Yeah ! much more flexibility like this ! Thus you can already achieve
> > quite the same behavior with the actual sorting mechanism and without the
> > hassle of programming a constraints resolution engine. Use directory
> > hierachie a relaxed numbering scheme (like sysV init filenames):
> >
> > directory: GettingStarted
> > file1
> > <meta name="menu-order">S5</meta>
> >
> > index.xml
> > <meta name="menu-order">S0</meta>
> >
> > primer.xml
> > <meta name="menu-order">S20</meta>
> >
> > and do your sorting with
> >
> > <map:transform src="resources/stylesheets/documentdirectory2book.xsl">
> >    <map:parameter name="sort-select"
> > value="dir:xpath/meta[@name='menu-order']"/>
> > </map:transform>
>
> That almost works currently, except the sort is lexical not numeric so
> S10 < S2.
>

Yeah of course ! sorry for the typos: S00 and S05 (the real initV scheme ;-). 
We can tell xslt to sort numeric by an xsort attribute, but it's numeric only 
(not num and alpha mixed).

> > PS: What did the pathutils.xsl do in resources/skins/common/xslt/html
> > directory ? Shouldn't it be placed in resources/stylesheets ?
>
> It originated from the common need in skin XSLTs.  Since its generic it
> makes a bit more sense in resources/stylesheets, but moving it would
> likely break custom skins which expect it in its existing location.
>
>

Ok.

> --Jeff

A+


Mime
View raw message