Bookmark

www.altova.com Expand/Collapse All Print this Topic Previous Page Up One Level Next page

Home >  User Reference > Insert Menu >

Bookmark

The Bookmark command allows you to insert a bookmark (or anchor) anywhere in the SPS. A bookmark can be referenced by a Hyperlink.

 

To insert a bookmark, do the following:

 

1.Place the cursor at the location where you wish to create the bookmark.
2.Select Insert | Bookmark, or right-click and select Insert | Bookmark. The Insert Bookmark dialog appears.

 

dlg_insert_bookmark

 

3.In the Insert Bookmark dialog, select a tab according to whether the name of the bookmark should be static (Static tab), dynamically obtained from the XML document (Dynamic), or composed of both static and dynamic parts (Static and Dynamic). In the screenshot above a dynamic bookmark is created, which has a name that is a unique ID for each Name child of the context node.
4.Click OK. The bookmark is defined.

 

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)).

 

 

You can edit the name of a bookmark after it has been created. Do this by right-clicking the bookmark and selecting the Edit Bookmark Name command from the context menu that appears. Alternatively, in the Properties sidebar, in the Bookmark group of properties for the bookmark, you can click the Edit button of the bookmark name attribute and make the required changes.

 

Deleting a bookmark

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

 

 

 


© 2019 Altova GmbH