Issue Type: Feature Request Feature Request
Affects Versions: 1.0
Assignee: Unassigned
Components: transformation
Created: 29/Jul/13 2:56 PM

EAP 6.0 and EAP 6.1 changed the default transformer to org.apache.xalan.processor.TransformerFactoryImpl and, in doing so, highlighted an issue with the way in which SwitchYard was creating DOMSources.

Executing the quickstart results in the following exception being displayed on the console

Caused by: javax.xml.transform.TransformerException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted.

This exception is raised because the transformer cannot find any template which matches the DOMSource and falls back to the default transformations (do nothing for elements/attributes and copy text). It attempts to create an XML document for the following result, "<?xml version="1.0" encoding="UTF-8"?> PO-19838-XYZ BUTTER 200", which raises the exception when the transformer tries to create a text node without an enclosing element.

The transformer fails to identify the template because the DOMSource is created using the document element (orders:order) causing the transformer to search for a template matching the element name (order) rather than the document . In order to match the "/" template the DOMSource must be created using the document.

Project: SwitchYard
Priority: Major Major
Reporter: Kevin Conner
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: