Im XSLT-Stylesheet wird sie als xsl:function-Element erstellt, das ein Child des Elements xsl:stylesheet ist, wie im unten stehenden Listing gezeigt wird.
In the XSLT stylesheet, it is created as an xsl:function element that is a child of the xsl:stylesheet element, as shown in the listing below.
Angenommen, Sie möchten ein XSLT-Stylesheet namens ausführen, welches als Input eine Datei namens books.xml sowie zwei obligatorische Parameter "param1" und "param2" erhält.
For example, let's assume that you want to run an XSLT stylesheet called which takes as input a file called books.xml, and two required parameters, "param1" and "param2".
Wenden Sie mithilfe eines XSLT-Prozessors das XSLT-Stylesheet auf die XML-Datendatei an. Dies ergibt die resultierende Ausgabedatei (eine HTM-Datei).
Use an XSLT processor to apply the XSLT style sheet to the XML data file to produce the resultant output file (an.htm file).
Microsoft empfiehlt die Verwendung des Extension Objects benutzerdefinierte Unterroutinen und Funktionen, auf die verwiesen werden in XPath-Abfrageausdrücke zu implementieren, die in einem XSLT-Stylesheet verwendet werden.
Microsoft recommends that you use Extension objects to implement custom subroutines and functions that are referenced in XPath query expressions that are used in an XSLT style sheet.
Es besteht die Möglichkeit, dass Java-Code auf einem Web-Server im XSLT-Stylesheet ausgeführt wird - und genau dieses kann zu einem Kompromittieren des Web-Servers führen.
It's possible to execute java on the web server in the xslt stylesheet, which may lead to a compromise of the web server.
Stellen Sie eine Verknüpfung zu einem externen XSLT-Stylesheet her
Link to an external XSLT stylesheet
Wählen Sie ein vorgefertigtes XSLT-Stylesheet aus
Select a pre-built XSLT stylesheet
In oben gezeigten Screenshot sehen Sie drei gefundene Templates im XSLT-Stylesheet: Ein Template, das mit dem Dokument Node/ übereinstimmt und Templates, die den Nodes n1:italic und n1:bold entsprechen.
In the screenshot above, there are three matched templates in the XSLT stylesheet: a template which matches the document node/, and templates that match the n1:italic and n1:bold nodes.
Dies eignet sich zum Einfügen von Inhalt, der unabhängig vom XML-Instanzdokument und dem XSLT-Stylesheet ist.
This can be useful for inserting content that is independent of both the XML instance document as well as of the XSLT stylesheet.
Die einzelnen Schaltflächen sind aktiv, wenn die PXF-Datei so konfiguriert wurde, dass sie das XSLT-Stylesheet für das jeweilige Ausgabeformat enthält.
Individual buttons are enabled if the PXF file was configured to contain the XSLT stylesheet for that specific output format.
Die altova:evaluate() Erweiterungsfunktion ist in Situationen nützlich, in denen ein XPath-Ausdruck im XSLT-Stylesheet einen oder mehrere Teile enthält, die dynamisch ausgewertet werden müssen.
The altova:evaluate() extension function is useful in situations where an XPath expression in the XSLT stylesheet contains one or more parts that must be evaluated dynamically.
In den drei Bereichen des XSLT Debuggers (siehe Bild oben) sehen Sie das XML-Dokument, das dazugehörige XSLT-Stylesheet und das in Echtzeit erstellte Ausgabedokument.
The XSLT debugger includes a three-panel interface (shown in the image at the top of this page) that displays the XML document, the associated XSLT stylesheet, and the output document as it is being built in real-time.
Das Element<msxsl:script>enthält benutzerdefinierte Funktionen und Variablen, die von XPath-Ausdrücken im XSLT-Stylesheet aufgerufen werden können.
The<msxsl:script>element contains user-defined functions and variables that can be called from within XPath expressions in the XSLT stylesheet.