New XML tag syntax to invoke templates

Supports `<tone:header title="MyTitle" />` as an alias to `<% use(header.class).render("MyTitle"); %>`.

Very simple implementation, regex-based. Only supports String parameters, with everything optional, and one code block (tag body).

/cc @guilhermesilveira @mauricioaniche 
Or even `Stream.of(array)` but I don't think it worst in that case :)


Rodrigo Turini
Caelum | Ensino e Inovação
www.caelum.com.br

2014-12-03 9:56 GMT-02:00 csokol <notifications@github.com>:

> In
> src/main/java/br/com/caelum/vraptor/panettone/VRaptorCompilationListener.java:
>
> > @@ -39,4 +45,63 @@ public void finished(File f, Exception e) {
> >  	public void clear() {
> >  	}
> >
> > +	@Override
> > +	public String preprocess(String content) {
> > +		
> > +		// extract tags
> > +		Pattern p = Pattern.compile("<tone:[^>]+>");
> > +		Matcher m = p.matcher(content);
> > +		StringBuffer sb = new StringBuffer();
>
> You can use Arrays.asStream(arr).foreach(..) if you want Em 9:52 qua,
> 03/12/2014, Sérgio Lopes <notifications@github.com> escreveu:
> … <#14a1001f46d134a6_>
>  In
> src/main/java/br/com/caelum/vraptor/panettone/VRaptorCompilationListener.java:
> > @@ -39,4 +45,63 @@ public void finished(File f, Exception e) { > public
> void clear() { > } > > + @Override <https://github.com/Override> > +
> public String preprocess(String content) { > + > + // extract tags > +
> Pattern p = Pattern.compile("<tone:[^>]+>"); > + Matcher m =
> p.matcher(content); > + StringBuffer sb = new StringBuffer();
> Matcher#appendReplacement only receives StringBuffer, unfortunately — Reply
> to this email directly or view it on GitHub <
> https://github.com/caelum/vraptor-panettone/pull/60/files#r21226402>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/caelum/vraptor-panettone/pull/60/files#r21226565>.
>