You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@freemarker.apache.org by Pradeep Murugesan <pr...@outlook.com> on 2015/10/05 11:15:09 UTC

RE: Freemarker manual Local set up

Hi Daniel,

 I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
I will try to complete things within this week. 
Pradeep.

> Date: Tue, 29 Sep 2015 21:45:41 +0200
> From: ddekany@freemail.hu
> To: pradeepmurugesan@outlook.com
> CC: dev@freemarker.incubator.apache.org
> Subject: Re: Freemarker manual Local set up
> 
> FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> information was missing from the README.txt... I have fixed that now.
> The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> you need to adjust the JAVA_HOME environment variable for that.
> (Clearing the Ivy or Ant directories is not needed.)
> 
> 
> Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> 
> > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> > still facing the same issue. Have any of you guys faced this already
> > Pradeep.
> >
> >> From: pradeepmurugesan@outlook.com
> >> To: dev@freemarker.incubator.apache.org
> >> Subject: RE: Freemarker manual Local set up
> >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> >> 
> >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
> >> But end up in the following error.
> >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
> >> 
> >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
> >> Please guide me.
> >> Also,
> >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
> >> 
> >> Pradeep.
> >> 
> >> 
> >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> >> > From: ddekany@freemail.hu
> >> > To: dev@freemarker.incubator.apache.org
> >> > Subject: Re: Freemarker manual Local set up
> >> > 
> >> > The Manual is in the "freemarker" project, under src/manual. It also
> >> > uses docgen of course. (You can download the latest docgen artifact
> >> > with running `ant update-deps` in the "freemarker" project.) The
> >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
> >> > 
> >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
> >> > what's not described there is probably undocumented...
> >> > 
> >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
> >> > and JavaScript that will be needed. (Both the Web site and the Manual
> >> > is built from DocBook XML by Docgen.)
> >> > 
> >> > -- 
> >> > Thanks,
> >> >  Daniel Dekany
> >> > 
> >> > 
> >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
> >> > 
> >> > > Hi Daniel,
> >> > >    I could see that freemarker manual is part of the site
> >> > > http://freemarker.org/docs/index.html
> >> > > Since that is generated using the doc-gen, I am trying to look into
> >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
> >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
> >> > >
> >> > > I am trying to get the manual up and running locally to connect
> >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
> >> > > Please guide me.
> >> > > Pradeep.                                          
> >> > 
> >>                                         
> >                                           
> 
> -- 
> Thanks,
>  Daniel Dekany
> 
 		 	   		  

RE: Freemarker manual Local set up

Posted by Pradeep Murugesan <pr...@outlook.com>.
Hi Daniel,
 This is what I was looking for. I will give it a try thank you.
BTW I have asked a question regarding sibling of .node that gets passed through to the macro. Kindly reply for the same when you find time, so that tomorrow morning my time will start working on it.
Pradeep.

> Date: Mon, 12 Oct 2015 15:09:32 +0200
> From: ddekany@freemail.hu
> Subject: RE: Freemarker manual Local set up
> To: dev@freemarker.incubator.apache.org
> 
> You don&#39;t need to use Ant at all while developing. Just run Docgen&#39;s command line class from Eclipse. Of course, you need to add the required command line arguments under the Run configuration.
> Pradeep Murugesan <pr...@outlook.com> írta:
> >Hi Evangelia,
> >   Thanks for your pointers. I had gone through that and I am adding logs to understand the flow. I have a couple of questions there.
> >Lets say in order to debug Transform.java or other Java files I am adding logger.info and check what happens.
> >1. Is there a way I can issue logger statements inside the templates.2. Is it possible to enable debugger in docgen code and while generating manual from freemarker can I put breakpoints and check in Transform.java ?
> >
> >I am asking this because I need to do 3 steps whenever I change the docgen code
> >1. Do a publish-override2. go to freemarker and do update-deps3. then issue a ant manualOffline.
> >Is this the way it should work or am I doing something different.
> >Pradeep.
> >
> >> Date: Mon, 12 Oct 2015 00:25:10 -0700
> >> Subject: Re: Freemarker manual Local set up
> >> From: evangeliad@gmail.com
> >> To: dev@freemarker.incubator.apache.org; ddekany@freemail.hu
> >> 
> >> Did you run docgen locally, too? If you clone docgen, then run `ant
> >> publish-override` in docgen, then in freemarker run
> >> `ant manualFreemarkerOrg` it should work.  This works on OS X and on
> >> Windows 7.
> >> 
> >> Did you double check your version of Java and Ivy? When I do `ivy -version
> >> && java -version` i get this:
> >> 
> >> Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/
> >> 
> >> java version "1.8.0_60"
> >> 
> >> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
> >> 
> >> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
> >> 
> >> 
> >> 
> >> 
> >> On Sun, Oct 11, 2015 at 10:40 AM, Daniel Dekany <dd...@freemail.hu> wrote:
> >> 
> >> > I&#39;m not sure where exactly you stuck, but I try to give some pointers.
> >> > Read http://freemarker.org/docs/xgui.html if you haven&#39;t. As you will
> >> > see there, you got the current XML node as .node in the programlisting
> >> > macro, and you can move around in the DOM tree from there, like
> >> > examine the previous/next programlisting, etc.
> >> >
> >> > As of shrinking the content, certainly you should work with a
> >> > minimalistic docbook. I don&#39;t know what error you get. (Of course the
> >> > XML must be well-formed XDocBook.)
> >> >
> >> > --
> >> > Thanks,
> >> >  Daniel Dekany
> >> >
> >> >
> >> > Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
> >> >
> >> > > Hi Daniel,
> >> > >   I am still trying to knock it down but in vain. I dig down to
> >> > > programListing macro in NodeHandlers.ftlh and I am lost there as what is
> >> > going on.
> >> > > I tried to shrink the content in book.xml and ran docgen to
> >> > > understand where do i need to inject the logic but that approach threw
> >> > few other errors.
> >> > >
> >> > > It comes all the way down to generateHTMLFile_inner where we get
> >> > > page.fthl and process it and I am not able to proceed further.
> >> > > Could you please give me a clue ?
> >> > > Pradeep.
> >> > >> From: pradeepmurugesan@outlook.com
> >> > >> To: dev@freemarker.incubator.apache.org
> >> > >> Subject: RE: Freemarker manual Local set up
> >> > >> Date: Mon, 5 Oct 2015 14:45:09 +0530
> >> > >>
> >> > >> Hi Daniel,
> >> > >>
> >> > >>  I am going through the docgen code and its taking some time to clearly
> >> > get what is happening in the Transform.java.
> >> > >> I am tracing down to the part where to check if the previous node is
> >> > frmDataModel if the current node is Template so that I have a hidden form
> >> > and try it out button. I am facing some challenges there.
> >> > >> I will try to complete things within this week.
> >> > >> Pradeep.
> >> > >>
> >> > >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> >> > >> > From: ddekany@freemail.hu
> >> > >> > To: pradeepmurugesan@outlook.com
> >> > >> > CC: dev@freemarker.incubator.apache.org
> >> > >> > Subject: Re: Freemarker manual Local set up
> >> > >> >
> >> > >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> >> > >> > information was missing from the README.txt... I have fixed that now.
> >> > >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> >> > >> > you need to adjust the JAVA_HOME environment variable for that.
> >> > >> > (Clearing the Ivy or Ant directories is not needed.)
> >> > >> >
> >> > >> >
> >> > >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> >> > >> >
> >> > >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> >> > >> > > still facing the same issue. Have any of you guys faced this already
> >> > >> > > Pradeep.
> >> > >> > >
> >> > >> > >> From: pradeepmurugesan@outlook.com
> >> > >> > >> To: dev@freemarker.incubator.apache.org
> >> > >> > >> Subject: RE: Freemarker manual Local set up
> >> > >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> >> > >> > >>
> >> > >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the
> >> > manual locally.
> >> > >> > >> But end up in the following error.
> >> > >> > >> BUILD
> >> > FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570:
> >> > The following error occurred while executing this
> >> > line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556:
> >> > java.lang.UnsupportedClassVersionError:
> >> > org/freemarker/docgen/TransformAntTask : Unsupported major.minor version
> >> > 52.0
> >> > >> > >>
> >> > >> > >> Googling got me to the state that the docgen jar would have been
> >> > build using different java and from the github readme understood that
> >> > docgen requires java 1.8. which means compiling Freemarker project also
> >> > require Java 1.8 ? Its not mentioned in Freemarker readme though.
> >> > >> > >> Please guide me.
> >> > >> > >> Also,
> >> > >> > >>  How are you guys working with multiple java versions in the same
> >> > machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but
> >> > failed with an error . If you guys are already following some way kindly
> >> > let me know.
> >> > >> > >>
> >> > >> > >> Pradeep.
> >> > >> > >>
> >> > >> > >>
> >> > >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> >> > >> > >> > From: ddekany@freemail.hu
> >> > >> > >> > To: dev@freemarker.incubator.apache.org
> >> > >> > >> > Subject: Re: Freemarker manual Local set up
> >> > >> > >> >
> >> > >> > >> > The Manual is in the "freemarker" project, under src/manual. It
> >> > also
> >> > >> > >> > uses docgen of course. (You can download the latest docgen
> >> > artifact
> >> > >> > >> > with running `ant update-deps` in the "freemarker" project.) The
> >> > >> > >> > manual is built with `ant manualOffline` or
> >> > `manualFreemarkerOrg`.
> >> > >> > >> >
> >> > >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has
> >> > one, so
> >> > >> > >> > what&#39;s not described there is probably undocumented...
> >> > >> > >> >
> >> > >> > >> > Anyway, it&#39;s docgen&#39;s responsibility to generate the hidden HTML
> >> > forms
> >> > >> > >> > and JavaScript that will be needed. (Both the Web site and the
> >> > Manual
> >> > >> > >> > is built from DocBook XML by Docgen.)
> >> > >> > >> >
> >> > >> > >> > --
> >> > >> > >> > Thanks,
> >> > >> > >> >  Daniel Dekany
> >> > >> > >> >
> >> > >> > >> >
> >> > >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan
> >> > wrote:
> >> > >> > >> >
> >> > >> > >> > > Hi Daniel,
> >> > >> > >> > >    I could see that freemarker manual is part of the site
> >> > >> > >> > > http://freemarker.org/docs/index.html
> >> > >> > >> > > Since that is generated using the doc-gen, I am trying to look
> >> > into
> >> > >> > >> > > the https://github.com/apache/incubator-freemarker-site for
> >> > manual contents.
> >> > >> > >> > >
> >> > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> >> > >> > >> > > references to the site but I am not able to get the xml for
> >> > manual which doc-gen converts.
> >> > >> > >> > >
> >> > >> > >> > > I am trying to get the manual up and running locally to connect
> >> > >> > >> > > with the freemarker online. Is there any readme kind of thing
> >> > to achieve the same ?
> >> > >> > >> > > Please guide me.
> >> > >> > >> > > Pradeep.
> >> > >> > >> >
> >> > >> > >>
> >> > >> > >
> >> > >> >
> >> > >> > --
> >> > >> > Thanks,
> >> > >> >  Daniel Dekany
> >> > >> >
> >> > >>
> >> > >
> >> >
> >> >
> >          
 		 	   		  

