Utility Tools

CHAPTER 4

XML Editors

This chapter describes the basic facilities that the Novell exteNd Director development environment provides to work with XML and XML-related files. It contains the following topics:

 
Top of page

About XML

XML (Extensible Markup Language) is a language designed to facilitate the exchange of data between computer systems (which can be of different types) and applications on the Web. XML is a project of the World Wide Web Consortium (W3C). It is a standard, public format.

Unlike HTML, XML is extensible. It is a metalanguage, a language that describes other languages. With XML, you can define customized markup languages to describe any type of document structure. XML can be used to specify the structure of anything from a recipe (which might consist of descriptions, ingredients, preparation steps, and so on) to a Web application (J2EE deployment descriptors are XML documents).

The definition of an XML document is specified by either a DTD (Document Type Definition) or a Schema. DTDs, which are older, specify the structure of an XML document. They specify the names of elements, attributes, and entities that can exist in a conforming XML document. DTDs also specify where the elements can be used, whether they are required, and so on.

Schemas are more recent and more powerful. They can specify the structure as well as the content (data types) allowed in XML documents. Unlike DTDs, Schemas are themselves XML documents.

For more information    The complete XML standard can be found at www.w3.org/XML.

TIP:   If you are new to XML, you might want to read the XML FAQ at www.ucc.ie/xml. Among other topics, it describes the differences between Schemas and DTDs.

 
Top of page

XML in the development environment

The exteNd Director development environment provides broad support for working with XML files, including:

You'll learn about these XML facilities in this chapter and in the XSL Editor chapter.

 
Top of page

Using the XML Editor

The XML Editor enables you to:

 
Top of section

Using the Source View

The Source View is a powerful XML source editor. In addition to standard text editing features (including cut-and-paste editing, undo and redo, and searching and replacing text) it supports these specialized features for editing XML files:

The XML Editor displays the current XML document in Source View if you click the XML Source View tab.

XMLSourceView

 
Top of section

Using the Tree View

The Tree View has special features designed to help you create valid XML documents quickly and easily based on XML Schemas or DTDs. The Tree View supports:

The XML Editor displays the current XML document in Tree View if you click the XML Tree View tab.

XMLTreeView

Tree View controls

You can use these controls to manipulate and navigate the tree:

Control

Description

XMLIconAllExpand

Expand all nodes.

You can also do this from the context menu; right-click a node and select View>Expand All.

XMLIconAllCollapse

Collapse all nodes.

You can also do this from the context menu; right-click a node and select View>Collapse All.

XMLIconFilter

Display the Tree Filters dialog to show or hide particular types of nodes in the tree. The default is to show all, but you can selectively show or hide any of the following:

  • Attributes

  • CDATA

  • Comments

  • Namespaces

  • Processing Instructions

  • Text

You can also do this from the context menu; right-click a node and select View>Filter.

XPath

You can do either of the following:

  • Enter an XPath expression in this control to navigate to a corresponding node in the tree

  • Highlight a node in the tree to see its XPath expression in this control

The XPath control in the XML Editor's Tree View is a subset of the XPath Navigator described in the chapter on working with scoped paths and XPaths in Developing exteNd Director Applications. See that chapter to learn about XPath expressions and how to use them.

XMLIconEleExpand

Expand node.

You can also do this from the context menu; right-click a node and select View>Expand Node.

XMLIconCollapse

Collapse node.

You can also do this from the context menu; right-click a node and select View>Collapse Node.

Tree View icons

Here's an explanation of the icons that display in the tree:

Icon

Description

XMLIconDocument

Document

XMLIconElement

Element

XMLIconAtt

Attribute

XMLIconCDATA

CDATA

XMLIconComment

Comment

XMLIconNS

Namespace declaration

XMLIconProcInst

Processing instruction

XMLIconText

Text value of an element; for example, the text value of

  <myTag>some text</myTag>

is some text

XMLIconEleSearch

Search result

XMLIconReqAtt

Required attribute

XMLIconCannotParse

Indicates that the XML cannot be parsed

 
Top of page

Creating and opening XML documents

You can create new XML documents or work with existing ones.

