You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Thomas Singer <ve...@regnis.de> on 2002/05/24 16:39:56 UTC

Velocity for off-line website generation

Hello,

I want to use Velocity for off-line website generation. In other words, I 
want to compile some content files, that use templates to static .html 
files. For me is important, that all pages have the same header, the same 
footer and the same layout overall. The navigation should look the same, 
but it is differs from the static header/footer, because it depends on the 
page, what link is active and what not (there need not to be a link to the 
current page).

Does somebody knows, whether there is already a tool available (that uses 
Velocity?) or should I start myself?

Best regards,
Tom


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity for off-line website generation

Posted by Thomas Singer <th...@regnis.de>.
Thanks all for there valuable input!

Best regards,
Tom


At 12:18 24.05.2002 -0400, you wrote:
>On 5/24/02 11:45 AM, "Gabriel Sidler" <si...@teamup.ch> wrote:
>
> > Hi Tom,
> > I'd recommend DVSL. It uses a style sheet based approach, similar
> > to XSLT. All Velocity doc is generated with DVSL, for example.
> > To see a working example look at how the doc is generated in
> > the DVSL distribution.
> >
> > More info is here: http://jakarta.apache.org/velocity/dvsl/index.html
> >
> > Hope this help
> >
> > Gabe
> >
>
>DVSL might be helpful for this if you want to control everything from some
>kind of 'master document' :
>
>[NOTE : I'm just winging it here...]
>
><stuff>
>
>   <misc>
>     <default_header>defaultheader.file</default_header>
>     <default_footer>defaultfooter.file</default_footer>
>     <default_template>foo.vm</default_template>
>   </misc>
>
>   <pages>
>     <page>
>       <filename>outfile.html</filename>
>       <header>header.file</header>
>       <body>body.file</body>
>     </page>
>   </pages>
>
></stuff>
>
>
>Then the DVSL might be
>
>#match("stuff")
>
>   #set($defheader = $node.selectSingleNode("misc/default_header").value())
>   #set($deffooter = $node.selectSingleNode("misc/default_footer").value())
>   #set($deftemplate =
>$node.selectSingleNode("misc/default_template").value())
>
>   $context.applyTemplates("pages/*")
>#end
>
>#match("page")
>
>   #set($file = $node.filename.value())
>   #set($header = $node.header.value())
>   ...etc...
>
>   // to do the output, you might use one of those
>   // output to file tools we have talked about on
>   // this list, or make a tool that takes the filename, header, footer and
>   // template name as args and outputs to the filename...
>
>#end
>
>
>Hope this give you an idea...
>
>geir
>
> >
> >
> >
> > Thomas Singer wrote:
> >
> >> Hello,
> >>
> >> I want to use Velocity for off-line website generation. In other words,
> >> I want to compile some content files, that use templates to static .html
> >> files. For me is important, that all pages have the same header, the
> >> same footer and the same layout overall. The navigation should look the
> >> same, but it is differs from the static header/footer, because it
> >> depends on the page, what link is active and what not (there need not to
> >> be a link to the current page).
> >>
> >> Does somebody knows, whether there is already a tool available (that
> >> uses Velocity?) or should I start myself?
> >>
> >> Best regards,
> >> Tom
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:
> >> <ma...@jakarta.apache.org>
> >> For additional commands, e-mail:
> >> <ma...@jakarta.apache.org>
> >>
> >> .
> >>
> >
>
>--
>Geir Magnusson Jr.
>Research & Development, Adeptra Inc.
>geirm@adeptra.com
>+1-203-247-1713
>
>
>
>--
>To unsubscribe, 
>e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity for off-line website generation

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 5/24/02 11:45 AM, "Gabriel Sidler" <si...@teamup.ch> wrote:

> Hi Tom,
> I'd recommend DVSL. It uses a style sheet based approach, similar
> to XSLT. All Velocity doc is generated with DVSL, for example.
> To see a working example look at how the doc is generated in
> the DVSL distribution.
> 
> More info is here: http://jakarta.apache.org/velocity/dvsl/index.html
> 
> Hope this help
> 
> Gabe
> 

DVSL might be helpful for this if you want to control everything from some
kind of 'master document' :

[NOTE : I'm just winging it here...]

<stuff>

  <misc>
    <default_header>defaultheader.file</default_header>
    <default_footer>defaultfooter.file</default_footer>
    <default_template>foo.vm</default_template>
  </misc>

  <pages>
    <page>
      <filename>outfile.html</filename>
      <header>header.file</header>
      <body>body.file</body>
    </page>
  </pages>

</stuff>


Then the DVSL might be

#match("stuff")

  #set($defheader = $node.selectSingleNode("misc/default_header").value())
  #set($deffooter = $node.selectSingleNode("misc/default_footer").value())
  #set($deftemplate =
$node.selectSingleNode("misc/default_template").value())

  $context.applyTemplates("pages/*")