RE: Freemarker manual Local set up

Posted by Dékány Dániel <dd...@freemail.hu>.
You don&#39;t need to use Ant at all while developing. Just run Docgen&#39;s command line class from Eclipse. Of course, you need to add the required command line arguments under the Run configuration.
Pradeep Murugesan <pr...@outlook.com> írta:
>Hi Evangelia,
>   Thanks for your pointers. I had gone through that and I am adding logs to understand the flow. I have a couple of questions there.
>Lets say in order to debug Transform.java or other Java files I am adding logger.info and check what happens.
>1. Is there a way I can issue logger statements inside the templates.2. Is it possible to enable debugger in docgen code and while generating manual from freemarker can I put breakpoints and check in Transform.java ?
>
>I am asking this because I need to do 3 steps whenever I change the docgen code
>1. Do a publish-override2. go to freemarker and do update-deps3. then issue a ant manualOffline.
>Is this the way it should work or am I doing something different.
>Pradeep.
>
>> Date: Mon, 12 Oct 2015 00:25:10 -0700
>> Subject: Re: Freemarker manual Local set up
>> From: evangeliad@gmail.com
>> To: dev@freemarker.incubator.apache.org; ddekany@freemail.hu
>> 
>> Did you run docgen locally, too? If you clone docgen, then run `ant
>> publish-override` in docgen, then in freemarker run
>> `ant manualFreemarkerOrg` it should work.  This works on OS X and on
>> Windows 7.
>> 
>> Did you double check your version of Java and Ivy? When I do `ivy -version
>> && java -version` i get this:
>> 
>> Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/
>> 
>> java version "1.8.0_60"
>> 
>> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
>> 
>> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
>> 
>> 
>> 
>> 
>> On Sun, Oct 11, 2015 at 10:40 AM, Daniel Dekany <dd...@freemail.hu> wrote:
>> 
>> > I&#39;m not sure where exactly you stuck, but I try to give some pointers.
>> > Read http://freemarker.org/docs/xgui.html if you haven&#39;t. As you will
>> > see there, you got the current XML node as .node in the programlisting
>> > macro, and you can move around in the DOM tree from there, like
>> > examine the previous/next programlisting, etc.
>> >
>> > As of shrinking the content, certainly you should work with a
>> > minimalistic docbook. I don&#39;t know what error you get. (Of course the
>> > XML must be well-formed XDocBook.)
>> >
>> > --
>> > Thanks,
>> >  Daniel Dekany
>> >
>> >
>> > Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
>> >
>> > > Hi Daniel,
>> > >   I am still trying to knock it down but in vain. I dig down to
>> > > programListing macro in NodeHandlers.ftlh and I am lost there as what is
>> > going on.
>> > > I tried to shrink the content in book.xml and ran docgen to
>> > > understand where do i need to inject the logic but that approach threw
>> > few other errors.
>> > >
>> > > It comes all the way down to generateHTMLFile_inner where we get
>> > > page.fthl and process it and I am not able to proceed further.
>> > > Could you please give me a clue ?
>> > > Pradeep.
>> > >> From: pradeepmurugesan@outlook.com
>> > >> To: dev@freemarker.incubator.apache.org
>> > >> Subject: RE: Freemarker manual Local set up
>> > >> Date: Mon, 5 Oct 2015 14:45:09 +0530
>> > >>
>> > >> Hi Daniel,
>> > >>
>> > >>  I am going through the docgen code and its taking some time to clearly
>> > get what is happening in the Transform.java.
>> > >> I am tracing down to the part where to check if the previous node is
>> > frmDataModel if the current node is Template so that I have a hidden form
>> > and try it out button. I am facing some challenges there.
>> > >> I will try to complete things within this week.
>> > >> Pradeep.
>> > >>
>> > >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
>> > >> > From: ddekany@freemail.hu
>> > >> > To: pradeepmurugesan@outlook.com
>> > >> > CC: dev@freemarker.incubator.apache.org
>> > >> > Subject: Re: Freemarker manual Local set up
>> > >> >
>> > >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
>> > >> > information was missing from the README.txt... I have fixed that now.
>> > >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
>> > >> > you need to adjust the JAVA_HOME environment variable for that.
>> > >> > (Clearing the Ivy or Ant directories is not needed.)
>> > >> >
>> > >> >
>> > >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
>> > >> >
>> > >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
>> > >> > > still facing the same issue. Have any of you guys faced this already
>> > >> > > Pradeep.
>> > >> > >
>> > >> > >> From: pradeepmurugesan@outlook.com
>> > >> > >> To: dev@freemarker.incubator.apache.org
>> > >> > >> Subject: RE: Freemarker manual Local set up
>> > >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
>> > >> > >>
>> > >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the
>> > manual locally.
>> > >> > >> But end up in the following error.
>> > >> > >> BUILD
>> > FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570:
>> > The following error occurred while executing this
>> > line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556:
>> > java.lang.UnsupportedClassVersionError:
>> > org/freemarker/docgen/TransformAntTask : Unsupported major.minor version
>> > 52.0
>> > >> > >>
>> > >> > >> Googling got me to the state that the docgen jar would have been
>> > build using different java and from the github readme understood that
>> > docgen requires java 1.8. which means compiling Freemarker project also
>> > require Java 1.8 ? Its not mentioned in Freemarker readme though.
>> > >> > >> Please guide me.
>> > >> > >> Also,
>> > >> > >>  How are you guys working with multiple java versions in the same
>> > machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but
>> > failed with an error . If you guys are already following some way kindly
>> > let me know.
>> > >> > >>
>> > >> > >> Pradeep.
>> > >> > >>
>> > >> > >>
>> > >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
>> > >> > >> > From: ddekany@freemail.hu
>> > >> > >> > To: dev@freemarker.incubator.apache.org
>> > >> > >> > Subject: Re: Freemarker manual Local set up
>> > >> > >> >
>> > >> > >> > The Manual is in the "freemarker" project, under src/manual. It
>> > also
>> > >> > >> > uses docgen of course. (You can download the latest docgen
>> > artifact
>> > >> > >> > with running `ant update-deps` in the "freemarker" project.) The
>> > >> > >> > manual is built with `ant manualOffline` or
>> > `manualFreemarkerOrg`.
>> > >> > >> >
>> > >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has
>> > one, so
>> > >> > >> > what&#39;s not described there is probably undocumented...
>> > >> > >> >
>> > >> > >> > Anyway, it&#39;s docgen&#39;s responsibility to generate the hidden HTML
>> > forms
>> > >> > >> > and JavaScript that will be needed. (Both the Web site and the
>> > Manual
>> > >> > >> > is built from DocBook XML by Docgen.)
>> > >> > >> >
>> > >> > >> > --
>> > >> > >> > Thanks,
>> > >> > >> >  Daniel Dekany
>> > >> > >> >
>> > >> > >> >
>> > >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan
>> > wrote:
>> > >> > >> >
>> > >> > >> > > Hi Daniel,
>> > >> > >> > >    I could see that freemarker manual is part of the site
>> > >> > >> > > http://freemarker.org/docs/index.html
>> > >> > >> > > Since that is generated using the doc-gen, I am trying to look
>> > into
>> > >> > >> > > the https://github.com/apache/incubator-freemarker-site for
>> > manual contents.
>> > >> > >> > >
>> > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
>> > >> > >> > > references to the site but I am not able to get the xml for
>> > manual which doc-gen converts.
>> > >> > >> > >
>> > >> > >> > > I am trying to get the manual up and running locally to connect
>> > >> > >> > > with the freemarker online. Is there any readme kind of thing
>> > to achieve the same ?
>> > >> > >> > > Please guide me.
>> > >> > >> > > Pradeep.
>> > >> > >> >
>> > >> > >>
>> > >> > >
>> > >> >
>> > >> > --
>> > >> > Thanks,
>> > >> >  Daniel Dekany
>> > >> >
>> > >>
>> > >
>> >
>> >
>          

