Re: Patch and test to allow component calls

John Williams <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Mon, 20 Sep 2004, Jonathan Swartz wrote:
> Summary: We all agree that it would be nice to conveniently match a </&>
> with its starting tag, but differ on the method.
>
> 1. Forcing the closing tag to contain the exact path, e.g. </&
> /foo/bar>. This doesn't work because the starting tag may be an
> arbitrarily complex expression, e.g. <& $foo ? '/comp1' : $bar ? ... &>

And it's not backward compatible.

> 2. Allowing the closing tag to either be empty or to match the exact
> path, or a subset of the exact path. Dave R felt the parsing would be
> too complicated, and also didn't like having two closing tag syntaxes.

The users *want* two syntaxes.  I think we should listen.

They want it for (1) self-documentation, and (2) syntax-validation to
verify the end tag matches what they think it should.

I think we can give them that with trivial parsing if we just match
verbatim up to the first comma.  That means in the slightly non-trivial
case of <& $foo, %ARGS &> we are matching q{$foo} instead of the contents
of $foo.  For complex cases such as <& fee($foe,$fum) &> we should
recommend that they use </&> instead, since it will be there for backward
compatibility anyway.

> 5. Create a convenient comment marker that you can place just after the
> </&>. (%# won't work because it has to be on a separate line.) This is
> my preferred solution, because it avoids violating a syntactic tag, and
> it creates a useful new syntax that could be used beyond </&> - we have
> often talked about needing a comment marker anyway. On the above thread
> we considered the following comment options:
>
> <& /foo |&>
>    <& /bar |&>
>    ...
>    </&> <%# /bar %>
> </&> <%# /foo %>

It's self-documenting (1), but not self-validating (2), so it is not
sufficient to meet the demands of the users.

If you dispute that the users want (2) then we should do nothing, because
comments will work well enough.

But if you agree the users want (2), then #5 above is not satisfactory.

I'd love to code this (again), if we can reach a consensus on what to do.

~ John Williams




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.