#end

#match("page")

  #set($file = $node.filename.value())
  #set($header = $node.header.value())
  ...etc...

  // to do the output, you might use one of those
  // output to file tools we have talked about on
  // this list, or make a tool that takes the filename, header, footer and
  // template name as args and outputs to the filename...
 
#end


Hope this give you an idea...

geir

> 
> 
> 
> Thomas Singer wrote:
> 
>> Hello,
>> 
>> I want to use Velocity for off-line website generation. In other words,
>> I want to compile some content files, that use templates to static .html
>> files. For me is important, that all pages have the same header, the
>> same footer and the same layout overall. The navigation should look the
>> same, but it is differs from the static header/footer, because it
>> depends on the page, what link is active and what not (there need not to
>> be a link to the current page).
>> 
>> Does somebody knows, whether there is already a tool available (that
>> uses Velocity?) or should I start myself?
>> 
>> Best regards,
>> Tom
>> 
>> 
>> -- 
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 
>> .
>> 
> 

-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity for off-line website generation

Posted by Gabriel Sidler <si...@teamup.ch>.
Hi Tom,
I'd recommend DVSL. It uses a style sheet based approach, similar
to XSLT. All Velocity doc is generated with DVSL, for example.
To see a working example look at how the doc is generated in
the DVSL distribution.

More info is here: http://jakarta.apache.org/velocity/dvsl/index.html

Hope this help

Gabe




Thomas Singer wrote:

> Hello,
> 
> I want to use Velocity for off-line website generation. In other words, 
> I want to compile some content files, that use templates to static .html 
> files. For me is important, that all pages have the same header, the 
> same footer and the same layout overall. The navigation should look the 
> same, but it is differs from the static header/footer, because it 
> depends on the page, what link is active and what not (there need not to 
> be a link to the current page).
> 
> Does somebody knows, whether there is already a tool available (that 
> uses Velocity?) or should I start myself?
> 
> Best regards,
> Tom
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> .
> 


-- 
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity for off-line website generation

Posted by Thomas Singer <th...@regnis.de>.
Hello Simon,

thank you very much. Looking at Texen seems to be exactly what I wanted; 
I'll give it a try. I already have seen Texen mentioned on Velocity's side, 
but never expected that it would be something I could find useful :-)

Best regards,
Tom


At 16:02 24.05.02 +0100, you wrote:
>Hi Tom,
>
>I'm sure others will provide a better answer (and with some relish!) but 
>there are certainly tools that use Velocity which perform what you're 
>looking for: any of Anakia, Texen, or DVSL could be used for this, but it 
>looks to me like Texen would be the most appropriate in thie instance.
>
>Check it out at: http://jakarta.apache.org/velocity/texen.html
>
>- simon
>
>
>
>Thomas Singer wrote:
>
>>Hello,
>>I want to use Velocity for off-line website generation. In other words, I 
>>want to compile some content files, that use templates to static .html 
>>files. For me is important, that all pages have the same header, the same 
>>footer and the same layout overall. The navigation should look the same, 
>>but it is differs from the static header/footer, because it depends on 
>>the page, what link is active and what not (there need not to be a link 
>>to the current page).
>>Does somebody knows, whether there is already a tool available (that uses 
>>Velocity?) or should I start myself?
>>Best regards,
>>Tom
>
>
>
>--
>To unsubscribe, 
>e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity for off-line website generation

Posted by Simon Christian <si...@cpd.co.uk>.
Hi Tom,

I'm sure others will provide a better answer (and with some relish!) but 
there are certainly tools that use Velocity which perform what you're 
looking for: any of Anakia, Texen, or DVSL could be used for this, but 
it looks to me like Texen would be the most appropriate in thie instance.

Check it out at: http://jakarta.apache.org/velocity/texen.html

- simon



Thomas Singer wrote:

> Hello,
> 
> I want to use Velocity for off-line website generation. In other words, 
> I want to compile some content files, that use templates to static .html 
> files. For me is important, that all pages have the same header, the 
> same footer and the same layout overall. The navigation should look the 
> same, but it is differs from the static header/footer, because it 
> depends on the page, what link is active and what not (there need not to 
> be a link to the current page).
> 
> Does somebody knows, whether there is already a tool available (that 
> uses Velocity?) or should I start myself?
> 
> Best regards,
> Tom
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>