On Tue, Nov 29, 2016 at 6:36 PM, Carlos Montero Canabal < carlosmonterocana...@gmail.com> wrote:
> Hello Tapestry users, > Hi! > > I would like to create an amp version of my pages into a tapestry5.4 > webapp. According to https://www.ampproject.org/ > docs/reference/spec#required-markup <https://www.ampproject.org/ > docs/reference/spec#required-markup> the root html only would be: > > <html amp> > > Tapestry5 make a xhtml compilation for the .tml, so I ask you if there is > any method to: > That's not correct. Tapestry 5 uses an XML parser for template files, and attributes without values aren't valid XML. You can try <html amp="amp">. > 1. Exclude de xhtml compilation for this pages > 2. Intercept the result and modify it to eliminate additional tags added > by Tapestry. > 3. Create a MarkupModel for AMPHtml? > Number 3 above is probably the best idea. You'll need to override the MarkupWriterFactory so you can use your AmpMarkupModel. -- Thiago