smongiar commented on PR #27154:
URL: https://github.com/apache/camel/pull/27154#issuecomment-5930470305

   > The production code change is small, precise, and correct. The 
normalization condition in `XmlSourceHandlerFactoryImpl.getSource(Exchange, 
Expression)` handles all edge cases properly:
   > 
   > * Identity check (`==`) for `document.getDocumentElement()` is correct for 
DOM nodes
   > * Null check on `getOwnerDocument()` handles detached elements
   > * `!(body instanceof Source)` correctly bypasses normalization for 
explicit Source bodies (including source-expression results that evaluate to a 
Source)
   > * systemId is propagated to the new DOMSource
   > * Original DOM is never mutated — a new DOMSource wrapping the existing 
Document is returned
   > 
   > The test suite (`XsltSaxonDomSourceTest`) is comprehensive: it covers the 
main bug fix path (implicit DOMSource pointing at document element), both 
converter fallback paths (direct type match and generic Source), the Saxon 
StAX-to-DOM fallback, explicit Source bypass, nested/detached element 
non-normalization, systemId preservation, DOM immutability, and idempotency 
under repeated conversions. The XSL stylesheet is well-designed with distinct 
`match="/"` and `match="req:Request"` templates that make the 
document-vs-element context visible in the output.
   > 
   > The pending items from the previous review (JIRA filing, upgrade-guide 
wording) remain open but are orthogonal to the code correctness.
   > 
   > _This review was generated by an AI agent, Hermès on behalf of @gnodet._
   
   JIRA filing, upgrade-guide wording should be addressed yet. Could you 
double-check? Thank you for reviewing :)


-- 
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]

Reply via email to