[Xweb-developers] Re: Changes to XWeb
Brought to you by:
peterbecker
|
From: Peter B. <pe...@pe...> - 2003-11-06 13:09:21
|
Hendrik Lipka wrote:
>Thursday, November 6, 2003, 11:33:28 AM, you wrote:
>
>
>
>>syntax. I was thinking about using Ant-style syntax in some other spots
>>later on, i.e. the "$10" would be "{$10}" instead.
>>
>>
>
>In this case, it would be nice to have it done properly and to introduce
>named replacement, to be able to insert any value into a filename...
>
>
Were would the other values come from?
One thing I was thinking of is introducing parameters for the
documentStyles -- if you look at this site section as an example:
http://www.kvocentral.org/publications/index.html -- each year is
created from the same input file using the same stylesheet with just a
different parameter "year", which filters publications out of the input
file (BibTeXML). For each page I need a different documentStyle at the
moment, since there is not way to attach a parameter to the entries. At
the moment there are a bunch of definitions like this:
<documentStyle type="XMLPublications2003">
<xsl stylesheet="layout/generic.xsl" navigationElement="html">
<parameter name="nav.main.pos" value="left"/>
<parameter name="nav.sec.pos" value="nested"/>
<parameter name="nav.sec.visible" value="current"/>
<parameter name="nav.sec.firstEntry" value="section"/>
<parameter name="style.markup.firstLetter" value="on"/>
<parameter name="style.markup.linkTypes" value="on"/>
<parameter name="feature.include.footer"
value="footer.xml"/>
<parameter name="feature.internalLink.token" value="!"/>
<xsl stylesheet="layout/publications.xsl">
<parameter name="year" value="2003"/>
<xsl stylesheet="layout/replaceAuthors.xslt"/>
</xsl>
</xsl>
</documentStyle>
Good thing I don't change much in there and the copy and paste happens
only once a year, but it is definitely not the way I'd like to do it.
The first thing I'd like to change is the option to set a
property/parameter/variable as child of an <entry>, so the innermost
<parameter> of the <xsl> would be:
<parameter name="year" value="{$year}"/>
The other bit that's missing is reuse of tasks, in this case the layout
part is the same for most types on the site (apart from copying and the
BibTeX creation). Instead of giving the parameters for the layout every
time (and changing it everywhere if needed), I'd like to call other
tasks. The syntax I think of would be serial, not nested and I think of
introducing <task> as an element. A <documentStyle> would then define
the images to be rendered plus a task to call. Tasks can call each other
to allow maximum reuse.
[..log4j descriptions...]
Ok, it does sound quite handy and slightly better than util.logging.
Here are the main differences I have figured out so far -- + is for
log4j, - is for util.logging:
+ no search for the right logging.preferences. With util.logging you
have to either edit the file in the libs dir of the JVM you are
currently using or give some command line property to point to another
configuration. Not what I want my users to do, I'd like to send them a
file and say: put this in that dir and send me the file called XYZ after
you ran the program
- syntax is simpler in util.logging. Properties format seems good
enough, XML overkill.
+ more available outputs
- download size
+ works with older JDKs/JVMs
Not much difference as far as I can tell, but maybe it is not too bad an
idea if I just try it and check the details. The move to 1.4 could be
postponed for a while.
>>Do you have a pointer to a good log4j tutorial? Otherwise I can google
>>for one.
>>
>>
>
>Starting here is a good idea:
>http://jakarta.apache.org/log4j/docs/documentation.html
>The short manual, and the JavaDoc are a good start. Additionaly,
>http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/log4j/log4j.html
>makes a good read.
>
>You can also ask me for examples - I will the go and look for some of my
>code parts...
>
>
Ok, I'll read some of that and then just try.
>>Yeah -- maybe I should just go with the regex things for now since that
>>fits neatly in there, if people can't handle it but want to do something
>>similar, we can always add easier options later.
>>
>>
>
>I think many users will be happy with specifying order explicitly, as
>normally you won't have this much entries in the navigation. In most cases,
>only such directories as images or downloads contains too mucn entries to
>use a 'copy many files' tasks...
>
>
But the number scheme would give me a nice feeling of being back to
Basic V2 again :-)
I'll leave the <entryset> option with the usual regex replacement
abilites, but no extra options for the order for now -- let's see how
people use it. That's always the fun part -- I am quite astonished what
people made with XWeb so far. It was originally written for my sites,
then I published it and did the smart move of writing a manual, so now I
get emails from people I don't know every fortnight or so :-)
Peter
|