Skip to content

MULE-6501 - Handle XSLT parameters with expressions that return (XML) objects#8

Closed
robvalk wants to merge 2 commits intomulesoft:mule-3.xfrom
sixtree:MULE-6501
Closed

MULE-6501 - Handle XSLT parameters with expressions that return (XML) objects#8
robvalk wants to merge 2 commits intomulesoft:mule-3.xfrom
sixtree:MULE-6501

Conversation

@robvalk
Copy link
Copy Markdown

@robvalk robvalk commented Apr 17, 2013

MULE-6501 - Handle XSLT parameters with expressions that return (possibly XML node) objects.

Key use-case now supported is extracting a fragment of an XML payload
via an #[xpath()] expression, and later using this as a input parameter
to an XSLTTransformer.

  1. XsltTransformer calls ExpressionManager.evaluate() instead of
    ExpressionManager.parse()
  2. Converts the returned object to a javax.xml.transform.Source if it is
    convertible.
    • XMLUtils.toXMLSource() handles conversion of Dom4j nodes as well
      as complete documents.
  3. Otherwise uses the expression result object as-is for the XSLT
    parameter.

The expanded support for Dom4j nodes is because the xpath() function
might return a w3c DOM or Dom4j node depending on what format the
message payload was in. Converting the XSLT parameter to
java.xml.transform.Source allows Saxon to process an XML node parameter
as intended.

R Valk added 2 commits April 17, 2013 10:17
(possibly XML node) objects.

Key use-case now supported is extracting a fragment of an XML payload
via an #[xpath()] expression, and later using this as a input parameter
to an XSLTTransformer.

1. XsltTransformer calls ExpressionManager.evaluate() instead of
ExpressionManager.parse()
2. Converts the returned object to a javax.xml.transform.Source if it is
convertible.
  2a. XMLUtils.toXMLSource() handles conversion of Dom4j nodes as well
as complete documents.
3. Otherwise uses the expression result object as-is for the XSLT
parameter.

The expanded support for Dom4j nodes is because the xpath() function
might return a w3c DOM or Dom4j node depending on what format the
message payload was in. Converting the XSLT parameter to
java.xml.transform.Source allows Saxon to process an XML node parameter
as intended.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like your IDE is using tabs here, use whitespaces and the correct indentation please.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use stringValue as per mule style guide

@vromero
Copy link
Copy Markdown
Contributor

vromero commented Jul 16, 2014

Hello @robvalk,

Thank you very much for your contribution!
You'll find some comments attached. Also please consider squashing your commits into one.
Feel free to contact me in you need any info.

Thanks again.

@vromero
Copy link
Copy Markdown
Contributor

vromero commented Jul 30, 2014

Hi @robvalk,

I'm planning to close this PR due to inactivity in 15 days. I'm going to leave the issue open and link the PR to not to loose your contributed code.

If you prefer to not to have it closed, please don't hesitate to contact.

@vromero vromero self-assigned this Jul 30, 2014
@vromero
Copy link
Copy Markdown
Contributor

vromero commented Aug 19, 2014

Hi @robvalk,

I'm closing this now. Thanks for your interest in the project.

We would love to hear from you again. Feel free to reopen if you want to keep working on this.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants