🌿

parsley

WO template parser based on WOOgnl

Version
v1.6.0
Updated
Aug 10

1.6.0

v1.6.0 Jun 26 on GitHub ↗
  • Tag shortcuts and element replacements are now declarative and recursive. Parsley's built-in shortcuts (e.g. strWOString) live in a parsley-tag-aliases.properties resource, and any framework or app can contribute its own — including element-class replacements like WOStringERXWOString — by dropping the same-named file into its src/main/resources. Aliases resolve recursively, so a shortcut and a replacement compose automatically (strWOStringERXWOString).
  • Better performance when using inline error messages.

Full Changelog: https://github.com/undur/Parsley/compare/v1.5.0...v1.6.0

1.5.0

v1.5.0 Jun 18 on GitHub ↗
  • Breaking: Parsley is now registered with a fluent builder — Parsley.configure().….register() — replacing the old Parsley.register() / Parsley.showInlineRenderingErrors(…) / Parsley.registerElementFactory(…) calls. The builder amends the current configuration, so a framework can register Parsley once and an app can add to that registration later. ParsleyConfiguration.defaultDevConfiguration() / defaultProductionConfiguration() provide ready-made starting points.
  • Binding-failure annotation (for inline error display) is now applied generically to every association type via a binding-layer proxy, rather than only key-value associations.
  • Elements can be excluded from proxy wrapping by class or simple name via .excludeFromWrapping(…).
  • New in-page development controls strip (.controls(true)) — a small expanding control in the bottom-left corner for toggling Parsley's dev features at runtime.
  • The template parser was extracted into its own ParsleyTemplateParser class; Parsley is now purely the library's entry point and configuration.
  • Parsley now only post-processes responses that were generated by its own template engine, rather than every dispatched response (#3).

Full Changelog: https://github.com/undur/Parsley/compare/v1.4.2...v1.5.0

1.4.2

v1.4.2 Jun 1 on GitHub ↗
  • Attach source location (template line/column and binding) to exceptions thrown during rendering, action invocation and value push/pull, making template errors much easier to diagnose.
  • Wrap WOComponentReference in ParsleyProxyElement, so source-location reporting also covers nested component references.
  • Update slf4j to version 2.0.18
  • Update junit to version 6.1.0

Full Changelog: https://github.com/undur/Parsley/compare/v1.4.1...v1.4.2

1.4.1

v1.4.1 Apr 22 on GitHub ↗
  • Update template parser to fail on duplicate attributes in dynamic tags, like <wo:str value="yeah" value="wat" />. Previous versions (and WOOgnl) silently ignored duplicate bindings and just used the last declared binding value.
  • Update ognl version used by parsley-ognl to version 3.4.11

Full Changelog: https://github.com/undur/Parsley/compare/v1.4.0...v1.4.1

1.4.0

v1.4.0 Apr 8 on GitHub ↗

This release uses the template parser from ng-objects now published on maven central, rather than including an entire copy of the template parser in Parsley itself. This simplifies development and ensures compatibility between the two frameworks.

We also get some new features from the ng template parser, like keeping track of the location where a parsing errors occurs, allowing us to more nicely report errors (for example, highlighting the erroneous code in the exception page like ERXExceptionPage does for errors in java code).

Other changes

  • Maven groupId changed from is.rebbi to is.rebbi.parsley so make sure to update dependency declarations.
  • We no longer render HTML comments using the WOHTMLCommentString element, instead comments are treated as any other plain HTML string. This doesn't change much except it means the -WOIncludeCommentsInResponse property doesn't do anything anymore. I suspect it's rarely used but if someone needs this functionality, we can consider bringing it back.

Experimental changes

Changes that are functional but can be considered to be in "preview mode".

Parser directives

The template parser now supports a couple of parser directives.

  • <p:comment></p:comment> is a "parser comment" meaning "ignore everything between these tags". Nothing is parsed so the content does not end up in the parsed template / eventual generated response.
  • <p:raw></p:raw> means "don't perform any parsing/processing on the content between these tags". Means any dynamic tags like <wo:str> are not processed but are passed as unparsed strings to the parsed template/ response.

parsley-ognl module

Optional module providing OGNL expression support via a ~ prefix in binding values. Currently enabled by passing in an association factory when registering parsley, using Parsley.register( new ParsleyOgnlAssociationFactory() );

Pluggable element factories per namespace

New ParsleyElementFactory interface with Parsley.registerElementFactory(namespace, factory). The wo namespace is registered by default. Ships with ParsleyHTMLElementFactory for creating WOGenericElement/WOGenericContainer from HTML element names. Can be tested by running Parsley.registerElementFactory( "html", new ParsleyHTMLElementFactory() ); after parsley's registration.

Full Changelog: https://github.com/undur/Parsley/compare/v1.3.0...v1.4.0

1.3.0

v1.3.0 Nov 15, 2025 on GitHub ↗

Excludes ERXWOTemplate from element proxying in dev mode

Full Changelog: https://github.com/undur/Parsley/compare/v1.2.0...v1.3.0

1.2.0

v1.2.0 Oct 15, 2025 on GitHub ↗
  • Deploy to WOCommunity Maven Repository
  • Nicer message for UnknownKeyException
  • Some generic parser logic cleanup

Full Changelog: https://github.com/undur/Parsley/compare/v1.1.0...v1.2.0

1.1.0

v1.1.0 Mar 30, 2025 on GitHub ↗

Only handle rendering exceptions inline that we excplicitly know how to handle

Full Changelog: https://github.com/undur/Parsley/compare/v1.0.0...v1.1.0

1.0.0

v1.0.0 Mar 27, 2025 on GitHub ↗

Initial release