Altova XMLSpy 2025 Enterprise Edition

XSLT Documents

Home Prev Top Next

XSLT 1.0, 2.0, and 3.0 documents can be edited in Text View and Grid View, and are edited like any other XML document in Text View and Grid View. The default view in which an XSLT document is opened can be set in the File Types section of the Options dialog.

 

Entry helpers

Entry helpers are available for elements, attributes, and entities. Information about the items displayed in the entry helpers is built into XMLSpy, and is not dependent on references contained in the XSLT document.

XSLTEntryHelpers

The following points should be noted:

 

1.If a new XSLT document is created via the Create a New Document dialog (File | New), then the appropriate XSLT elements and attributes (XSLT 1.0, XSLT 2.0, or XSLT 3.0, depending upon which document type was created) are loaded into the entry helpers. Additionally, HTML elements and attributes are loaded, as well as the HTML 4.0 entity sets, Latin-1, special characters, and symbols.

2.If an XML document is created via the Create a New Document dialog (File | New) and given XSLT content, no entry helper items are available except for XML character entities.

3.If an XSLT document is opened that was created as an XSLT document via the Create a New Document dialog (File | New), then the entity helpers will be as in Point 1 above.

4.If an XSLT document is opened that was not created as an XSLT document via the Create a New Document dialog (File | New), then the entity helpers will be as in Point 1 above. Additionally, XSL-FO elements and attributes will be listed in the Text View entry helpers.

5.The prefixes of elements in the Elements entry helper are as follows and are invariable: xsl: prefix for XSLT elements; no prefix for HTML elements; fo: prefix for XSL-FO elements. Consequently, in order to use the entry helpers, the namespace declarations in the XSLT document must define prefixes that match the built-in prefixes shown in the entry helpers.

 

Auto-completion

In Text View, auto-completion is available in a pop-up as you type. The first item in the pop-up list that matches the typed text is highlighted. When an element is being typed, a list of elements pops up with the first nearest match in alphabetical order being highlighted. Similarly, when an attribute is being typed in, a list of applicable attributes pops up. The items in the list are determined according to the rules described in the previous section about entry helpers.

 

XPath intelligent editing

At locations in the XSLT document where XPath expressions can be entered (for example, inside the value of a select attribute, inside attribute value templates, and XSLT 3.0 value templates), the following features are available.

 

Syntax coloring for the XPath constructs, including matching brackets during typing.

A hover tip if the cursor is placed over an XPath function. The tip contains information about the function.

XPath functions and axes are suggested in popups as you type. You can move up or down the list of suggestions with the Up/Down cursors. If the item that is highlighted in the popup is a function, then information about the function (its signature) is displayed in an additional popup.

If an XML file has been assigned in the Info window, then the elements and attributes of the XML file will also be available in the popup.

 

Validating XSLT documents

The XSLT document can be validated against the XSLT schema built into XMLSpy (click XML | Validate (F8)). The correct built-in schema is automatically selected according to whether the XSLT document is XSLT 1.0, XSLT 2.0, or XSLT 3.0 (specified in the version attribute of the xsl:stylesheet element).

 

© 2018-2024 Altova GmbH