forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vassilis Koutavas" <>
Subject Re: Multiple html pages from single xml?
Date Thu, 04 Jan 2007 20:07:53 GMT
Sorry for the slow response. Connecting to the internet is not so easy
for me these days.
So my problem is this: I'm trying to use Forrest to create a web site
to showcase info about the buildings built by some company.  I have
created an XML file that contains the data of the buildings:

<buildings name="sorable-table-2">
        <img src="12102-00001-thumb.jpg" alt="12102-00001"/>

there are also other tags around the 'buildings' tag that are defined
in the 'document' dtd
I've created the appropriate DTD (as an extension of the document
DTD), and XSL according to the documentation. This way I produce one
html page that has a table of all the buildings.

Ideally I would like to do the following two things:

1) to create more than one pages with tables of all the buildigns with
different formatting (e.g. different grouping and sorting). I guess
this is not too difficult to do using the pipelines (where can I read
about how they work?).

I'm thinking of the following "workflow":

  [raw XML containing only the 'buildings' tag] --> [XML 1 wrapping
the 'buildings' tag around some document tags like 'section',
'title',etc] ---> [HTML 1]

  [raw XML containing only the 'buildings' tag] --> [XML 2 wrapping
the 'buildings' tag around *other* document tags] ---> [HTML 2]

2) I need to create one detailed page for each building. I would like
to create these pages from the same 'buildings' XML. This would mean
some more complicated workflows:

  ['buildings' XML] --> [XML 3.1 adding document tags] ---> [HTML 3.1]
  ['buildings' XML] --> [XML 3.2 adding document tags] ---> [HTML 3.2]
  ['buildings' XML] --> [XML 3.3 adding document tags] ---> [HTML 3.3]
  ................. (length depends on the number of buildings in the
'buildings' XML file).....

 If it is easier, instead of one big 'buildings'  XML file, I could
have one small XML file for each building, which would make the
creation of the detailed pages trivial, but I think it would
complicate the creation of the html pages that contain the tables of

If worse comes to worse I could maintain one big XML file that would
produce all of the summary pages, and one XML for each building to
produce the detailed pages. I don't like the redundancy of information

Thank you all for your interest to my question.


On 1/3/07, Ross Gardler <> wrote:
> Ross Gardler wrote:
> > Gunther Sablon wrote:
> >> Hi
> >> Yes there is.
> >> In the sitemap you can define multiple pipelines, each with a
> >> different pattern (indicating the URL to be used to retrieve the page)
> >>              <map:match pattern="......xml">
> >> but with the same file generator (indicating the file to be used)
> >>                 <map:generate type="file" src="......xml"/>
> >> Typically a different transformation generates different content from
> >> the same source file.
> >> Gunther
> >
> > That is certainly true, but it may not be the best way to address
> > Vassilis' issue. It may be better to use the locationmap to resolve the
> > stylesheet and therefore only have a single generator. We need to know
> > more about the use case to evaluate which is the best approach.
> Sorry, should read "single match" not "single generator"
> Ross


View raw message