RE: Freemarker manual Local set up

Posted by Pradeep Murugesan <pr...@outlook.com>.
Hi Evangelia,
   Thanks for your pointers. I had gone through that and I am adding logs to understand the flow. I have a couple of questions there.
Lets say in order to debug Transform.java or other Java files I am adding logger.info and check what happens.
1. Is there a way I can issue logger statements inside the templates.2. Is it possible to enable debugger in docgen code and while generating manual from freemarker can I put breakpoints and check in Transform.java ?

I am asking this because I need to do 3 steps whenever I change the docgen code
1. Do a publish-override2. go to freemarker and do update-deps3. then issue a ant manualOffline.
Is this the way it should work or am I doing something different.
Pradeep.

> Date: Mon, 12 Oct 2015 00:25:10 -0700
> Subject: Re: Freemarker manual Local set up
> From: evangeliad@gmail.com
> To: dev@freemarker.incubator.apache.org; ddekany@freemail.hu
> 
> Did you run docgen locally, too? If you clone docgen, then run `ant
> publish-override` in docgen, then in freemarker run
> `ant manualFreemarkerOrg` it should work.  This works on OS X and on
> Windows 7.
> 
> Did you double check your version of Java and Ivy? When I do `ivy -version
> && java -version` i get this:
> 
> Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/
> 
> java version "1.8.0_60"
> 
> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
> 
> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
> 
> 
> 
> 
> On Sun, Oct 11, 2015 at 10:40 AM, Daniel Dekany <dd...@freemail.hu> wrote:
> 
> > I'm not sure where exactly you stuck, but I try to give some pointers.
> > Read http://freemarker.org/docs/xgui.html if you haven't. As you will
> > see there, you got the current XML node as .node in the programlisting
> > macro, and you can move around in the DOM tree from there, like
> > examine the previous/next programlisting, etc.
> >
> > As of shrinking the content, certainly you should work with a
> > minimalistic docbook. I don't know what error you get. (Of course the
> > XML must be well-formed XDocBook.)
> >
> > --
> > Thanks,
> >  Daniel Dekany
> >
> >
> > Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
> >
> > > Hi Daniel,
> > >   I am still trying to knock it down but in vain. I dig down to
> > > programListing macro in NodeHandlers.ftlh and I am lost there as what is
> > going on.
> > > I tried to shrink the content in book.xml and ran docgen to
> > > understand where do i need to inject the logic but that approach threw
> > few other errors.
> > >
> > > It comes all the way down to generateHTMLFile_inner where we get
> > > page.fthl and process it and I am not able to proceed further.
> > > Could you please give me a clue ?
> > > Pradeep.
> > >> From: pradeepmurugesan@outlook.com
> > >> To: dev@freemarker.incubator.apache.org
> > >> Subject: RE: Freemarker manual Local set up
> > >> Date: Mon, 5 Oct 2015 14:45:09 +0530
> > >>
> > >> Hi Daniel,
> > >>
> > >>  I am going through the docgen code and its taking some time to clearly
> > get what is happening in the Transform.java.
> > >> I am tracing down to the part where to check if the previous node is
> > frmDataModel if the current node is Template so that I have a hidden form
> > and try it out button. I am facing some challenges there.
> > >> I will try to complete things within this week.
> > >> Pradeep.
> > >>
> > >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> > >> > From: ddekany@freemail.hu
> > >> > To: pradeepmurugesan@outlook.com
> > >> > CC: dev@freemarker.incubator.apache.org
> > >> > Subject: Re: Freemarker manual Local set up
> > >> >
> > >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> > >> > information was missing from the README.txt... I have fixed that now.
> > >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> > >> > you need to adjust the JAVA_HOME environment variable for that.
> > >> > (Clearing the Ivy or Ant directories is not needed.)
> > >> >
> > >> >
> > >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> > >> >
> > >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> > >> > > still facing the same issue. Have any of you guys faced this already
> > >> > > Pradeep.
> > >> > >
> > >> > >> From: pradeepmurugesan@outlook.com
> > >> > >> To: dev@freemarker.incubator.apache.org
> > >> > >> Subject: RE: Freemarker manual Local set up
> > >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> > >> > >>
> > >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the
> > manual locally.
> > >> > >> But end up in the following error.
> > >> > >> BUILD
> > FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570:
> > The following error occurred while executing this
> > line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556:
> > java.lang.UnsupportedClassVersionError:
> > org/freemarker/docgen/TransformAntTask : Unsupported major.minor version
> > 52.0
> > >> > >>
> > >> > >> Googling got me to the state that the docgen jar would have been
> > build using different java and from the github readme understood that
> > docgen requires java 1.8. which means compiling Freemarker project also
> > require Java 1.8 ? Its not mentioned in Freemarker readme though.
> > >> > >> Please guide me.
> > >> > >> Also,
> > >> > >>  How are you guys working with multiple java versions in the same
> > machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but
> > failed with an error . If you guys are already following some way kindly
> > let me know.
> > >> > >>
> > >> > >> Pradeep.
> > >> > >>
> > >> > >>
> > >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> > >> > >> > From: ddekany@freemail.hu
> > >> > >> > To: dev@freemarker.incubator.apache.org
> > >> > >> > Subject: Re: Freemarker manual Local set up
> > >> > >> >
> > >> > >> > The Manual is in the "freemarker" project, under src/manual. It
> > also
> > >> > >> > uses docgen of course. (You can download the latest docgen
> > artifact
> > >> > >> > with running `ant update-deps` in the "freemarker" project.) The
> > >> > >> > manual is built with `ant manualOffline` or
> > `manualFreemarkerOrg`.
> > >> > >> >
> > >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has
> > one, so
> > >> > >> > what's not described there is probably undocumented...
> > >> > >> >
> > >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML
> > forms
> > >> > >> > and JavaScript that will be needed. (Both the Web site and the
> > Manual
> > >> > >> > is built from DocBook XML by Docgen.)
> > >> > >> >
> > >> > >> > --
> > >> > >> > Thanks,
> > >> > >> >  Daniel Dekany
> > >> > >> >
> > >> > >> >
> > >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan
> > wrote:
> > >> > >> >
> > >> > >> > > Hi Daniel,
> > >> > >> > >    I could see that freemarker manual is part of the site
> > >> > >> > > http://freemarker.org/docs/index.html
> > >> > >> > > Since that is generated using the doc-gen, I am trying to look
> > into
> > >> > >> > > the https://github.com/apache/incubator-freemarker-site for
> > manual contents.
> > >> > >> > >
> > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> > >> > >> > > references to the site but I am not able to get the xml for
> > manual which doc-gen converts.
> > >> > >> > >
> > >> > >> > > I am trying to get the manual up and running locally to connect
> > >> > >> > > with the freemarker online. Is there any readme kind of thing
> > to achieve the same ?
> > >> > >> > > Please guide me.
> > >> > >> > > Pradeep.
> > >> > >> >
> > >> > >>
> > >> > >
> > >> >
> > >> > --
> > >> > Thanks,
> > >> >  Daniel Dekany
> > >> >
> > >>
> > >
> >
> >
 		 	   		  

Re: Freemarker manual Local set up

Posted by Evangelia Dendramis <ev...@gmail.com>.
Did you run docgen locally, too? If you clone docgen, then run `ant
publish-override` in docgen, then in freemarker run
`ant manualFreemarkerOrg` it should work.  This works on OS X and on
Windows 7.

Did you double check your version of Java and Ivy? When I do `ivy -version
&& java -version` i get this:

Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/

java version "1.8.0_60"

Java(TM) SE Runtime Environment (build 1.8.0_60-b27)

Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)




On Sun, Oct 11, 2015 at 10:40 AM, Daniel Dekany <dd...@freemail.hu> wrote:

