d1c404d5db58a7d3247a33e7b9749f3cdd60a381
* Foundational components for reading/processing Wattsi files into classes. * Introducing tests for compliance with wattsi definitions. - Several elements have been found to be missing from the code generator. - A long-term strategy for dealing with obsolete elements will be needed. Should we remove and change the API? Or should we deprecate and leave in-place? - Found one element that was accidentally added to the code generator but never used. Hopefully. - Fixes will be applied in following commits. * Added newer elements/tags and cleaned up invalid Tag class. - Added DataTag. - Added SlotTag and TemplateTag to support web components. - Added global attributes to support web components. - Removed GenerateTag. Accidentally introduced by string replacement in code generator. * Upgrading revapi and maven plugin. Configured revapi to ignore removal of GenerateTag. - The GenerateTag class was created accidentally. It does not have any representation in the HTML standard is should not be provided in this library.
j2html
Java to HTML generator. Enjoy typesafe HTML generation.
The project webpage is j2html.com.
Getting started
Add the maven dependency
<dependency>
<groupId>com.j2html</groupId>
<artifactId>j2html</artifactId>
<version>1.5.0</version>
</dependency>
Or the gradle dependency
compile 'com.j2html:j2html:1.5.0'
Import TagCreator and start building HTML
import static j2html.TagCreator.*;
public class Main {
public static void main(String[] args) {
body(
h1("Hello, World!"),
img().withSrc("/img/hello.png")
).render();
}
}
The above Java will result in the following HTML:
<body>
<h1>Hello, World!</h1>
<img src="/img/hello.png">
</body>
Find more examples at http://j2html.com/examples.html
Description
Languages
Java
96.5%
CSS
1.8%
HTML
1.4%
JavaScript
0.3%