Propose to allow code invocations inside XML syntax

Currently, the XML syntax only allows static values on attributes. But in many scenarios, the value can come from some variable or other code.

This PR extends the XML syntax to support special attributes (value prefixes with `@`) that include Java code.

```
<tone:header title="@title" />
```

Please note that the code isn't evaluated or validated in any way. The value is passed directly to the source output. Also note that I didn't implement an EL parser, so `obj.title` isn't transformed in `obj.getTitle()`.
You are right. My simple implementation doesn't support ". I thought about
it and decided it wasn't necessary now.

It's a nice feature to have in the future if someone decides to do it.
Another feature is EL support inside those parameters. Another one is
variable interpolation.

I admit I implemented the easy and simple path only :)

Em ter, 30 de dez de 2014 08:19, Rodrigo Turini <notifications@github.com>
escreveu:

> In
> src/main/java/br/com/caelum/vraptor/panettone/VRaptorCompilationListener.java
> <https://github.com/caelum/vraptor-panettone/pull/62#discussion-diff-22343803>
> :
>
> > @@ -49,12 +49,14 @@ public void clear() {
> >  	private static final String OPEN_TAG_REGEX = "^<tone:([^\\s>]+)\\s*";
> >  	private static final String SELF_CLOSING_TAG_REGEX = "/>$";
> >  	private static final String TAG_REMAINS_OPEN_REGEX = ">$";
> > -	private static final String TAG_PARAM_REGEX = "\\s*([\\w_\\-\\d]+)\\s*=\\s*(\"[^\"]*\")\\s*";
> > +	private static final String TAG_PARAM_REGEX = "\\s*([\\w_\\-\\d]+)\\s*=\\s*\"([^\"]*)\"\\s*";
> > +	private static final String TAG_PARAM_WITH_CODE_REGEX = "\\s*([\\w_\\-\\d]+)\\s*=\\s*\"@([^\"]*)\"\\s*";
>
> If I'm not wrong, it won't work if our code has a " on it, right? an
> example:
>
> <tone:header title="@title" description="@obj.method("param")" />
>
> but I'm not sure if we should worry about that, in 99,9% of the cases
> we'll just
> call a getter just like you did. Besides that, this PR looks good to be
> merged.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/caelum/vraptor-panettone/pull/62/files#r22343803>.
>