Gerald Richter wrote:

>
>
> Another possibility would be fixing the old and new syntax:
>
> <%+ $ref->[$row]{$fieldvar} +%>[# EXAMPLE TEXT #]
>
> this is a little bit short and (maybe) easier to read (but has at least four
> characters ([##])
>

this still would not work for my unit of measure example.  our unit
of measures are 2 characters wide.  this would make this table field
a minimum of 6.  not a problem for us programmers, but designers are
very picky and rightfully so. another possibility is something like this:

<%+ $ref->[$row]{$fieldvar} %>EXAMPLE TEXT<% +%>

notice there is no '+' in front of the first %> and no '+' in front
of the second <%.

so scanner hits '<%+' goes into embperl 'plus mode'
scanner hits '%>' and ignores everything until next '<%'
scanner goes back into plus mode until it hits '+%>'.


>
> >
> > i originally thought of adding an ID (ala html/xml) such as:
> > <%(MY_ID $ref->[$row]{$fieldvar} (%>EXAMPLE TEXT<%)MY_ID)%>
> >
> > but i am not sure the extra complication would be warranted.
>
> What purpose should such an ID serve?

yes. i left out that part.  i actually had abandoned most of the concepts
related to that.  but i will include them here for completeness.

I was thinking that the ID would be available
in a variable in embperl such as $id.  subroutines could then use it
to determine output.  it might make it easier on the web designers if
they could simply type:
<%(MY_ID outputstuff(); (%>EXAMPLE TEXT<%)MY_ID)%>

OR

<%(MY_ID outputstuff(); %>EXAMPLE TEXT<% MY_ID)%>

obviously we would have included a subroutines package somewhere in the
header and written something like:

<%$ sub outputstuff $%>
<%+ $udat{$id} if $id=~m!^MY_!; +%>
<%$ endsub $%>

the reason for the trailing id is for later addition of nesting.
so instead we would have @id and we could inspect @id
to get our hierarchy.  in a way we are incorporating an
xml into embperl.

embedded in the page:
<%(PART $fdat{PART} %>541201
<%(DESC outputstuff() %>12" taper candles<% DESC)%>
<%(UOM outputstuff() %>EA<% UOM)%>
<%(PRICE outputstuff() %>15.25<% PRICE)%>
<% PART)%>


as opposed to similar for designer but with info from a different
souce:

<%(ORDER $reftodata->[$row]{$ordlin} %>4
<%(PART outputstuff() %>541201<% PART)%>
<%(DESC outputstuff() %>12" taper candles<% DESC)%>
<%(UOM outputstuff() %>EA<% UOM)%>
<%(QTYORD outputstuff() %>15.00<% QTYORD)%>
<%(PRICE outputstuff() %>15.25<% PRICE)%>
<%(EXTENSION outputstuff() %>228.75<% EXTENSION)%>
<% ORDER)%>

and the subroutine:
<%$ sub outputstuff %$>
<%+
if ($id[$#id-1] eq 'PART'){
  $returned_from_product_catalog{$fdat{PART}}{$id[$#id]};
} elseif  $id[$#id-1] eq 'ORDER'{
  $returned_from_order_data{$reftodata->[$row]{$ordlin}}{$id[$#id]};
}
+%>
<%$ endsub $%>



cliff rayman
genwax.com


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

Reply via email to