Re: [Rife-users]
Hi Steve,

Here is the news item that was posted concerning additional template
syntaxes:

http://www.rifers.org/blogs/gbevin/2006/3/2/rife_1_4_released#1_4_highlight02

Now, from what I understand, <!-- --> is the original syntax, with [! /]
being,
as you said, to avoid conflict in attributes. It's also more concise;
theoretically,
you could use templates to generate text (for example, an email that is
automatically sent to a registered user), and the [! /] syntax might be
more
desirable than <!-- -->.

It all comes down, I think, to personal preference. At first I didn't
like the
<!-- --> syntax, but after adapting my editor (Vim) to highlighting it
specially, I got used to it and actually prefer it now.

However, I'm trying to "sell" using RIFE where I'm working now, and that
syntax is a "hard sell"; or, put differently, I've been using the <r:v
name=""/>
syntax in hopes of it being easier to sell; it looks just like any other
XML
tag.

Either way, it might be preferable to use something else in attributes,
either [! /] or ${ }. Also keep in mind that if you close the tag at the
same
place as you open it, instead of using the opening tag and closing tag
with
an empty content, then the tag is rendered as is if no value is set. For
example:

<a href="<r:b name="mylink"/>">some link</a>

works if you set a value to "mylink", but if you don't, it will be
rendered
as above, verbatim, and that will cause some strange output in your
HTML.

However,

<a href="<r:b name="mylink"></r:b>">some link</a>

will render as

<a href="">some link</a>

if you don't set a value.

It might be useful to see where values were not set; in this case it's
better to use a tag that won't interfere with HTML, such as

<a href="${v mylink/}">some link</a>

or

<a href="[!V mylink/]">some link</a>

Hope this helps; sorry if this is more information than you asked ;-)

Frederic

> I've looked in the docs for something about this, but I don't see 
> anything. What is the difference, if any, between "<!--V -->" and 
> "[!V]"? I understand the former can be replaced with "${v}" (and I 
> prefer that syntax) but some of the examples I've run across seem to 
> continue to use the "[!" syntax in href and action attributes even 
> though they use the "${" syntax everywhere else.
> 
> My current assumption is that there is no difference, that the "[!" 
> syntax was invented solely to avoid confusing HTML parsers by having "<" 
> and ">" characters inside the attributes of HTML tags. Is that correct?
> 
> If this is documented somewhere, please feel free to point me there. It 
> is entirely possible I missed it. The user's guide just says "there is 
> another syntax ... where [! is used instead of <!--" but it doesn't say 
> why you'd choose one over the other.
> 
> -Steve
-- 
  
  [EMAIL PROTECTED]

_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to