On 11/22/01 4:29 PM, "Thomas �hlen" <[EMAIL PROTECTED]> wrote:

> Hi. I am a happy Velocity user.
> 
> I have extended ResourceLoader and made myself a TemplateLoader which loads
> templates from a mysql database. Everything works fine I just have one
> implementation question.
> 
> It feels kind of strange to convert a String to a InputStream and then see
> ContentResource yet again convert the InputStream into a String. Everything
> one would want to load into a template parser must be textbased, or? Whould
> it be more efficient to make one Loader base that works with Readers and one
> that works with InputStreams and let one choose which to extend from when
> writing an own ResourceLoader.

Well, we need to convert the input stream into a bunch of characters to
parse, so we use the reader....

> 
> Have also started reading through the Velocity web and code and have found
> some small things..
> 
> Should be Reader in comments.
> [RuntimeServices.java]
>    * @param InputStream inputstream retrieved by a resource loader
>    * @param String name of the template being parsed
>    */
>   public  SimpleNode parse( Reader reader, String templateName )
>       throws ParseException;
> 
>    * @param InputStream inputstream retrieved by a resource loader
>    * @param String name of the template being parsed
>    * @param dumpNamespace flag to dump the Velocimacro namespace for this
> template
>    */
>   public SimpleNode parse( Reader reader, String templateName, boolean
> dumpNamespace )
>       throws ParseException;
> 
> [webpage/Developers guide/Velocity Configuration Keys and Values]
> 
> directive.parse.maxdepth = 10
> 
> should be
> 
> directive.parse.max.depth = 10
> 
> Thanks
> Thomas �hl�n

Thanks for the info.

-- 
Geir Magnusson Jr.                                     [EMAIL PROTECTED]
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to