Procedure To create a new XML document:

  1. Select File>New>File.

  2. On the XML tab, select XML file.

  3. To create a blank XML document, deselect Use Wizard and click OK. An empty XML document is created and displayed in the XML Editor.

    To use the XML File Wizard, select Use Wizard and click OK. The XML File Wizard displays. Go through the wizard as follows.

  4. Specify the name of the XML file and click Next.

  5. Specify a Schema or DTD to associate with the XML file. You can:

    For more information    For more information about the XML catalog, see Maintaining the XML catalog.

  6. If you want the wizard to generate some skeletal contents for your XML file based on the selected Schema or DTD, check the Create XML from XML Schema or DTD option; when you click Next, the wizard will prompt you to choose a root element for the document.

  7. Click Next.

  8. Specify the location of the XML file and click Finish.

    The XML Editor displays the Schema Guide.

  9. You can use the Schema Guide, or click Close to edit the file manually.

For more information    For information about the Schema Guide, see Using the Schema Guide.

Procedure To open an XML document:

  1. Select File>Open.

  2. In the Open dialog, select the XML file and click Open.

    The file extension must be .XML or .TLD (for a tag library descriptor file). The selected file opens in the XML Editor and the XML Editor menu appears on the menu bar.

    NOTE:   Other kinds of XML files may open in specialized XML editors, such as the XML Catalog Editor or Deployment Descriptor Editor.

Finding Schemas and DTDs   If the XML document specifies a Schema or DTD, the editor searches for it when opening the document. If the editor finds the Schema or DTD, it attaches it to the XML document. If the reference is unqualified, the editor first looks in the XML catalog; if the editor doesn't find the Schema or DTD there, it looks in the directory containing the XML document.

If the XML Editor cannot find the referenced Schema or DTD, you receive an error message in the Output Pane and the document is opened without being attached to a Schema or DTD.

For more information    For more information, see Associating Schemas and DTDs with XML documents.

NOTE:   The window title for an XML document specifies whether the document is attached to a Schema or DTD.

 
Top of page

Working with Schemas and DTDs

To work with the Schemas and DTDs for your XML documents, you need to know about these topics:

 
Top of section

Associating Schemas and DTDs with XML documents

In order to use context-sensitive code completion and to validate an XML document, an XML Schema (.XSD file) or a DTD (.DTD file) must be attached to the document. If the editor doesn't attach a Schema or DTD when opening your XML document, you can use the XML Editor menu to attach one, or you can manually edit the document to specify a Schema or DTD (and then refresh).

Attaching a Schema or DTD to a document

You can attach a Schema or DTD that is in the XML catalog or elsewhere on the file system to an open XML document. You can choose to attach the specified Schema or DTD either temporarily or permanently.

For more information    For more information about the XML catalog, see Maintaining the XML catalog.

Procedure To attach a Schema or DTD to an XML document:

  1. Select XML Editor>Attach Schema or DTD.

    XMLAttachSchema

  2. Specify a Schema or DTD to associate with the XML document. You can:

  3. Set the Permanent Attachment property to make this association either temporary or permanent:

  4. Click OK.

    The Schema or DTD is now attached to your XML document. You can use the XML Editor's context support for editing, and you can validate your document.

Errors   Any errors that occur when attaching a Schema or DTD are reported in the Output Pane.

Manually specifying a Schema or DTD in a document

Another way to permanently associate your document with a Schema or DTD is to manually edit the XML and then make the XML Editor aware of the association.

Procedure To make a manual association and update the editor:

  1. Edit the open XML document to specify the associated Schema or DTD. For example, to associate the document with a DTD, edit its DOCTYPE statement.

  2. Update the editor to use the association by selecting XML Editor>Refresh Schema Handler.

    The XML Editor parses the XML document and updates the DTD or Schema information associated with the document.

Errors   Any errors that occur when updating the Schema or DTD information are reported in the Output Pane.

Detaching a Schema or DTD

You can detach a Schema or DTD from an open XML document.

Procedure To detach a Schema or DTD:

The Schema or DTD is not permanently detached. The next time you open the XML document, if the document specifies a Schema or DTD that the editor can find, the Schema or DTD will be attached again.

 
Top of section

Converting a DTD to a Schema

Schemas are more powerful than DTDs and are becoming the standard for defining the structure and allowable content type for XML documents. Also, unlike DTDs, Schemas are themselves XML documents and can be edited and validated in the XML editors.

The exteNd Director development environment provides support for converting DTDs to Schemas. You can:

