As with most editing applications, <oXygen/> lets you open existing documents, save your changes and close them as required.
The <oXygen/> plugin installs a series of Eclipse wizards for easy creation of new documents. Using these wizards you let <oXygen/> fill in details like the system ID or schema location of a new XML document, the minimal markup of a Docbook article or the namespace declarations of a Relax NG schema.
Procedure 4.1. Creating new documents
Select Ctrl+N) or press the toolbar button. The New wizard is displayed which contains the supported Document Types: XML, XSL, XML Schema, Document Type Definition, Relax NG Schema, XQuery, Web Services Definition Language, Schematron Schema, CSS File .
→ → (Select a document type, then click For example if XML was selected the "Create an XML Document" wizard is started.
Type a name for the new document and press Next.
The Create an XML Document dialog enables definition of a XML Document Prolog using the system identifier of a XML Schema, DTD, Relax NG (full or compact syntax) schema or NRL (Namespace Routing Language) schema. As not all XML documents are required to have a Prolog, you may choose to skip this step by clicking
. If the prolog is required complete the fields as the following.Complete the dialog as follows:
When checked enables selection between DTD, XML Schema, Relax NG schema or NRL schema.
Specifies the location of an XML Schema Document (XSD).
Populated from the elements defined in the specified XSD, enables selection of the element to be used as document root.
Specifies the document namespace.
Specifies the prefix for the namespace of the document root.
Complete the dialog as follows:
When checked enables selection between DTD, XML Schema, Relax NG schema or NRL schema.
Specifies the location of a Document Type Definition (DTD).
Populated from the elements defined in the specified DTD, enables selection of the element to be used as document root.
Specifies the PUBLIC identifier declared in the Prolog.
Complete the dialog as follows:
When checked enables selection between DTD, XML Schema, Relax NG schema or NRL schema.
Specifies the location of a Relax NG schema in XML or compact syntax (RNG/RNC).
When checked the specified URL refers to a Relax NG schema in XML syntax. It will be checked automatically if the user selects a document with the .rng extension.
When checked the specified URL refers to a Relax NG schema in compact syntax. It will be checked automatically if the user selects a document with the .rnc extension.
Populated from the elements defined in the specified RNG or RNC document, enables selection of the element to be used as document root.
Complete the dialog as follows:
When checked enables selection between DTD, XML Schema, Relax NG schema or NRL schema.
Specifies the location of a NRL schema (NRL).
Templates are documents containing a predefined structure. They provide starting points on which one can rapidly build new documents that repeat the same basic characteristics. <oXygen/> installs a rich set of templates for a number of XML applications. You may also create your own templates and share them with other users.
The New from Templates wizard enables you to select predefined templates or templates that have already been created in previous sessions or by other users. Open a template using the following options:
Open a template using the following options:
Populates the Templates list to show templates supplied with the <oXygen/> installation package.
Populates the Templates list to show previous saved personal templates.
Enables definition of a URL location containing Templates.
Displays the available templates for Standard, From File and From URL options.
Procedure 4.2. Creating Documents based on Standard Templates
Select
→ → The New from templates wizard is displayed.Type a name for the new document and press Next.
Select the Standard option from the Load Templates Group. The Templates list displays standard <oXygen/> templates.
Scroll the Templates list and select the required Template Type.
Click
A new document is opened that already contains structure and content provided in the template starting point.Procedure 4.3. Creating Documents based on Personal Template Files
Select
→ → The New from templates wizard is displayed.Type a name for the new document and press Next.
Select the User defined option from the Load Templates Group. The Templates list displays person templates.
Scroll the Templates list and select the required Template Type.
Click
A new document is opened that already contains structure and content provided in the template starting point.Procedure 4.4. Creating Documents based on URL Template Files
Select
→ → The New from templates wizard is displayed.Type a name for the new document and press Next.
Select the From URL option from the Load Templates Group. The From URL field is enabled.
Enter the URL location of the templates, then click
. The list of templates is retrieved from the URL and displayed in the Templates list.Scroll the Templates list and select the required Template Type.
Click
A new document is opened that already contains structure and content provided in the template starting point.The edited document can be saved with one of the actions:
Ctrl+S) to save the current document.
→ (→ : Displays the Save As dialog, used to name and save an open document to a file; or save an existing file with a new name.
Save As dialog.
→ : Saves all open documents. If any document does not have a file, displays theTo close documents use one of the following methods:
Ctrl+F4) : Closes only the selected tab. All other tab instances remain.
→ (Ctrl+Shift+F4): Closes all opened documents. If a document is modified or has no file, a prompt to save, not to save, or cancel the save operation is displayed.
→ (- accessed by right-clicking on an editor tab: Closes the selected editor.
- accessed by right-clicking on an editor tab: Closes the other files except the selected tab.
- accessed by right-clicking on an editor tab: Closes all open editors within the panel.
<oXygen/> enables user defined templates to be created. Templates are created by adding an existing document to the Template library.
Procedure 4.5. Creating New Templates
Open the document that will be used to create the Template.
Modify the structure and content as required.
Ctrl+Shift+A) or press the toolbar button to display the Add templates dialog used to define the name by which the current document content will be recognized in the New from templates option.
→ (Enter the name by which the template will be known. Click
the document is added to the list of Personal Templates.Test the template using the From File option.
<oXygen/> stores Personal Templates in an XML file called
Application Data\com.oxygenxml\templates.xml
on
Windows / .com.oxygenxml\templates.xml
on Linux,
located in the Home folder of the <oXygen/> user. By copying
this file to a Web Server folder and making it accessible via
HTTP, other <oXygen/> users can use the
From URL option to access the templates.
In the Properties view you can quickly access information about the current edited document like the character encoding, full path on the file system, schema used for content completion and document validation, associated transformation scenario, document's total number of characters, line width, if indent with tabs is enabled and the indent size. The view can be accessed by going to oXygen+Editor properties
+ → +