forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@vankets.com>
Subject RE: build path variable
Date Thu, 20 Jun 2002 09:35:25 GMT
At 12:34 20/06/2002 +0400, you wrote:
> > From: Bert Van Kets [mailto:bert@vankets.com]
> >
> > This is a call to an Ant expert.
> > I was thinking of solving the hard coded path in the tabs.
> > To my opinion
> > the best solution is to get the path from Ant and use it in the
> > stylesheet.  I have been looking at the project.xtarget but
> > can't find the
> > parameter I can use in the stylesheet (something like
> > @build.path@).  I
> > have tried to use some variables with no succes.  This is why
> > I hard coded
> > it in the first place.
>
>I don't think that specifying the path info as a build parameter is a good
>idea, but currently I have no idea how to solve it better. What about
>relative links? I know that this requires calculation of relativeness for
>every nested level, but I don't think that it's impossible. Will think about
>it ASAP.

Relative links require a recalculation of the link on the tab on every page.
Assuming that we use specified URI space for every TAB, is't just a matter 
of a "starts-with" to know the selected tab (works this way now).
The calculation of the link on the active (non selected) tabs can be done 
as following:

Suppose we have
a download Tab with the URL 
http://xml.apache.org/xml-forrest/downloads/index.html
and a page with the URL http://xml.apache.org/xml-forrest/docs/howto/forms.html

The link on the tab needs to go from the page to the tab's main page (of 
course).
The following steps need to be taken:
1. drop the common part (here http://xml.apache.org/xml-forrest/)
2. calculate the difference in levels (number of "/" characters), convert 
to n times ../ to go up to the common level
3. add the target URL minus the common part (here downloads/index.html)

This results in ../../downloads/index.html, the correct relative path.

I don't see how we can do this string parsing in XSLT, at least without 
knowing the host and the project directory (and this is why we would use 
the relative path, because we don't want to use them).  Is a logicsheet in 
order here, or has anyone a better solution?


> > The problem is I'm not an Ant expert yet and need some assistance.
> > Can someone shine some light on this please?
> > Adding/using the build path in Ant makes it possible to build
> > to a specific
> > directory with working tabs by simply adding a parameter to the build
> > command.   The build path can then be modified in the cron
> > job by adding a
> > parameter and assure working tabs.
> >
> > Steven,  I have not yet found the time to look at Libre, but
> > can it be used
> > for the tabs too?
>
>I hope so. Hadn't time to look at it too, but as I understand it was
>invented to perform that kind of tasks, isn't it?

Guess I will put it on my To Do list and check it out ASAP.  My first 
glimpse says it's very promising.  Since it's in alpha state I doubt we can 
introduce it into Forrest now, even if it would solve the Tab problem.


> >
> > Konstantin, if you want to make the tab functionality
> > independent of the
> > directory structure, how would you do this?  There must be
> > some grouping of
> > different parts.  Isn't a directory tree the easiest way to
> > go.  If you
> > want to put the grouping in an XML tree we will have to place
> > an entry in
> > the tabs.xml file for every directory we want to be placed
> > under a certain
> > tab.  This will require some mods to the tabs functionality,
> > but nothing
> > difficult to it (of course).  I just thought it was easy to
> > have every sub
> > directory of a certain directory appear underneath a tab
> > automatically.  No
> > extra configuration needed.
>
>I think that tabs.xml should be a single file in the root directory. Is
>there a need for having different tab-sets for some parts of the site? If
>yes, then your approach is Ok: to have tabs.xml and use it for all the
>underneath directories.
>
>Regarding the independence (when did I said that, btw?):

Oops, my misunderstanding of your statement.  I meant URI space and not 
directory.  Of course the sitemap can solve this (what's a map:match for 
anyway :-)).  Tabs need to be mapped to the URI, of course.


>I just don't want a
>direct mapping of the URI space onto the directory structure, but this is
>easily achieved by the sitemap. We should define an URI space first and
>define how it should be displayed, e.g.:
>/                                       -- site root
>         index                           -- an introduction page
>         /home                           -- this should lead to the root
>directory
>                 /project                -- menu section
>                 /contributing           -- menu section
>                         primer          -- menu item
>         /docs
>         /forum
>         /about
>etc.
>
>Of course we should map this URI space to a directory structure, but the
>structure will be different, e.g.:
>         /home -- /xdocs/*
>         /docs  -- /xdocs/community/**
>         etc.
>
>(Disclaimer: this is an example, not a proposal).

Wouldn't it be great if all the XML.apache projects would use the same URI 
structure.  No matter what project you are interested in, you would be able 
to go to the docs by typing xml.apache.org/[project]/docs.  Uniformity 
amongst the projects will help usability a great deal and make the 
xml.apache site as a whole a lot more popular.  Isn't this what we are 
aiming for?


>I think that we should take a closer look at the libre and its
>possibilities.

Will do.

Bert


>Konstantin
>
> >
> > Bert
> >
> > --------------------------------------------------------------
> > -------------------------------
> > Please notify me if you did not receive this mail.
> >


Mime
View raw message