Procedure To convert a DTD on the file system to a Schema:

  1. Select File>New>File.

  2. On the XML tab, select DTD to Schema (in the Advanced section) and click OK.

  3. Specify the DTD to convert. You can click the ellipsis button to browse the file system for the DTD file. The file must have the extension .DTD.

  4. Specify the name of the Schema file to generate. Don't provide a file extension; the file will be given the extension .XSD.

  5. Specify the location to save the Schema file. You can click the ellipsis button to browse the file system.

  6. Specify whether you want the Schema opened in the Schema Editor after it is created.

  7. Click Finish.

    This converts the DTD to a Schema, stores the Schema in the specified location, and displays the Schema in the Schema Editor (if you specified to open it).

Procedure To convert a DTD attached to an open document to a Schema:

  1. Attach a DTD to an open XML document.

  2. Select XML Editor>Convert DTD to Schema.

    A file save dialog displays.

  3. Specify the name and location of the Schema. Don't provide a file extension; the file will be given the extension .XSD.

  4. Click Save.

    The Schema is saved.

What to do next   You can edit the generated Schema file in the Schema Editor and attach it to an XML document for context editing and validation.

 
Top of section

Creating and editing Schemas

The exteNd Director development environment provides a wizard you can use when you need to create a new Schema. When you need to modify a Schema, you can use the Schema Editor (which is simply a more specialized version of the XML Editor).

Procedure To create a new Schema:

  1. Select File>New>File.

  2. On the XML tab, select XML Schema file.

  3. To create a new Schema using the wizard, make sure Use Wizard is selected then click OK.

    (Alternatively, you can deselect Use Wizard to skip the wizard and immediately get an empty, untitled Schema in the Schema Editor.)

  4. When the XML Schema File Wizard displays, specify a name and location for the new Schema file then click Finish.

    The wizard creates that file and opens it in the Schema Editor (which includes a Schema Editor menu on the menu bar). You can now start developing your new, empty Schema by using either the Tree View or the Source View.

Procedure To edit a Schema:

  1. Select File>Open.

  2. In the Open dialog, select the Schema (.XSD) file to edit and click Open.

    The file opens in the Schema Editor (which includes a Schema Editor menu on the menu bar). You can now manipulate this Schema as needed by using either the Tree View or the Source View.

 
Top of section

Using the Schema Guide

The XML editors provide context editing functionality to help you work on XML documents. But context editing doesn't always supply all the information you might want. For example:

The Schema Guide addresses these situations.

Procedure To invoke the Schema Guide:

  1. Go to the Tree View in an XML editor.

  2. Do one of the following:

    The Schema Guide opens in a new window.

The Schema Guide window

SchemaGuide1

The Schema Guide window consists of four parts:

In the screen shown above, the sixth person element (/personnel/person[6]) was selected when the Schema Guide was invoked.

About the left pane

The left pane shows the element's subelements as well as the Schema model groups they belong to (Choice, Sequence, or All) or the model group declarations (for example, schemaTop).

The Schema Guide displays how many instances of each subelement and attribute are allowed (such as 0 or more, required, or optional). Positioning the mouse pointer over an element displays a tool tip describing that element (if there is documentation for it in the Schema or DTD).

The Schema Guide is invoked automatically when you use the XML File Wizard to create an XML document. You can also invoke it when the document is empty and has a Schema attached. In this situation, the Schema Guide lists in the left pane possible root elements. If you are using a DTD, the description in the header will show the suggested root elements (that is, those elements not in the content model of other elements).

About the right pane

The right pane displays the standard Tree View to show the element that was selected when the Schema Guide was invoked, its attributes, and its immediate children.

Subelements that are not legal are shown with a red background. If the selected element contains an illegal attribute, the element itself is marked red. Clicking a colored element displays a similarly colored region of text along the bottom of the tree. The text describes the issue in more detail.

In many cases, the Schema Guide can fix validation errors, either by removing illegal elements or attributes, or by moving an element from a wrong namespace into a correct one. In the following example, the Schema Guide is indicating that the age element is invalid in the person element. You can delete the invalid element by clicking Delete.

SchemaGuide2

Namespace errors are treated separately. These errors are common when dealing with Schemas, because Schemas can contain elements from several namespaces and have different rules for whether specific elements or attributes are required to be in a namespace. An element that has the correct local name for validation but whose namespace is incorrect is shown with a yellow background. You can edit the element to specify the correct namespace.

Adding elements and attributes

