The extra LFs I believe is because of J session,
where stdout is smoutput. In the same thread it
is suggested to substitute print verb.

The definitions of different hXXX and related verbs
are in jhp.ijs script and are easy to follow 
(from bottom up):

hrep=: [EMAIL PROTECTED]                 NB. ... etc ...
hfmt=: ('3 : 0]0',LF)"_ , hrep , (')',LF)"_  NB. call hrep and put in verb
pfmt=: '<%' -: 2&{.             NB. predicate for JHP format
hrun=: [: 0!:0 hfmt^:pfmt       NB. call hfmt if predicate holds
frun=: hrun @ toJ @ fread       NB. read and call hrun


--- "Sherlock, Ric" <[EMAIL PROTECTED]> wrote:

> > [mailto:[EMAIL PROTECTED] On Behalf Of Sherlock, Ric
> > If the page is a JHP page, it is run through 
> > the JHP parser. Given the JHP pages will be coming straight 
> > from say Dreamweaver, they won't have '<%' as the first two 
> > characters, hence the need to append '<% %> to the front of 
> > the html to be parsed.
> 
> >From the "using JHP for general templating" thread I see that using hdef
> (or hdefine?), I could get around having to prepend '<% %>' to my html
> page.
> In that thread Oleg provides the following verb: 
> 
> run=: 3 : 0
>   r=: ''
>   verb hdef y ''
>   r
> )
> 
> (From jhp.ijs:
> hdef=: 2 : 'm : (hrep n)'
>                            )
> Which does work for my html file (although it adds some pesky LFs):
> 
>    run html
> <html>
>   <head>
>   <title>test jhp</title>
>   </head>
>   <body>
>    <h1>Gidday 
> Micheal
> !</h1>
>    <p>You are 
> Micheal
>  
> McDonald
> </p>
>    <p>The time is 
> 2007 6 6 0 0 28.806
>  </p>
>    <p>Let's get started.</p>
>   </body>
> </html>
> 
> I suppose I'm exposing my lack of skill/understanding with adverbs &
> conjunctions, but I don't really understand what 'run' & 'hdef' do and
> how best to adapt the idea for my purpose.
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 




 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to