1

What are the differences between XML and HTML mode when doing variable insertion? I can't find anything in the docs and couldn't find the answer after half-an-hour of looking at the source code.

See the issue I created for this for an explanation of what I want to do and the behavior https://github.com/thymeleaf/thymeleaf/issues/896

<EntityDescriptor
...
    th:attr="entityID=${entityId},validUntil=${validUntil}">
... 
</EntityDescriptor>

The resulting output is

<EntityDescriptor
...
    entityID="what_the_entity_id_is" validuntil="correct_timestamp">
... 
</EntityDescriptor>

Note that validUntil becomes validuntil. I've never seen this behavior before.

Does XML mode not support th:attr?. If so where can I find this to lower case in the source code or docs?

Joshua
  • 177
  • 3
  • 3
  • 14

1 Answers1

0

This represents a partial answer.

Why is the xml lowercased?

The real answer to this is: it isn't. When viewed from a web browser DOM this is the case, but a curl request on the endpoint exposing this xml file confirmed that the attribute names are properly cased.

What are the differences between XML and HTML mode?

This remains unanswered as I am noticing some differences in behavior. For example I'm unable to insert th:block elements in arbitrary places in the XML code. I believe this may have to do with the XML being more strictly parsed than HTML, but an answer to this part of the question would be very helpful.

Joshua
  • 177
  • 3
  • 3
  • 14