> I'm not sure where exactly you stuck, but I try to give some pointers.
> Read http://freemarker.org/docs/xgui.html if you haven't. As you will
> see there, you got the current XML node as .node in the programlisting
> macro, and you can move around in the DOM tree from there, like
> examine the previous/next programlisting, etc.
>
> As of shrinking the content, certainly you should work with a
> minimalistic docbook. I don't know what error you get. (Of course the
> XML must be well-formed XDocBook.)
>
> --
> Thanks,
>  Daniel Dekany
>
>
> Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
>
> > Hi Daniel,
> >   I am still trying to knock it down but in vain. I dig down to
> > programListing macro in NodeHandlers.ftlh and I am lost there as what is
> going on.
> > I tried to shrink the content in book.xml and ran docgen to
> > understand where do i need to inject the logic but that approach threw
> few other errors.
> >
> > It comes all the way down to generateHTMLFile_inner where we get
> > page.fthl and process it and I am not able to proceed further.
> > Could you please give me a clue ?
> > Pradeep.
> >> From: pradeepmurugesan@outlook.com
> >> To: dev@freemarker.incubator.apache.org
> >> Subject: RE: Freemarker manual Local set up
> >> Date: Mon, 5 Oct 2015 14:45:09 +0530
> >>
> >> Hi Daniel,
> >>
> >>  I am going through the docgen code and its taking some time to clearly
> get what is happening in the Transform.java.
> >> I am tracing down to the part where to check if the previous node is
> frmDataModel if the current node is Template so that I have a hidden form
> and try it out button. I am facing some challenges there.
> >> I will try to complete things within this week.
> >> Pradeep.
> >>
> >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> >> > From: ddekany@freemail.hu
> >> > To: pradeepmurugesan@outlook.com
> >> > CC: dev@freemarker.incubator.apache.org
> >> > Subject: Re: Freemarker manual Local set up
> >> >
> >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> >> > information was missing from the README.txt... I have fixed that now.
> >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> >> > you need to adjust the JAVA_HOME environment variable for that.
> >> > (Clearing the Ivy or Ant directories is not needed.)
> >> >
> >> >
> >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> >> >
> >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> >> > > still facing the same issue. Have any of you guys faced this already
> >> > > Pradeep.
> >> > >
> >> > >> From: pradeepmurugesan@outlook.com
> >> > >> To: dev@freemarker.incubator.apache.org
> >> > >> Subject: RE: Freemarker manual Local set up
> >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> >> > >>
> >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the
> manual locally.
> >> > >> But end up in the following error.
> >> > >> BUILD
> FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570:
> The following error occurred while executing this
> line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556:
> java.lang.UnsupportedClassVersionError:
> org/freemarker/docgen/TransformAntTask : Unsupported major.minor version
> 52.0
> >> > >>
> >> > >> Googling got me to the state that the docgen jar would have been
> build using different java and from the github readme understood that
> docgen requires java 1.8. which means compiling Freemarker project also
> require Java 1.8 ? Its not mentioned in Freemarker readme though.
> >> > >> Please guide me.
> >> > >> Also,
> >> > >>  How are you guys working with multiple java versions in the same
> machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but
> failed with an error . If you guys are already following some way kindly
> let me know.
> >> > >>
> >> > >> Pradeep.
> >> > >>
> >> > >>
> >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> >> > >> > From: ddekany@freemail.hu
> >> > >> > To: dev@freemarker.incubator.apache.org
> >> > >> > Subject: Re: Freemarker manual Local set up
> >> > >> >
> >> > >> > The Manual is in the "freemarker" project, under src/manual. It
> also
> >> > >> > uses docgen of course. (You can download the latest docgen
> artifact
> >> > >> > with running `ant update-deps` in the "freemarker" project.) The
> >> > >> > manual is built with `ant manualOffline` or
> `manualFreemarkerOrg`.
> >> > >> >
> >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has
> one, so
> >> > >> > what's not described there is probably undocumented...
> >> > >> >
> >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML
> forms
> >> > >> > and JavaScript that will be needed. (Both the Web site and the
> Manual
> >> > >> > is built from DocBook XML by Docgen.)
> >> > >> >
> >> > >> > --
> >> > >> > Thanks,
> >> > >> >  Daniel Dekany
> >> > >> >
> >> > >> >
> >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan
> wrote:
> >> > >> >
> >> > >> > > Hi Daniel,
> >> > >> > >    I could see that freemarker manual is part of the site
> >> > >> > > http://freemarker.org/docs/index.html
> >> > >> > > Since that is generated using the doc-gen, I am trying to look
> into
> >> > >> > > the https://github.com/apache/incubator-freemarker-site for
> manual contents.
> >> > >> > >
> https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> >> > >> > > references to the site but I am not able to get the xml for
> manual which doc-gen converts.
> >> > >> > >
> >> > >> > > I am trying to get the manual up and running locally to connect
> >> > >> > > with the freemarker online. Is there any readme kind of thing
> to achieve the same ?
> >> > >> > > Please guide me.
> >> > >> > > Pradeep.
> >> > >> >
> >> > >>
> >> > >
> >> >
> >> > --
> >> > Thanks,
> >> >  Daniel Dekany
> >> >
> >>
> >
>
>

RE: Freemarker manual Local set up

Posted by Pradeep Murugesan <pr...@outlook.com>.
Yeah.. We need to have a builtin something like ?previousSibling & ?followingSibling. 
Shall I implement that change as well in freemarker ?
Pradeep.

> Date: Tue, 13 Oct 2015 23:52:54 +0200
> From: ddekany@freemail.hu
> To: dev@freemarker.incubator.apache.org
> Subject: Re: Freemarker manual Local set up
> 
> Tuesday, October 13, 2015, 7:27:18 PM, Pradeep Murugesan wrote:
> 
> > Hi Daniel,
> >     Thanks for your pointers, Now I have figured out a way to check
> > if the immediate previous node has a role 'formDataModel'. 
> >
> > <#local siblingSize = .node['preceding-sibling::*']?size>
> > <#local prevSibling = .node['preceding-sibling::*'][siblingSize-1]>
> > <#local siblingRole = prevSibling.@role[0]!?string>
> 
> Those 3 lines could be written like this:
> 
>   <#local siblingRole = .node['preceding-sibling::*[1]'].@role[0]!>
> 
> > <span>${siblingRole}</span>
> > <#if role == "template" && siblingRole == "formDataModel">...</#if>
> > once I did the above, I googled to check what is
> > "preceding-sibling" and understood that is Xpath terminology. I hope
> > there should be a cleaner way than above to get the immediate
> > preceding-sibling which I will try to find out.
> 
> We could add a built-in for it. The XPath way is not exactly
> obvious...
> 
> > BTW, what are all the templates we have to add the dataModel. We need to do it for all ?
> 
> You mean, what if a template doesn't need a data model. I guess for
> now then we add an empty data-model programlisting...
> 
> > Pradeep.
> >> Date: Tue, 13 Oct 2015 01:59:30 +0200
> >> From: ddekany@freemail.hu
> >> To: dev@freemarker.incubator.apache.org
> >> Subject: Re: Freemarker manual Local set up
> >> 
> >> With an example:
> >> 
> >> Template:
> >>   <#assign n = doc.r.b>
> >>   ${n['preceding-sibling::*']}
> >>   ${n['following-sibling::*']}
> >> 
> >> Data model:
> >>   doc=<r><a>aaa</a><b>bbb</b><c x='1'>ccc</c></r>
> >> 
> >> Result:
> >>   aaa
> >>   ccc
> >> 
> >> Monday, October 12, 2015, 10:29:24 AM, Pradeep Murugesan wrote:
> >> 
> >> > Hi Daniel,
> >> >     So this is where I am struck. 
> >> > In the ProgramListing macro I need to check if the current role is
> >> > template and if it has a immediate previous sibling with role
> >> > frm-dataModel . If so I will generate our hidden form elements and a visible "Try it out" button.
> >> > http://freemarker.org/docs/xgui.html 
> >> > I read through this already, but I was not able to find any node
> >> > build-ins to navigate to my immediate previous node, I mean it has
> >> > pointers to go to a parent or child. But in this case I want to
> >> > navigate to my preceding sibling right ?
> >> > Kindly let me know If I am missing something.
> >> > Pradeep.
> >> >> Date: Sun, 11 Oct 2015 19:40:49 +0200
> >> >> From: ddekany@freemail.hu
> >> >> To: dev@freemarker.incubator.apache.org
> >> >> Subject: Re: Freemarker manual Local set up
> >> >> 
> >> >> I'm not sure where exactly you stuck, but I try to give some pointers.
> >> >> Read http://freemarker.org/docs/xgui.html if you haven't. As you will
> >> >> see there, you got the current XML node as .node in the programlisting
> >> >> macro, and you can move around in the DOM tree from there, like
> >> >> examine the previous/next programlisting, etc.
> >> >> 
> >> >> As of shrinking the content, certainly you should work with a
> >> >> minimalistic docbook. I don't know what error you get. (Of course the
> >> >> XML must be well-formed XDocBook.)
> >> >> 
> >> >> -- 
> >> >> Thanks,
> >> >>  Daniel Dekany
> >> >> 
> >> >> 
> >> >> Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
> >> >> 
> >> >> > Hi Daniel,
> >> >> >   I am still trying to knock it down but in vain. I dig down to
> >> >> > programListing macro in NodeHandlers.ftlh and I am lost there as what is going on.
> >> >> > I tried to shrink the content in book.xml and ran docgen to
> >> >> > understand where do i need to inject the logic but that approach threw few other errors.
> >> >> >
> >> >> > It comes all the way down to generateHTMLFile_inner where we get
> >> >> > page.fthl and process it and I am not able to proceed further.
> >> >> > Could you please give me a clue ?
> >> >> > Pradeep. 
> >> >> >> From: pradeepmurugesan@outlook.com
> >> >> >> To: dev@freemarker.incubator.apache.org
> >> >> >> Subject: RE: Freemarker manual Local set up
> >> >> >> Date: Mon, 5 Oct 2015 14:45:09 +0530
> >> >> >> 
> >> >> >> Hi Daniel,
> >> >> >> 
> >> >> >>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
> >> >> >> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
> >> >> >> I will try to complete things within this week. 
> >> >> >> Pradeep.
> >> >> >> 
> >> >> >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> >> >> >> > From: ddekany@freemail.hu
> >> >> >> > To: pradeepmurugesan@outlook.com
> >> >> >> > CC: dev@freemarker.incubator.apache.org
> >> >> >> > Subject: Re: Freemarker manual Local set up
> >> >> >> > 
> >> >> >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> >> >> >> > information was missing from the README.txt... I have fixed that now.
> >> >> >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> >> >> >> > you need to adjust the JAVA_HOME environment variable for that.
> >> >> >> > (Clearing the Ivy or Ant directories is not needed.)
> >> >> >> > 
> >> >> >> > 
> >> >> >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> >> >> >> > 
> >> >> >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> >> >> >> > > still facing the same issue. Have any of you guys faced this already
> >> >> >> > > Pradeep.
> >> >> >> > >
> >> >> >> > >> From: pradeepmurugesan@outlook.com
> >> >> >> > >> To: dev@freemarker.incubator.apache.org
> >> >> >> > >> Subject: RE: Freemarker manual Local set up
> >> >> >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> >> >> >> > >> 
> >> >> >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
> >> >> >> > >> But end up in the following error.
> >> >> >> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
> >> >> >> > >> 
> >> >> >> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
> >> >> >> > >> Please guide me.
> >> >> >> > >> Also,
> >> >> >> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
> >> >> >> > >> 
> >> >> >> > >> Pradeep.
> >> >> >> > >> 
> >> >> >> > >> 
> >> >> >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> >> >> >> > >> > From: ddekany@freemail.hu
> >> >> >> > >> > To: dev@freemarker.incubator.apache.org
> >> >> >> > >> > Subject: Re: Freemarker manual Local set up
> >> >> >> > >> > 
> >> >> >> > >> > The Manual is in the "freemarker" project, under src/manual. It also
> >> >> >> > >> > uses docgen of course. (You can download the latest docgen artifact
> >> >> >> > >> > with running `ant update-deps` in the "freemarker" project.) The
> >> >> >> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
> >> >> >> > >> > 
> >> >> >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
> >> >> >> > >> > what's not described there is probably undocumented...
> >> >> >> > >> > 
> >> >> >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
> >> >> >> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
> >> >> >> > >> > is built from DocBook XML by Docgen.)
> >> >> >> > >> > 
> >> >> >> > >> > -- 
> >> >> >> > >> > Thanks,
> >> >> >> > >> >  Daniel Dekany
> >> >> >> > >> > 
> >> >> >> > >> > 
> >> >> >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
> >> >> >> > >> > 
> >> >> >> > >> > > Hi Daniel,
> >> >> >> > >> > >    I could see that freemarker manual is part of the site
> >> >> >> > >> > > http://freemarker.org/docs/index.html
> >> >> >> > >> > > Since that is generated using the doc-gen, I am trying to look into
> >> >> >> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
> >> >> >> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> >> >> >> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
> >> >> >> > >> > >
> >> >> >> > >> > > I am trying to get the manual up and running locally to connect
> >> >> >> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
> >> >> >> > >> > > Please guide me.
> >> >> >> > >> > > Pradeep.                                          
> >> >> >> > >> > 
> >> >> >> > >>                                         
> >> >> >> > >                                           
> >> >> >> > 
> >> >> >> > -- 
> >> >> >> > Thanks,
> >> >> >> >  Daniel Dekany
> >> >> >> > 
> >> >> >>                                         
> >> >> >                                           
> >> >> 
> >> >
> >> >                                           
> >> 
> >> -- 
> >> Thanks,
> >>  Daniel Dekany
> >> 
> >                                           
> 
> -- 
> Thanks,
>  Daniel Dekany
> 
 		 	   		  

