Altova StyleVision 2024 Enterprise Edition

A bookmark (or anchor) can be inserted anywhere in the SPS, at a cursor insertion point or around an SPS component.

 

Bookmarks are created in the SPS via the Insert Bookmark dialog (screenshot below). In this dialog you define the name of the bookmark. The name can be a static name, or it can be a dynamic name that is (i) derived from XML document content, or (ii) generated arbitrarily with an XPath expression.

 

Creating a bookmark

To insert a bookmark, do the following:

 

1.Place the cursor at the location where you wish to create the bookmark.
2.Select the menu command Insert | Insert Bookmark, or right-click and select Insert | Bookmark.
3.In the Insert Bookmark dialog (screenshot below), select a tab according to whether the name of the bookmark should be static (Static tab), dynamically obtained from the XML document or arbitrarily generated from an XPath expression (Dynamic), or composed of both static and dynamic parts (Static and Dynamic). In the screenshot below a dynamic bookmark is created, which has a name that is a unique ID for each Name child of the context node.

 

dlg_insert_bookmark

 

4.Click OK. The bookmark is defined.

 

After a bookmark has been created, it can be linked to by a hyperlink.

 

Note: Bookmarks are created at the location specified in the design. If that location is within an element that repeats, a bookmark is created within each instance of that repeating element. If a static name is given, then each bookmark will have the same name. Therefore, it is better in such cases (of repeating elements) to give a dynamic name, which can be, for example, the name of a child element of the context node (the element within which the bookmark is created). If the node selected for the dynamic name might have the same content across multiple instances, then the uniqueness of the bookmark name can be ensured by using the generate-id() function to generate the name (see screenshot above). To reference such a bookmark, the same ID can be generated as the href value of a hyperlink. In this case make sure you use the fragment-identifier # in front of the generate-id() function. The XPath expression would be: concat('#', generate-id(nodeXXX)).

 

 

Modifying a bookmark

After a bookmark has been created, its name can be modified via the Edit Bookmarks dialog. This dialog is accessed as follows:

 

1.Select the bookmark in the design.

2.In the Properties sidebar, click the Edit button of the Bookmark Name property (screenshot below) in the Bookmark group of properties. This pops up the Edit Bookmark dialog, which is identical to the Insert Bookmark dialog described above (see screenshot above).

 

WinPropsAccessBookmarksDlg

 

3.In the Edit Bookmark dialog, edit the name of the bookmark in either the Static, Dynamic, or Static and Dynamic tab.

 

Deleting a bookmark

To delete a bookmark, select it in the design and press the Delete key.

 

© 2017-2023 Altova GmbH