davsclaus opened a new pull request, #27648: URL: https://github.com/apache/camel/pull/27648
[CAMEL-25514](https://issues.apache.org/jira/browse/CAMEL-25514) An attribute value template is evaluated only in an attribute value. In element content of an XSLT 1.0 or 2.0 stylesheet (camel-xslt is XSLT 1.0), `<pieces>{sum(line/@qty)}</pieces>` writes the braces and the expression out as text, with no error. A local model wrote exactly this in the benchmark's transform-xslt example and did not find the cause in 20 tool calls. **Change** - A write, an edit or `camel_validate_source` of a `.xsl` / `.xslt` file answers with a note - it does not refuse the write - for text in an output element (not an `xsl:` instruction) holding a `{expression}` that reads as XPath (a function call, a path, an attribute or a variable): *"<pieces> holds the text {sum(line/@qty)}, which is written out as it is: a {expression} is evaluated only in an attribute value; in element content write <xsl:value-of select="sum(line/@qty)"/>"*. - Left alone: braces in attribute values (evaluated), braces around text with quotes (JSON the stylesheet writes), `xsl:text`, a plain word in braces, and stylesheets with `expand-text` (XSLT 3.0 text value templates). - The camel-jbang monitor's own write gives the note too. Tests: `SourceValidatorJavaXsltTest` (the note; the five cases left alone); camel-jbang-core suite (1628) and the monitor's `McpFacadeWriteFileTest` green. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