Re: Freemarker manual Local set up

Posted by Daniel Dekany <dd...@freemail.hu>.
Tuesday, October 13, 2015, 7:27:18 PM, Pradeep Murugesan wrote:

> Hi Daniel,
>     Thanks for your pointers, Now I have figured out a way to check
> if the immediate previous node has a role 'formDataModel'. 
>
> <#local siblingSize = .node['preceding-sibling::*']?size>
> <#local prevSibling = .node['preceding-sibling::*'][siblingSize-1]>
> <#local siblingRole = prevSibling.@role[0]!?string>

Those 3 lines could be written like this:

  <#local siblingRole = .node['preceding-sibling::*[1]'].@role[0]!>

> <span>${siblingRole}</span>
> <#if role == "template" && siblingRole == "formDataModel">...</#if>
> once I did the above, I googled to check what is
> "preceding-sibling" and understood that is Xpath terminology. I hope
> there should be a cleaner way than above to get the immediate
> preceding-sibling which I will try to find out.

We could add a built-in for it. The XPath way is not exactly
obvious...

> BTW, what are all the templates we have to add the dataModel. We need to do it for all ?

You mean, what if a template doesn't need a data model. I guess for
now then we add an empty data-model programlisting...

> Pradeep.
>> Date: Tue, 13 Oct 2015 01:59:30 +0200
>> From: ddekany@freemail.hu
>> To: dev@freemarker.incubator.apache.org
>> Subject: Re: Freemarker manual Local set up
>> 
>> With an example:
>> 
>> Template:
>>   <#assign n = doc.r.b>
>>   ${n['preceding-sibling::*']}
>>   ${n['following-sibling::*']}
>> 
>> Data model:
>>   doc=<r><a>aaa</a><b>bbb</b><c x='1'>ccc</c></r>
>> 
>> Result:
>>   aaa
>>   ccc
>> 
>> Monday, October 12, 2015, 10:29:24 AM, Pradeep Murugesan wrote:
>> 
>> > Hi Daniel,
>> >     So this is where I am struck. 
>> > In the ProgramListing macro I need to check if the current role is
>> > template and if it has a immediate previous sibling with role
>> > frm-dataModel . If so I will generate our hidden form elements and a visible "Try it out" button.
>> > http://freemarker.org/docs/xgui.html 
>> > I read through this already, but I was not able to find any node
>> > build-ins to navigate to my immediate previous node, I mean it has
>> > pointers to go to a parent or child. But in this case I want to
>> > navigate to my preceding sibling right ?
>> > Kindly let me know If I am missing something.
>> > Pradeep.
>> >> Date: Sun, 11 Oct 2015 19:40:49 +0200
>> >> From: ddekany@freemail.hu
>> >> To: dev@freemarker.incubator.apache.org
>> >> Subject: Re: Freemarker manual Local set up
>> >> 
>> >> I'm not sure where exactly you stuck, but I try to give some pointers.
>> >> Read http://freemarker.org/docs/xgui.html if you haven't. As you will
>> >> see there, you got the current XML node as .node in the programlisting
>> >> macro, and you can move around in the DOM tree from there, like
>> >> examine the previous/next programlisting, etc.
>> >> 
>> >> As of shrinking the content, certainly you should work with a
>> >> minimalistic docbook. I don't know what error you get. (Of course the
>> >> XML must be well-formed XDocBook.)
>> >> 
>> >> -- 
>> >> Thanks,
>> >>  Daniel Dekany
>> >> 
>> >> 
>> >> Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
>> >> 
>> >> > Hi Daniel,
>> >> >   I am still trying to knock it down but in vain. I dig down to
>> >> > programListing macro in NodeHandlers.ftlh and I am lost there as what is going on.
>> >> > I tried to shrink the content in book.xml and ran docgen to
>> >> > understand where do i need to inject the logic but that approach threw few other errors.
>> >> >
>> >> > It comes all the way down to generateHTMLFile_inner where we get
>> >> > page.fthl and process it and I am not able to proceed further.
>> >> > Could you please give me a clue ?
>> >> > Pradeep. 
>> >> >> From: pradeepmurugesan@outlook.com
>> >> >> To: dev@freemarker.incubator.apache.org
>> >> >> Subject: RE: Freemarker manual Local set up
>> >> >> Date: Mon, 5 Oct 2015 14:45:09 +0530
>> >> >> 
>> >> >> Hi Daniel,
>> >> >> 
>> >> >>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
>> >> >> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
>> >> >> I will try to complete things within this week. 
>> >> >> Pradeep.
>> >> >> 
>> >> >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
>> >> >> > From: ddekany@freemail.hu
>> >> >> > To: pradeepmurugesan@outlook.com
>> >> >> > CC: dev@freemarker.incubator.apache.org
>> >> >> > Subject: Re: Freemarker manual Local set up
>> >> >> > 
>> >> >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
>> >> >> > information was missing from the README.txt... I have fixed that now.
>> >> >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
>> >> >> > you need to adjust the JAVA_HOME environment variable for that.
>> >> >> > (Clearing the Ivy or Ant directories is not needed.)
>> >> >> > 
>> >> >> > 
>> >> >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
>> >> >> > 
>> >> >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
>> >> >> > > still facing the same issue. Have any of you guys faced this already
>> >> >> > > Pradeep.
>> >> >> > >
>> >> >> > >> From: pradeepmurugesan@outlook.com
>> >> >> > >> To: dev@freemarker.incubator.apache.org
>> >> >> > >> Subject: RE: Freemarker manual Local set up
>> >> >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
>> >> >> > >> 
>> >> >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
>> >> >> > >> But end up in the following error.
>> >> >> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
>> >> >> > >> 
>> >> >> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
>> >> >> > >> Please guide me.
>> >> >> > >> Also,
>> >> >> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
>> >> >> > >> 
>> >> >> > >> Pradeep.
>> >> >> > >> 
>> >> >> > >> 
>> >> >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
>> >> >> > >> > From: ddekany@freemail.hu
>> >> >> > >> > To: dev@freemarker.incubator.apache.org
>> >> >> > >> > Subject: Re: Freemarker manual Local set up
>> >> >> > >> > 
>> >> >> > >> > The Manual is in the "freemarker" project, under src/manual. It also
>> >> >> > >> > uses docgen of course. (You can download the latest docgen artifact
>> >> >> > >> > with running `ant update-deps` in the "freemarker" project.) The
>> >> >> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
>> >> >> > >> > 
>> >> >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
>> >> >> > >> > what's not described there is probably undocumented...
>> >> >> > >> > 
>> >> >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
>> >> >> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
>> >> >> > >> > is built from DocBook XML by Docgen.)
>> >> >> > >> > 
>> >> >> > >> > -- 
>> >> >> > >> > Thanks,
>> >> >> > >> >  Daniel Dekany
>> >> >> > >> > 
>> >> >> > >> > 
>> >> >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
>> >> >> > >> > 
>> >> >> > >> > > Hi Daniel,
>> >> >> > >> > >    I could see that freemarker manual is part of the site
>> >> >> > >> > > http://freemarker.org/docs/index.html
>> >> >> > >> > > Since that is generated using the doc-gen, I am trying to look into
>> >> >> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
>> >> >> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
>> >> >> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
>> >> >> > >> > >
>> >> >> > >> > > I am trying to get the manual up and running locally to connect
>> >> >> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
>> >> >> > >> > > Please guide me.
>> >> >> > >> > > Pradeep.                                          
>> >> >> > >> > 
>> >> >> > >>                                         
>> >> >> > >                                           
>> >> >> > 
>> >> >> > -- 
>> >> >> > Thanks,
>> >> >> >  Daniel Dekany
>> >> >> > 
>> >> >>                                         
>> >> >                                           
>> >> 
>> >
>> >                                           
>> 
>> -- 
>> Thanks,
>>  Daniel Dekany
>> 
>                                           

-- 
Thanks,
 Daniel Dekany


RE: Freemarker manual Local set up

Posted by Pradeep Murugesan <pr...@outlook.com>.
Hi Daniel,
    Thanks for your pointers, Now I have figured out a way to check if the immediate previous node has a role 'formDataModel'. 








<#local siblingSize = .node['preceding-sibling::*']?size>


<#local prevSibling = .node['preceding-sibling::*'][siblingSize-1]>


<#local siblingRole = prevSibling.@role[0]!?string>


<span>${siblingRole}</span>
<#if role == "template" && siblingRole == "formDataModel">...</#if>
once I did the above, I googled to check what is "preceding-sibling" and understood that is Xpath terminology. I hope there should be a cleaner way than above to get the immediate preceding-sibling which I will try to find out.
BTW, what are all the templates we have to add the dataModel. We need to do it for all ?
Pradeep.
> Date: Tue, 13 Oct 2015 01:59:30 +0200
> From: ddekany@freemail.hu
> To: dev@freemarker.incubator.apache.org
> Subject: Re: Freemarker manual Local set up
> 
> With an example:
> 
> Template:
>   <#assign n = doc.r.b>
>   ${n['preceding-sibling::*']}
>   ${n['following-sibling::*']}
> 
> Data model:
>   doc=<r><a>aaa</a><b>bbb</b><c x='1'>ccc</c></r>
> 
> Result:
>   aaa
>   ccc
> 
> Monday, October 12, 2015, 10:29:24 AM, Pradeep Murugesan wrote:
> 
> > Hi Daniel,
> >     So this is where I am struck. 
> > In the ProgramListing macro I need to check if the current role is
> > template and if it has a immediate previous sibling with role
> > frm-dataModel . If so I will generate our hidden form elements and a visible "Try it out" button.
> > http://freemarker.org/docs/xgui.html 
> > I read through this already, but I was not able to find any node
> > build-ins to navigate to my immediate previous node, I mean it has
> > pointers to go to a parent or child. But in this case I want to
> > navigate to my preceding sibling right ?
> > Kindly let me know If I am missing something.
> > Pradeep.
> >> Date: Sun, 11 Oct 2015 19:40:49 +0200
> >> From: ddekany@freemail.hu
> >> To: dev@freemarker.incubator.apache.org
> >> Subject: Re: Freemarker manual Local set up
> >> 
> >> I'm not sure where exactly you stuck, but I try to give some pointers.
> >> Read http://freemarker.org/docs/xgui.html if you haven't. As you will
> >> see there, you got the current XML node as .node in the programlisting
> >> macro, and you can move around in the DOM tree from there, like
> >> examine the previous/next programlisting, etc.
> >> 
> >> As of shrinking the content, certainly you should work with a
> >> minimalistic docbook. I don't know what error you get. (Of course the
> >> XML must be well-formed XDocBook.)
> >> 
> >> -- 
> >> Thanks,
> >>  Daniel Dekany
> >> 
> >> 
> >> Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
> >> 
> >> > Hi Daniel,
> >> >   I am still trying to knock it down but in vain. I dig down to
> >> > programListing macro in NodeHandlers.ftlh and I am lost there as what is going on.
> >> > I tried to shrink the content in book.xml and ran docgen to
> >> > understand where do i need to inject the logic but that approach threw few other errors.
> >> >
> >> > It comes all the way down to generateHTMLFile_inner where we get
> >> > page.fthl and process it and I am not able to proceed further.
> >> > Could you please give me a clue ?
> >> > Pradeep. 
> >> >> From: pradeepmurugesan@outlook.com
> >> >> To: dev@freemarker.incubator.apache.org
> >> >> Subject: RE: Freemarker manual Local set up
> >> >> Date: Mon, 5 Oct 2015 14:45:09 +0530
> >> >> 
> >> >> Hi Daniel,
> >> >> 
> >> >>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
> >> >> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
> >> >> I will try to complete things within this week. 
> >> >> Pradeep.
> >> >> 
> >> >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> >> >> > From: ddekany@freemail.hu
> >> >> > To: pradeepmurugesan@outlook.com
> >> >> > CC: dev@freemarker.incubator.apache.org
> >> >> > Subject: Re: Freemarker manual Local set up
> >> >> > 
> >> >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> >> >> > information was missing from the README.txt... I have fixed that now.
> >> >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> >> >> > you need to adjust the JAVA_HOME environment variable for that.
> >> >> > (Clearing the Ivy or Ant directories is not needed.)
> >> >> > 
> >> >> > 
> >> >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> >> >> > 
> >> >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> >> >> > > still facing the same issue. Have any of you guys faced this already
> >> >> > > Pradeep.
> >> >> > >
> >> >> > >> From: pradeepmurugesan@outlook.com
> >> >> > >> To: dev@freemarker.incubator.apache.org
> >> >> > >> Subject: RE: Freemarker manual Local set up
> >> >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> >> >> > >> 
> >> >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
> >> >> > >> But end up in the following error.
> >> >> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
> >> >> > >> 
> >> >> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
> >> >> > >> Please guide me.
> >> >> > >> Also,
> >> >> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
> >> >> > >> 
> >> >> > >> Pradeep.
> >> >> > >> 
> >> >> > >> 
> >> >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> >> >> > >> > From: ddekany@freemail.hu
> >> >> > >> > To: dev@freemarker.incubator.apache.org
> >> >> > >> > Subject: Re: Freemarker manual Local set up
> >> >> > >> > 
> >> >> > >> > The Manual is in the "freemarker" project, under src/manual. It also
> >> >> > >> > uses docgen of course. (You can download the latest docgen artifact
> >> >> > >> > with running `ant update-deps` in the "freemarker" project.) The
> >> >> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
> >> >> > >> > 
> >> >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
> >> >> > >> > what's not described there is probably undocumented...
> >> >> > >> > 
> >> >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
> >> >> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
> >> >> > >> > is built from DocBook XML by Docgen.)
> >> >> > >> > 
> >> >> > >> > -- 
> >> >> > >> > Thanks,
> >> >> > >> >  Daniel Dekany
> >> >> > >> > 
> >> >> > >> > 
> >> >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
> >> >> > >> > 
> >> >> > >> > > Hi Daniel,
> >> >> > >> > >    I could see that freemarker manual is part of the site
> >> >> > >> > > http://freemarker.org/docs/index.html
> >> >> > >> > > Since that is generated using the doc-gen, I am trying to look into
> >> >> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
> >> >> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> >> >> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
> >> >> > >> > >
> >> >> > >> > > I am trying to get the manual up and running locally to connect
> >> >> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
> >> >> > >> > > Please guide me.
> >> >> > >> > > Pradeep.                                          
> >> >> > >> > 
> >> >> > >>                                         
> >> >> > >                                           
> >> >> > 
> >> >> > -- 
> >> >> > Thanks,
> >> >> >  Daniel Dekany
> >> >> > 
> >> >>                                         
> >> >                                           
> >> 
> >
> >                                           
> 
> -- 
> Thanks,
>  Daniel Dekany
> 
 		 	   		  

Re: Freemarker manual Local set up

Posted by Daniel Dekany <dd...@freemail.hu>.
With an example:

Template:
  <#assign n = doc.r.b>
  ${n['preceding-sibling::*']}
  ${n['following-sibling::*']}

Data model:
  doc=<r><a>aaa</a><b>bbb</b><c x='1'>ccc</c></r>

Result:
  aaa
  ccc

Monday, October 12, 2015, 10:29:24 AM, Pradeep Murugesan wrote:

