You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by Achim Hügen <ac...@gmx.de> on 2005/08/06 14:17:44 UTC

Source highlighting in forrest docs

I just checked in some changes regarding the site creation.
Look here to see some fancy, coloured example code:

http://people.apache.org/~ahuegen/hivemind/hivemind-examples/index.html

By using a different dtd in the forrest xml files it is now possible
to use these new sections:

<javasource>, <javasourcefile>, <xmlsource>, <xmlsourcefile>.

Besides the syntax highlighting it is quite easy to include source
code from the examples (or even tests) and keep doc and code in sync.
Below is how the new example (setters) looks like.

I removed the copyright notice from some examples to achieve a
more satisfying visual result. I hope this doesn't matter, in the
end it's only example code.

So what about a new initiative "one example per day/week?".
Can we publish the site more often and show the current version
next to the last released version (starting after 1.1 release)?

Achim


<document>
   <header>
     <title>Setter based dependency injection</title>
   </header>

   <body>
	<p>
	This example demonstrates the use of setter based injection for the
	construction of service points. All "set-xxx" elements that are understood
	by the BuilderFactory are used.
	</p>
	<section>
		<title>settersRegistry.xml</title>
		<xmlsourcefile 
file="examples/src/java/org/apache/hivemind/examples/setters/setters.xml" 
/>
	</section>
	<section>
		<title>SetterService.java</title>
		<javasourcefile 
file="examples/src/java/org/apache/hivemind/examples/setters/SetterService.java" 
/>
	</section>

   </body>
</document>







---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Source highlighting in forrest docs

Posted by Howard Lewis Ship <hl...@gmail.com>.
This looks fantastic!

On 8/6/05, Achim Hügen <ac...@gmx.de> wrote:
> I just checked in some changes regarding the site creation.
> Look here to see some fancy, coloured example code:
> 
> http://people.apache.org/~ahuegen/hivemind/hivemind-examples/index.html
> 
> By using a different dtd in the forrest xml files it is now possible
> to use these new sections:
> 
> <javasource>, <javasourcefile>, <xmlsource>, <xmlsourcefile>.
> 
> Besides the syntax highlighting it is quite easy to include source
> code from the examples (or even tests) and keep doc and code in sync.
> Below is how the new example (setters) looks like.
> 
> I removed the copyright notice from some examples to achieve a
> more satisfying visual result. I hope this doesn't matter, in the
> end it's only example code.
> 
> So what about a new initiative "one example per day/week?".
> Can we publish the site more often and show the current version
> next to the last released version (starting after 1.1 release)?
> 
> Achim
> 
> 
> <document>
>    <header>
>      <title>Setter based dependency injection</title>
>    </header>
> 
>    <body>
>         <p>
>         This example demonstrates the use of setter based injection for the
>         construction of service points. All "set-xxx" elements that are understood
>         by the BuilderFactory are used.
>         </p>
>         <section>
>                 <title>settersRegistry.xml</title>
>                 <xmlsourcefile
> file="examples/src/java/org/apache/hivemind/examples/setters/setters.xml"
> />
>         </section>
>         <section>
>                 <title>SetterService.java</title>
>                 <javasourcefile
> file="examples/src/java/org/apache/hivemind/examples/setters/SetterService.java"
> />
>         </section>
> 
>    </body>
> </document>
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org