Documentation Index

Fetch the complete documentation index at: https://docs.staedean.com/llms.txt

Use this file to discover all available pages before exploring further.

XMLTOXMLTRANSLATOR activity

Prev Next

In Business Integration Solutions, use the XMLTOXMLTRANSLATOR activity to apply a custom XML style sheet on an XML document.

Usage

Use this activity to apply a custom XML style sheet on an XML document.

Concept

This is an advanced mapping activity that enables complex XML transformations not supported by the Mapper activity.

After transformation, the resulting XML should match the structure of an external document. Developers with more knowledge of XSLT transformations can link directly to an internal document, making the Mapper obsolete. This approach processes faster but may be harder to achieve.

The output of the XML to XML Translator is ready for processing by the remaining pipeline elements. You can use the XML to XML Translator both for exporting and importing data.

XML input (XSLT) ➡️ [XML to XML Translator] ➡️ XML output

Setup

To set up the XML to XML Translator activity, see: Set up the XML to XML Translator activity

Templates

This element includes the following templates:

  • Remove namespaces: Removes the namespaces from a document. See: Examples.

  • ReportParameters: Reformats a document with nodes matching report options and filters to nodes with attributes that the report parameter format accepts.

Example: Removing namespaces

Business Integration Solutions provides an out-of-the-box XMLTOXMLTRANSLATOR for clearing namespaces within an XML document.

Sample XML:

 
    
        27090917 
        2014-04-04 
	
	        	
		 
            1500 
            20 
        
	
	        	
		 
            1600 
            25 
        
	

Sample XSLT:


	
	
	
	
	
	
			
	
	
	
			
	
	
	
	

Result XML after transformation:

 
    
        27090917 
        2014-04-04 
    
            	
         
            1500 
            20 
        
    
            	
         
            1600 
            25 
        
	  

Example: Prepare a complex XML to a mappable external document

This example addresses cases where direct mapping cannot be used between an external XML document and an internal XML document.

Sample XML: In the following example, nodes ShipTo, BillTo, and InvoiceTo have a contactID attribute linked to complex contact nodes within the OrderMessage. The XSLT moves all corresponding nodes from the right contact to the corresponding ShipTo, BillTo, or InvoiceTo based on their attribute.


	participantParty10000101006210072022102UPSN8119100560002152

        
            1900-S
            1
            1
            10
            Project Control Suite
            PARIS Guest Chair, black
            172.0000
            UPSN
            2022102
        
        
            1924-W
            1
            1
            6
            Project Control Suite
            CHAMONIX Base Storage Unit
            172.0000
            UPSN
            2022102
        

        
            Elkhorn Airport
            8119
        
        
            Englunds Kontorsmöbler AB
            8119
            Kungsgatan 18
            9 Wakara Way
            Norrkobing
            SE
            SE-600 03
            555-555-5555
        
    

Sample XSLT:


	
    
			
	

    
	
			
			
	

    
	
			
			
	

    
	
			
			
	

    
	

Result XML: ShipTo, BillTo, and InvoiceTo now contain the corresponding nodes from their respective contact elements, and the contact nodes are removed. This lets you map these new nodes to an internal document based on a sales order.


	participantParty10000101006210072022102
			Englunds Kontorsmöbler AB
			8119
			Kungsgatan 18
			9 Wakara Way
			Norrkobing
			SE
			SE-600 03
			555-555-5555
			Englunds Kontorsmöbler AB
			8119
			Kungsgatan 18
			9 Wakara Way
			Norrkobing
			SE
			SE-600 03
			555-555-5555
			Elkhorn Airport
			8119UPSN8119100560002152

		
			1900-S
			1
			1
			10
			Project Control Suite
			PARIS Guest Chair, black
			172.0000
			UPSN
			2022102
			1924-W
			1
			1
			6
			Project Control Suite
			CHAMONIX Base Storage Unit
			172.0000
			UPSN
			2022102