Elements   When you select an element in the left pane, the right pane shows where that element can be legally inserted by displaying one or more green nodes in the tree. The following screen shows that an email element can be legally inserted above or below the existing email element.

SchemaGuide3

To insert an element, select one of the green nodes in the tree and click Insert. If you don't want to insert the element, simply select another object in the left pane to consider.

If you click an element in the left pane that cannot be legally inserted, you will not see any green nodes in the right pane.

Attributes   To add an attribute, select it in the left pane. If it is legal to add, you will see a green node in the right pane. Click Insert and specify the attribute's value.

Looking at different elements

You can navigate the element hierarchy by selecting a subelement in the right pane and clicking Go to. That subelement becomes the selected element and its definition displays in the left pane; the tree structure for the selected instance displays in the right pane. You can work with it the same way you worked with the parent element.

The following screen shows the Schema Guide after you select the person element's name subelement and click Go to.

SchemaGuide4

Click Back to return to working with the parent element.

 
Top of page

Editing an XML document

You can edit an XML document in either Tree View or Source View. This section describes the editing features you can use:

 
Top of section

About context support

If you have attached a Schema or DTD, you can use the XML Editor's context support. The editor provides context support in both Tree View and Source View to help you edit your XML documents.

Context support in Tree View

In Tree View, right-click at the appropriate location in the document. In the following illustration, a new person is being added to the document, and the XML Editor detects from the Schema that the next valid element is name.

XMLTreeContext1

Once the name has been added, the XML Editor presents the new list of valid elements, according to the Schema.

XMLTreeContext2

Similarly, the editor presents valid attributes when you have an element selected.

XMLTreeContext3

Notice that the editor also provides the choice Other, allowing you to define an entry that does not conform to the Schema. It displays a dialog to fill in:

XMLTreeContext4

Using the Schema Guide   In addition to using the Tree View's context menu to edit your XML document, you can use the Schema Guide for more comprehensive context support. See Using the Schema Guide.

Context support in Source View

In Source View, after you type < (to start an element tag) or a single space within an element (to define an attribute), the editor displays the valid entries (if there are any). You can select the one you want to insert it. For example:

XMLSourceContext1

In the following example, a space is typed in an url element, which displays the valid attribute, href:

XMLSourceContext2

 
Top of section

Adding elements

Procedure To add an element in Tree View:

  1. Select the location where you want to insert the element.

  2. Right-click and select one of the following:

    If valid elements can be inferred from the definition of the document, they will be listed; select the one you want. Alternatively, you can add an element yourself by choosing Other.

Procedure To add an element in Source View:

  1. Position the insertion point where you want to insert the element.

  2. Type <.

    If valid elements can be inferred from the definition of the document, they will be listed; select the one you want. Alternatively, you can add an element yourself by typing it.

 
Top of section

Adding attributes

Procedure To add an attribute in Tree View:

  1. Select the element to contain the new attribute.

  2. Right-click and select Edit>Insert New Attribute.

    If valid attributes can be inferred from the definition of the document, they will be listed; select the one you want. Alternatively, you can add an attribute yourself by choosing Other.

  3. Specify a value for the attribute, as appropriate.

Procedure To add an attribute in Source View:

  1. Position the insertion point inside an element where you want to insert the attribute.

  2. Type a space.

    If valid attributes can be inferred from the definition of the document, they will be listed; select the one you want. Alternatively, you can add an attribute yourself by typing it.

  3. Specify a value for the attribute, as appropriate.

 
Top of section

Adding other nodes

Procedure To add other nodes in Tree View:

  1. Select the location where you want to insert the node.

  2. Right-click and select one of the following from the Edit menu:

    To add this

    Select one of these

    Text

    Insert New Text

    Insert New Text Before

    CDATA

    Insert New CDATA

    Insert New CDATA Before

    Comment

    Insert New Comment

    Insert New Comment Before

    Processing instruction

    Insert New Processing Instruction

    Insert New Processing Instruction Before

    Namespace declaration

    Insert New Namespace Declaration

  3. Specify the details for the node, as appropriate.

Procedure To add other code in Source View:

 
Top of section

Editing nodes

Procedure To copy, move, or delete nodes in Tree View:

In all cases, you will be informed if the edit would result in an invalid document. You can choose whether to continue.

Procedure To copy, move, or delete code in Source View:

Reversing changes   All editing actions can be undone by selecting Edit>Undo (Ctrl+Z) or redone by selecting Edit>Redo (Ctrl+Y).

 
Top of page

Validating an XML document

As you type in Source View, the editor automatically highlights in red any areas of the document that are not well formed. The Tree View creates well-formed documents by design.

You can also manually validate the document (for conformance to a Schema or DTD) and check it for well-formedness.

Procedure To validate an XML document and check for well-formedness:

  1. Open the XML document.

  2. Select XML Editor>Validate.

    NOTE:   This menu item is enabled only if the XML document is attached to a Schema or DTD.

The editor validates the XML document against the attached Schema or DTD. It also checks the XML document for well-formedness.

XMLValidate

Results   The report identifying any validation errors or malformed statements displays in the Output Pane. References to errors are reported as XPaths.

In the example above, the id attribute is reported as missing from the first two person elements. The XPath /personnel/person[1] indicates the first instance of person in the XML document. The XPath /personnel/person[2] indicates the second instance of person.

For more information    For more information about XPaths, see the chapter on working with scoped paths and XPaths in Developing exteNd Director Applications.

TIP:   You can search for specific XPaths in Tree View. See Searching an XML document.

Procedure To check only for well-formedness:

  1. Open the XML document.

  2. Select XML Editor>Well-formedness Check.

 
Top of page

Searching an XML document

You can search your document in either Source View or Tree View.

Procedure To search an XML document:

  1. In either Source View or Tree View, select Edit>Find or press Ctrl+F.

    The Find dialog displays.

  2. In Source View, you can perform standard text searches.

    In Tree View, you can specify one of the following:

    XMLTreeFind

  3. Click OK to search.

    If there is a match, the first is selected and all occurrences are indicated:

  4. To go to the next occurrence, press F3.

 
Top of page

Styling an XML document

You can style an XML document via CSS (Cascading Style Sheets). The exteNd Director development environment provides a CSS Style Manager you can use to attach and edit a style sheet for your XML document.

Procedure To style an XML document:

  1. Open the XML document.

  2. Select XML Editor>CSS Styling.

    The CSS Style Manager displays.

    For more information    For details on attaching and editing style sheets with the CSS Style Manager, see CSS Editor.

 
Top of page

Maintaining the XML catalog

The exteNd Director development environment provides a built-in XML catalog of widely used Schemas and DTDs. For example, the XML catalog includes the Schemas for XSL, WSDL, and XML Schemas; the Sun J2EE DTDs; and the Novell exteNd Application Server deployment plan DTDs.

When you open an XML document that references a Schema or DTD, if the Schema or DTD is in the XML catalog, the editor associates it with the XML document and enables context editing and validation.

Catalog standard   The XML catalog is based on the OASIS XML catalog standard. This standard specifies a format for mapping external identifiers (public and system identifiers) and URI references to other URI references. This makes it possible to map, for example, a URI of a namespace to a local Schema file. The standard specifies that catalogs consist of one or more catalog entry files, each file specifying a set of catalog entries.

For more information    For information on the OASIS standard, see www.oasis-open.org/committees/entity/spec.html.

Catalog directories   The built-in XML catalog consists of three directories in the Novell exteNd Common\Resources directory:

Catalog entry files   There are four built-in catalog entry files:

The two DTD-related catalog entry files both point to DTD files in the DTDCatalog directory (that is, their base directory is ../DTDCatalog). Similarly, the two Schema-related catalog entry files both point to Schemas in the SchemaCatalog directory (so their base directory is ../SchemaCatalog).

An example   Say you are working with the personal.xsd document that contains this declaration:

  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Because the built-in catalog entry file schemacatalog.xml lists this URI and maps it to XMLSchema.xsd in the SchemaCatalog directory, when you open personal.xsd the editor locates its Schema in the local catalog without having to go out to the Internet for it.

 
Top of section

Adding to the catalog

You might have Schemas and/or DTDs that you want to add to the XML catalog so they can be located when you open XML documents that use them. You can add Schemas and DTDs using the existing catalog structure or by extending the structure.

Maintaining the existing structure

The easiest way to add entries to the XML catalog is by using the existing catalog directory structure.

Procedure To add to the XML catalog by using the existing structure:

  1. Add the .DTD or .XSD file to the DTDCatalog directory or SchemaCatalog directory.

  2. Open the corresponding user-editable catalog entry file in the CatalogFiles directory.

  3. Add the catalog entries to the file.

    You edit catalog entry files with the XML Catalog Editor, as described in Using the XML Catalog Editor.

Extending the catalog structure

You can also add entries to the XML catalog by extending the directory structure—that is, by creating additional directories of Schemas and DTDs and additional catalog entry files.

Procedure To add to the XML catalog by extending the directory structure:

  1. Add the .DTD and/or .XSD files you want in the catalog to directories on your file system. You can organize the DTDs and Schemas any way you want, but you will need to create a catalog entry file for each directory containing DTDs or Schemas.

  2. Create catalog entry files for each of the directories by using the XML Catalog File Wizard:

    1. Select File>New>File.

    2. On the XML tab, select XML Catalog file (in the Advanced section) and click OK.

      The XML Catalog File Wizard displays.

    3. Specify the name of the catalog entry file.

    4. Specify its location. In order to have exteNd Director read the catalog entry file, locate this file in the CatalogFiles directory.

    5. Specify the base URI—that is, the path to the directory containing the DTD or Schema files. It is through this base URI that exteNd Director is able to find the DTDs or Schemas listed in the catalog entry file.

    6. Click Finish.

      The catalog entry file is opened in the XML Catalog Editor.

    7. Add entries as described in Using the XML Catalog Editor below.

 
Top of section

Using the XML Catalog Editor

When you open a catalog entry file, it displays in the XML Catalog Editor. The XML Catalog Editor has three views:

XMLCatalogView

The Catalog View has one or more tabs:

Procedure To add a catalog entry:

You can also edit and remove entries from the catalog entry file.

CAUTION:    Don't delete preexisting DTDs or Schemas from the catalog; the exteNd Director development environment may require them.

Procedure To edit an entry:

Procedure To delete an entry:

 
Top of page

Keyboard shortcuts

Here are the keyboard shortcuts provided in the XML editors.

 
Top of section

In Tree View

Navigation and display

Keys

Description

Ctrl+A

Expands all

Ctrl+Shift+A

Collapses all

Ctrl+E

Expands element group

Ctrl+Shift+E

Collapses element group

Up Arrow

Navigates to previous visible node

Down Arrow

Navigates to next visible node

Left Arrow

Collapses element group

Right Arrow

Expands element group

Alt+Up Arrow

Navigates to previous sibling (element within an element group)

Alt+Down Arrow

Navigates to next sibling

Alt+Left Arrow

Navigates to parent

Alt+Right Arrow

Navigates to first child

Ctrl+Shift+G

Displays the Schema Guide for the selected element

Searching for text

Keys

Description

Ctrl+F

Shows Find dialog

F3

Navigates to next search result

Alt+Shift+H

Toggles display of search result icon

Ctrl+Alt+Shift+H

Clears the search

Editing text

Keys

Description

Ctrl+X

(Cut) Cuts the current selection to the clipboard

Ctrl+C

(Copy) Copies the current selection to the clipboard

Ctrl+V

(Paste) Pastes the contents of the clipboard at the insertion point

Ctrl+Shift+V

Pastes the contents of the clipboard as the last child of the selected element

Delete

(Delete) Deletes the current selection

F5

Refreshes and collapses the tree

Ctrl+Z

Reverses editor actions (except save)

Ctrl+Y

Reverses Undo actions

Ctrl+L

Inserts new element as last child

Ctrl+D

Inserts new CDATA as last child

Ctrl+Shift+L

Inserts new element before selected node

Ctrl+Shift+D

Inserts new CDATA before selected node

Ctrl+K

Inserts new attribute

Ctrl+M

Inserts new namespace declaration

 
Top of section

In Source View

Moving the insertion point

Keys

Description

Left Arrow, Right Arrow

Moves the insertion point one character to the left or right

Ctrl+Right Arrow

Moves the insertion point one word to the right

Ctrl+Left Arrow

Moves the insertion point one word to the left

Home

Moves the insertion point to the beginning of the line

End

Moves the insertion point to the end of the line

Up Arrow

Moves the insertion point one line up

Down Arrow

Moves the insertion point one line down

Alt+Shift+T

Moves the insertion point to the top of the window

Alt+Shift+M

Moves the insertion point to the middle of the window

Alt+Shift+B

Moves the insertion point to the bottom of the window

Ctrl+Home

Moves the insertion point to the beginning of the document

Ctrl+End

Moves the insertion point to the end of the document

PgUp

Moves the insertion point one page up

PgDn

Moves the insertion point one page down

Alt+Shift+F8

Moves the insertion point to matching begin/end tag

Alt+Up Arrow

Moves the insertion point to previous sibling (element within an element group)

Alt+Down Arrow

Moves the insertion point to next sibling

Alt+Right Arrow

Moves the insertion point to first child

Alt+Left Arrow

Moves the insertion point to parent

Ctrl+G

Displays Go to Line dialog

Ctrl+L

Toggles display of line numbers

Selecting text

Keys

Description

Ctrl+A

Selects all text in the document

Shift+Right Arrow

Selects the character to the right of the insertion point

Shift+Left Arrow

Selects the character to the left of the insertion point

Alt+J

Selects the word the insertion point is on, or deselects any selected text

Ctrl+Shift+Right Arrow

Selects the word to the right

Ctrl+Shift+Left Arrow

Selects the word to the left

Shift+Home

Selects text to the beginning of the line

Shift+End

Selects text to the end of the line

Shift+Up Arrow

Selects text to the previous line

Shift+Down Arrow

Selects text to the next line

Ctrl+Shift+Home

Selects text to the beginning of the document

Ctrl+Shift+End

Selects text to the end of the document

Shift+PgUp

Selects text one page up

Shift+PgDn

Selects text one page down

Scrolling text

Keys

Description

Alt+U T

Scrolls line containing insertion point to top of window

TIP:   Press and release Alt+U, then press T

Alt+U M

Scrolls line containing insertion point to middle of window

TIP:   Press and release Alt+U, then press M

Alt+U B

Scrolls line containing insertion point to bottom of window

TIP:   Press and release Alt+U, then press B

Ctrl+Up Arrow

Scrolls the window up without moving the insertion point

Ctrl+Down Arrow

Scrolls the window down without moving the insertion point

Modifying text

Keys

Description

Insert

Switches between insert text and overwrite text modes

Alt+U U

Makes the selected characters or the character to the right of the insertion point uppercase

TIP:   Press and release Alt+U, then press U

Alt+U L

Makes the selected characters or the character to the right of the insertion point lowercase

TIP:   Press and release Alt+U, then press L

Alt+U R

Reverses the case of the selected characters or the character to the right of the insertion point

TIP:   Press and release Alt+U, then press R

F11

Reformats the tag the insertion point is on

Shift+F11

Reformats the entire document

Cutting, copying, pasting, and deleting text

Keys

Description

Ctrl+Z

(Undo) Reverses (one at a time) a series of editor actions, except Save

Ctrl+Y

(Redo) Reverses (one at a time) a series of Undo commands

Ctrl+X

(Cut) Cuts the current selection and places it on the clipboard

Ctrl+C

(Copy) Copies the current selection to the clipboard

Ctrl+V

(Paste) Pastes the contents of the clipboard at the insertion point

Delete

(Delete) Deletes the current selection

Ctrl+E

Deletes the current line

Ctrl+H

Deletes the character preceding the insertion point

Ctrl+Shift+Backspace

Deletes text in the following sequence:

  1. Text preceding insertion point on same line

  2. Indentation on same line

  3. Line break

  4. Text on previous line

Ctrl+W

Deletes the current word or the word preceding the insertion point

Searching for text

Keys

Description

Ctrl+F3

Searches for the word the insertion point is in and highlights all occurrences of that word

F3

Moves the insertion point to the next occurrence of the found word

Shift+F3

Moves the insertion point to the previous occurrence of the found word

Alt+Shift+H

Toggles highlighting of words

Ctrl+F

Displays Find dialog

Ctrl+R

Displays Replace dialog

Changing indentation

Keys

Description

Tab

Shifts all text to right of insertion point to the right

Ctrl+T

Shifts text in line containing the insertion point to the right

Ctrl+D

Shifts text in line containing the insertion point to the left

Bookmarks

Keys

Description

Ctrl+F2

Sets or unsets a bookmark at current line

F2

Goes to next bookmark

 
Top of section

In Catalog View (XML Catalog Editor)

Modifying text

Keys

Description

Ctrl+B

Displays dialog for changing the base URI (the path to the directory containing the DTD or Schema files for the catalog entry file)




Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...