Application of Xslt in BizTalk Mapping
What is XSLT?
In computer science, XSLT is short for Extensible Stylesheet Language Transformations, a Language for transforming XML documents, T in XSLT represents "transformation" in English ). It is XSL (Extensible
Stylesheet language) is part of the Specification. Another part of the XSL specification is the Formatting Objects (F stands for the Formatting object), also known as the XSL-FO or pipeline fo.
Why XSLT?
We already know that XML is a simple and standard way for computer programs to exchange raw data. Its success does not mean that it is easy to be written and read by people. More importantly, it fundamentally solves the information exchange between application systems. Because XML meets two basic requirements:
(1). Separate data from expressions. The weather forecast information can be displayed on different devices, TVs, mobile phones, or other devices.
(2). Data is transmitted between different applications. The increasing exchange of e-commerce data makes this demand increasingly urgent.
To make the data easier for people to read and understand, we need to display or print the information, such as converting the data into an HTML file, a PDF file, or even a piece of sound. Similarly, to make data suitable for different applications, we must be able to convert one data format to another. For example, the required format may be a text file or an SQL statement, an HTTP message, data calls in a certain sequence, and so on. XSLT is the language we use to implement this conversion function. Converting XML to HTML is currently the main function of XSLT.
Bizing is available in BizTalk. In fact, it is also a compiled Xslt, and more advanced functions can be used in Mapping. However, it is possible that your business data has been defined and the xslt file has been previously defined to convert the data, there is no need to draw a line at, and simply reference the defined xslt.
In addition, developers familiar with Xslt are more convenient and more personalized than Mapping.
XSLT development tool MapForce
Xslt development tools are simple: notepad, XmlSpy, VS, etc. However, I strongly recommend that you use MapForce from Altova with powerful functions.
The main function is interface-based definition Xslt. In addition, it can complete the following application scenarios:
1. XML-XML
2. XML-TEXT
3. DB-XML
4. DB-TEXT
5. TEXT-TEXT
It also integrates EDI and X12 data definitions.
Definition of EDI
XML-> TEXT definition
Use XSLT in Mapping
The following is a simple example.
1. Define input messages
2. Define output messages
3. Use MapForce to complete a Mapping function
4. Obtain Xslt data
5. Save it as An Xslt file, which will be used in BizTalk Mapping.
6. Define Mapping and input the xslt file defined earlier in Xsl M Xsl Path.
7. Save and test. You can get the Output Message in step 2.
Tip: If xslt is used in Mapping, defining all mappings in Map will not work.