> Hi Daniel,
>     So this is where I am struck. 
> In the ProgramListing macro I need to check if the current role is
> template and if it has a immediate previous sibling with role
> frm-dataModel . If so I will generate our hidden form elements and a visible "Try it out" button.
> http://freemarker.org/docs/xgui.html 
> I read through this already, but I was not able to find any node
> build-ins to navigate to my immediate previous node, I mean it has
> pointers to go to a parent or child. But in this case I want to
> navigate to my preceding sibling right ?
> Kindly let me know If I am missing something.
> Pradeep.
>> Date: Sun, 11 Oct 2015 19:40:49 +0200
>> From: ddekany@freemail.hu
>> To: dev@freemarker.incubator.apache.org
>> Subject: Re: Freemarker manual Local set up
>> 
>> I'm not sure where exactly you stuck, but I try to give some pointers.
>> Read http://freemarker.org/docs/xgui.html if you haven't. As you will
>> see there, you got the current XML node as .node in the programlisting
>> macro, and you can move around in the DOM tree from there, like
>> examine the previous/next programlisting, etc.
>> 
>> As of shrinking the content, certainly you should work with a
>> minimalistic docbook. I don't know what error you get. (Of course the
>> XML must be well-formed XDocBook.)
>> 
>> -- 
>> Thanks,
>>  Daniel Dekany
>> 
>> 
>> Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
>> 
>> > Hi Daniel,
>> >   I am still trying to knock it down but in vain. I dig down to
>> > programListing macro in NodeHandlers.ftlh and I am lost there as what is going on.
>> > I tried to shrink the content in book.xml and ran docgen to
>> > understand where do i need to inject the logic but that approach threw few other errors.
>> >
>> > It comes all the way down to generateHTMLFile_inner where we get
>> > page.fthl and process it and I am not able to proceed further.
>> > Could you please give me a clue ?
>> > Pradeep. 
>> >> From: pradeepmurugesan@outlook.com
>> >> To: dev@freemarker.incubator.apache.org
>> >> Subject: RE: Freemarker manual Local set up
>> >> Date: Mon, 5 Oct 2015 14:45:09 +0530
>> >> 
>> >> Hi Daniel,
>> >> 
>> >>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
>> >> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
>> >> I will try to complete things within this week. 
>> >> Pradeep.
>> >> 
>> >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
>> >> > From: ddekany@freemail.hu
>> >> > To: pradeepmurugesan@outlook.com
>> >> > CC: dev@freemarker.incubator.apache.org
>> >> > Subject: Re: Freemarker manual Local set up
>> >> > 
>> >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
>> >> > information was missing from the README.txt... I have fixed that now.
>> >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
>> >> > you need to adjust the JAVA_HOME environment variable for that.
>> >> > (Clearing the Ivy or Ant directories is not needed.)
>> >> > 
>> >> > 
>> >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
>> >> > 
>> >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
>> >> > > still facing the same issue. Have any of you guys faced this already
>> >> > > Pradeep.
>> >> > >
>> >> > >> From: pradeepmurugesan@outlook.com
>> >> > >> To: dev@freemarker.incubator.apache.org
>> >> > >> Subject: RE: Freemarker manual Local set up
>> >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
>> >> > >> 
>> >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
>> >> > >> But end up in the following error.
>> >> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
>> >> > >> 
>> >> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
>> >> > >> Please guide me.
>> >> > >> Also,
>> >> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
>> >> > >> 
>> >> > >> Pradeep.
>> >> > >> 
>> >> > >> 
>> >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
>> >> > >> > From: ddekany@freemail.hu
>> >> > >> > To: dev@freemarker.incubator.apache.org
>> >> > >> > Subject: Re: Freemarker manual Local set up
>> >> > >> > 
>> >> > >> > The Manual is in the "freemarker" project, under src/manual. It also
>> >> > >> > uses docgen of course. (You can download the latest docgen artifact
>> >> > >> > with running `ant update-deps` in the "freemarker" project.) The
>> >> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
>> >> > >> > 
>> >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
>> >> > >> > what's not described there is probably undocumented...
>> >> > >> > 
>> >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
>> >> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
>> >> > >> > is built from DocBook XML by Docgen.)
>> >> > >> > 
>> >> > >> > -- 
>> >> > >> > Thanks,
>> >> > >> >  Daniel Dekany
>> >> > >> > 
>> >> > >> > 
>> >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
>> >> > >> > 
>> >> > >> > > Hi Daniel,
>> >> > >> > >    I could see that freemarker manual is part of the site
>> >> > >> > > http://freemarker.org/docs/index.html
>> >> > >> > > Since that is generated using the doc-gen, I am trying to look into
>> >> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
>> >> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
>> >> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
>> >> > >> > >
>> >> > >> > > I am trying to get the manual up and running locally to connect
>> >> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
>> >> > >> > > Please guide me.
>> >> > >> > > Pradeep.                                          
>> >> > >> > 
>> >> > >>                                         
>> >> > >                                           
>> >> > 
>> >> > -- 
>> >> > Thanks,
>> >> >  Daniel Dekany
>> >> > 
>> >>                                         
>> >                                           
>> 
>
>                                           

-- 
Thanks,
 Daniel Dekany


RE: Freemarker manual Local set up

Posted by Pradeep Murugesan <pr...@outlook.com>.


Hi Daniel,
    So this is where I am struck. 
In the ProgramListing macro I need to check if the current role is template and if it has a immediate previous sibling with role frm-dataModel . If so I will generate our hidden form elements and a visible "Try it out" button.
http://freemarker.org/docs/xgui.html 
I read through this already, but I was not able to find any node build-ins to navigate to my immediate previous node, I mean it has pointers to go to a parent or child. But in this case I want to navigate to my preceding sibling right ?
Kindly let me know If I am missing something.
Pradeep.
> Date: Sun, 11 Oct 2015 19:40:49 +0200
> From: ddekany@freemail.hu
> To: dev@freemarker.incubator.apache.org
> Subject: Re: Freemarker manual Local set up
> 
> I'm not sure where exactly you stuck, but I try to give some pointers.
> Read http://freemarker.org/docs/xgui.html if you haven't. As you will
> see there, you got the current XML node as .node in the programlisting
> macro, and you can move around in the DOM tree from there, like
> examine the previous/next programlisting, etc.
> 
> As of shrinking the content, certainly you should work with a
> minimalistic docbook. I don't know what error you get. (Of course the
> XML must be well-formed XDocBook.)
> 
> -- 
> Thanks,
>  Daniel Dekany
> 
> 
> Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:
> 
> > Hi Daniel,
> >   I am still trying to knock it down but in vain. I dig down to
> > programListing macro in NodeHandlers.ftlh and I am lost there as what is going on.
> > I tried to shrink the content in book.xml and ran docgen to
> > understand where do i need to inject the logic but that approach threw few other errors.
> >
> > It comes all the way down to generateHTMLFile_inner where we get
> > page.fthl and process it and I am not able to proceed further.
> > Could you please give me a clue ?
> > Pradeep. 
> >> From: pradeepmurugesan@outlook.com
> >> To: dev@freemarker.incubator.apache.org
> >> Subject: RE: Freemarker manual Local set up
> >> Date: Mon, 5 Oct 2015 14:45:09 +0530
> >> 
> >> Hi Daniel,
> >> 
> >>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
> >> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
> >> I will try to complete things within this week. 
> >> Pradeep.
> >> 
> >> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> >> > From: ddekany@freemail.hu
> >> > To: pradeepmurugesan@outlook.com
> >> > CC: dev@freemarker.incubator.apache.org
> >> > Subject: Re: Freemarker manual Local set up
> >> > 
> >> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> >> > information was missing from the README.txt... I have fixed that now.
> >> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> >> > you need to adjust the JAVA_HOME environment variable for that.
> >> > (Clearing the Ivy or Ant directories is not needed.)
> >> > 
> >> > 
> >> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> >> > 
> >> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> >> > > still facing the same issue. Have any of you guys faced this already
> >> > > Pradeep.
> >> > >
> >> > >> From: pradeepmurugesan@outlook.com
> >> > >> To: dev@freemarker.incubator.apache.org
> >> > >> Subject: RE: Freemarker manual Local set up
> >> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> >> > >> 
> >> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
> >> > >> But end up in the following error.
> >> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
> >> > >> 
> >> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
> >> > >> Please guide me.
> >> > >> Also,
> >> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
> >> > >> 
> >> > >> Pradeep.
> >> > >> 
> >> > >> 
> >> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> >> > >> > From: ddekany@freemail.hu
> >> > >> > To: dev@freemarker.incubator.apache.org
> >> > >> > Subject: Re: Freemarker manual Local set up
> >> > >> > 
> >> > >> > The Manual is in the "freemarker" project, under src/manual. It also
> >> > >> > uses docgen of course. (You can download the latest docgen artifact
> >> > >> > with running `ant update-deps` in the "freemarker" project.) The
> >> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
> >> > >> > 
> >> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
> >> > >> > what's not described there is probably undocumented...
> >> > >> > 
> >> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
> >> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
> >> > >> > is built from DocBook XML by Docgen.)
> >> > >> > 
> >> > >> > -- 
> >> > >> > Thanks,
> >> > >> >  Daniel Dekany
> >> > >> > 
> >> > >> > 
> >> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
> >> > >> > 
> >> > >> > > Hi Daniel,
> >> > >> > >    I could see that freemarker manual is part of the site
> >> > >> > > http://freemarker.org/docs/index.html
> >> > >> > > Since that is generated using the doc-gen, I am trying to look into
> >> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
> >> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> >> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
> >> > >> > >
> >> > >> > > I am trying to get the manual up and running locally to connect
> >> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
> >> > >> > > Please guide me.
> >> > >> > > Pradeep.                                          
> >> > >> > 
> >> > >>                                         
> >> > >                                           
> >> > 
> >> > -- 
> >> > Thanks,
> >> >  Daniel Dekany
> >> > 
> >>                                         
> >                                           
> 

 		 	   		  

Re: Freemarker manual Local set up

Posted by Daniel Dekany <dd...@freemail.hu>.
I'm not sure where exactly you stuck, but I try to give some pointers.
Read http://freemarker.org/docs/xgui.html if you haven't. As you will
see there, you got the current XML node as .node in the programlisting
macro, and you can move around in the DOM tree from there, like
examine the previous/next programlisting, etc.

As of shrinking the content, certainly you should work with a
minimalistic docbook. I don't know what error you get. (Of course the
XML must be well-formed XDocBook.)

-- 
Thanks,
 Daniel Dekany


Sunday, October 11, 2015, 5:50:06 PM, Pradeep Murugesan wrote:

> Hi Daniel,
>   I am still trying to knock it down but in vain. I dig down to
> programListing macro in NodeHandlers.ftlh and I am lost there as what is going on.
> I tried to shrink the content in book.xml and ran docgen to
> understand where do i need to inject the logic but that approach threw few other errors.
>
> It comes all the way down to generateHTMLFile_inner where we get
> page.fthl and process it and I am not able to proceed further.
> Could you please give me a clue ?
> Pradeep. 
>> From: pradeepmurugesan@outlook.com
>> To: dev@freemarker.incubator.apache.org
>> Subject: RE: Freemarker manual Local set up
>> Date: Mon, 5 Oct 2015 14:45:09 +0530
>> 
>> Hi Daniel,
>> 
>>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
>> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
>> I will try to complete things within this week. 
>> Pradeep.
>> 
>> > Date: Tue, 29 Sep 2015 21:45:41 +0200
>> > From: ddekany@freemail.hu
>> > To: pradeepmurugesan@outlook.com
>> > CC: dev@freemarker.incubator.apache.org
>> > Subject: Re: Freemarker manual Local set up
>> > 
>> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
>> > information was missing from the README.txt... I have fixed that now.
>> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
>> > you need to adjust the JAVA_HOME environment variable for that.
>> > (Clearing the Ivy or Ant directories is not needed.)
>> > 
>> > 
>> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
>> > 
>> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
>> > > still facing the same issue. Have any of you guys faced this already
>> > > Pradeep.
>> > >
>> > >> From: pradeepmurugesan@outlook.com
>> > >> To: dev@freemarker.incubator.apache.org
>> > >> Subject: RE: Freemarker manual Local set up
>> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
>> > >> 
>> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
>> > >> But end up in the following error.
>> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
>> > >> 
>> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
>> > >> Please guide me.
>> > >> Also,
>> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
>> > >> 
>> > >> Pradeep.
>> > >> 
>> > >> 
>> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
>> > >> > From: ddekany@freemail.hu
>> > >> > To: dev@freemarker.incubator.apache.org
>> > >> > Subject: Re: Freemarker manual Local set up
>> > >> > 
>> > >> > The Manual is in the "freemarker" project, under src/manual. It also
>> > >> > uses docgen of course. (You can download the latest docgen artifact
>> > >> > with running `ant update-deps` in the "freemarker" project.) The
>> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
>> > >> > 
>> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
>> > >> > what's not described there is probably undocumented...
>> > >> > 
>> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
>> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
>> > >> > is built from DocBook XML by Docgen.)
>> > >> > 
>> > >> > -- 
>> > >> > Thanks,
>> > >> >  Daniel Dekany
>> > >> > 
>> > >> > 
>> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
>> > >> > 
>> > >> > > Hi Daniel,
>> > >> > >    I could see that freemarker manual is part of the site
>> > >> > > http://freemarker.org/docs/index.html
>> > >> > > Since that is generated using the doc-gen, I am trying to look into
>> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
>> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
>> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
>> > >> > >
>> > >> > > I am trying to get the manual up and running locally to connect
>> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
>> > >> > > Please guide me.
>> > >> > > Pradeep.                                          
>> > >> > 
>> > >>                                         
>> > >                                           
>> > 
>> > -- 
>> > Thanks,
>> >  Daniel Dekany
>> > 
>>                                         
>                                           


RE: Freemarker manual Local set up

Posted by Pradeep Murugesan <pr...@outlook.com>.
Hi Daniel,
  I am still trying to knock it down but in vain. I dig down to programListing macro in NodeHandlers.ftlh and I am lost there as what is going on. 
I tried to shrink the content in book.xml and ran docgen to understand where do i need to inject the logic but that approach threw few other errors. 

It comes all the way down to generateHTMLFile_inner where we get page.fthl and process it and I am not able to proceed further.
Could you please give me a clue ?
Pradeep. 
> From: pradeepmurugesan@outlook.com
> To: dev@freemarker.incubator.apache.org
> Subject: RE: Freemarker manual Local set up
> Date: Mon, 5 Oct 2015 14:45:09 +0530
> 
> Hi Daniel,
> 
>  I am going through the docgen code and its taking some time to clearly get what is happening in the Transform.java.
> I am tracing down to the part where to check if the previous node is frmDataModel if the current node is Template so that I have a hidden form and try it out button. I am facing some challenges there.
> I will try to complete things within this week. 
> Pradeep.
> 
> > Date: Tue, 29 Sep 2015 21:45:41 +0200
> > From: ddekany@freemail.hu
> > To: pradeepmurugesan@outlook.com
> > CC: dev@freemarker.incubator.apache.org
> > Subject: Re: Freemarker manual Local set up
> > 
> > FM is *built* with JDK 8 (and runs on Java 5+ as of 2.3.24). This
> > information was missing from the README.txt... I have fixed that now.
> > The important thing is to ensure that Ant runs on JDK 8 too. Perhaps
> > you need to adjust the JAVA_HOME environment variable for that.
> > (Clearing the Ivy or Ant directories is not needed.)
> > 
> > 
> > Tuesday, September 29, 2015, 8:56:44 PM, Pradeep Murugesan wrote:
> > 
> > > Tried upgrading to java 1.8 and cleared the ant and ivy cache.
> > > still facing the same issue. Have any of you guys faced this already
> > > Pradeep.
> > >
> > >> From: pradeepmurugesan@outlook.com
> > >> To: dev@freemarker.incubator.apache.org
> > >> Subject: RE: Freemarker manual Local set up
> > >> Date: Tue, 29 Sep 2015 08:43:05 +0530
> > >> 
> > >> Hi,  I tried to do "ant manualFreemarkerOrg" to bring up the manual locally.
> > >> But end up in the following error.
> > >> BUILD FAILEDC:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:570: The following error occurred while executing this line:C:\Users\pmuruge\Desktop\Pradeep\Personal\github\apache\freemarker\incubator-freemarker\build.xml:556: java.lang.UnsupportedClassVersionError: org/freemarker/docgen/TransformAntTask : Unsupported major.minor version 52.0
> > >> 
> > >> Googling got me to the state that the docgen jar would have been build using different java and from the github readme understood that docgen requires java 1.8. which means compiling Freemarker project also require Java 1.8 ? Its not mentioned in Freemarker readme though. 
> > >> Please guide me.
> > >> Also,
> > >>  How are you guys working with multiple java versions in the same machine. BTW I am using Windows and tried to manage java 1.7 & java 1.8 but failed with an error . If you guys are already following some way kindly let me know.
> > >> 
> > >> Pradeep.
> > >> 
> > >> 
> > >> > Date: Wed, 23 Sep 2015 20:34:03 +0200
> > >> > From: ddekany@freemail.hu
> > >> > To: dev@freemarker.incubator.apache.org
> > >> > Subject: Re: Freemarker manual Local set up
> > >> > 
> > >> > The Manual is in the "freemarker" project, under src/manual. It also
> > >> > uses docgen of course. (You can download the latest docgen artifact
> > >> > with running `ant update-deps` in the "freemarker" project.) The
> > >> > manual is built with `ant manualOffline` or `manualFreemarkerOrg`.
> > >> > 
> > >> > As of README-s, all 3 modules (freemarker, site, docgen) has one, so
> > >> > what's not described there is probably undocumented...
> > >> > 
> > >> > Anyway, it's docgen's responsibility to generate the hidden HTML forms
> > >> > and JavaScript that will be needed. (Both the Web site and the Manual
> > >> > is built from DocBook XML by Docgen.)
> > >> > 
> > >> > -- 
> > >> > Thanks,
> > >> >  Daniel Dekany
> > >> > 
> > >> > 
> > >> > Wednesday, September 23, 2015, 7:33:05 PM, Pradeep Murugesan wrote:
> > >> > 
> > >> > > Hi Daniel,
> > >> > >    I could see that freemarker manual is part of the site
> > >> > > http://freemarker.org/docs/index.html
> > >> > > Since that is generated using the doc-gen, I am trying to look into
> > >> > > the https://github.com/apache/incubator-freemarker-site for manual contents.
> > >> > > https://github.com/apache/incubator-freemarker-site/blob/master/src/main/docgen/book.xml
> > >> > > references to the site but I am not able to get the xml for manual which doc-gen converts.
> > >> > >
> > >> > > I am trying to get the manual up and running locally to connect
> > >> > > with the freemarker online. Is there any readme kind of thing to achieve the same ?
> > >> > > Please guide me.
> > >> > > Pradeep.                                          
> > >> > 
> > >>                                         
> > >                                           
> > 
> > -- 
> > Thanks,
> >  Daniel Dekany
> > 
>