Use
In an XSLT program, you implement the rules for XSL transformation using the XSLT language (and its additional statements).
XSLT programs, like ABAP programs, are Repository objects and are assigned to other packages. All changes and transports are managed through the Transport Organizer.
Procedure
To create an XSLT program:
The system displays the Create XSLT Program dialog box.
Result
The XSLT program was created as a Repository object and included in the tree display of the object list under XSLT Transformations. The following contents are generated as source text:
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" > <xsl:strip-space elements="*"/>
<xsl:template match="/"> </xsl:template>
</xsl:transform> |
This standard source text is the starting point for your own implementation of the transformation rules.
Standard Source Text and Program Structure:
Generated line |
Meaning |
<xsl:transform version="1.0" |
Specifies the XSL version. |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
Declares the namespace for the XSL standard. |
xmlns:sap="http://www.sap.com/sapxsl" |
Declares the SAP namespace extension needed for ABAP calls. |
<xsl:strip-space elements="*"/> |
Ensures that "whitespaces" (spaces, tabulator, return, and so on) are not considered in any of the elements of the document tree at runtime for the purpose of improving performance. |
Insert your source text with global elements (such as parameters) here. |
|
<xsl:template match="/"> |
Defines the beginning of the XSL templates and associates the template with the root of the XML document. |
Define one or more templates with the relevant transformation rules here. |
|
</xsl:template> |
Defines the end of the XSL template. |
</xsl:transform> |
Defines the end of the XSLT program. |
See also:
SAP XSLT Processor Reference Testing the XML Transformation