XML Editing with Oxygen. Getting started, tips and tricks

Similar documents
SiteBuilder 2.1 Manual

NDSU Technology Learning & Media Center. Introduction to Google Sites

1. Click the File tab 2. Click "Options" 3. Click "Save" 4. In the line labeled "Default file location", browse to the desired folder 5.

CheckBook Pro 2 Help

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Lou Burnard Consulting

Making a Web Page with Microsoft Publisher 2003

Create Mailing Labels from an Electronic File

Using JCPS Online for Websites

First Time Off-Campus Remote Desktop Connection ipad Edition

First Time On-Campus Remote Desktop Connection ipad Edition

Stores copies of items you sent to others, by default. Stores items created offline that you want to send the next time you are online

USER GUIDE. Unit 2: Synergy. Chapter 2: Using Schoolwires Synergy

How To Write A Cq5 Authoring Manual On An Ubuntu Cq (Windows) (Windows 5) (Mac) (Apple) (Amd) (Powerbook) (Html) (Web) (Font

Introduction to Windows 7 by Jeanette

Using Mail Merge to Create Form Letters and Labels

WYSIWYG Tips and FAQ

darlingharbour.com Content Management System Tenant User Guide

How to Build a Form in InDesign CS5

Windows XP Pro: Basics 1

High Impact & Alpha Five: A Mail Merge Guide.

Before you can use the Duke Ambient environment to start working on your projects or

QUICK START GUIDE

HOW TO USE THIS GUIDE

Google Apps for Education: The Basics

Managing Contacts in Outlook

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

General Outlook Tips Last Name first or last name

How To Insert Hyperlinks In Powerpoint Powerpoint

Creating tables of contents and figures in Word 2013

Blackboard IM for Virtual Office Hours and Collaborative Group Work

EndNote Cite While You Write FAQs

Creating a table of contents quickly in Word

Microsoft Expression Web Quickstart Guide

Microsoft Dynamics CRM Clients

WINDOWS LIVE MAIL FEATURES

ZIMBRA LAYOUT. Keyboard Shortcuts Hitting G and the beginning letter of any of the tabs will instantly take you to that tab

Introduction. Inserting Hyperlinks. PowerPoint 2010 Hyperlinks and Action Buttons. About Hyperlinks. Page 1

Introduction to MS WINDOWS XP

A Web Tour also can be opened up in an external browser: this is called a Web Push. (See Web Push below.)

Making a Website with Hoolahoop

AppShore Premium Edition Campaigns How to Guide. Release 2.1

Rochester Institute of Technology. Finance and Administration. Drupal 7 Training Documentation

GETTING STARTED WITH COVALENT BROWSER

Windows, Menus, and Universal Document Shortcuts

Most of your tasks in Windows XP will involve working with information

Form Builder Manual. A brief overview of your website s Form Builder with screenshots.

Adobe Dreamweaver CC 14 Tutorial

MICROSOFT ACCESS 2007 BOOK 2

Acclipse Document Manager

Lab: Data Backup and Recovery in Windows XP

Computer Basics: Tackling the mouse, keyboard, and using Windows

MAIL MERGE AND RELATED OPERATIONS Form letters and mailing labels

Copyright EPiServer AB

Microsoft Office Access 2007 Training

Developing with Android Studio

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Code::Blocks Student Manual

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Wimba Pronto. Version 3.1. User Guide

Data Crow Creating Reports

Chapter 7: Historical and manual data entry

2. Click the download button for your operating system (Windows, Mac, or Linux).

Build a New Website Using the UB Content Management System (UBCMS)

Getting Started using the SQuirreL SQL Client

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Intellect Platform - Tables and Templates Basic Document Management System - A101

OWA User Guide. Table of Contents

Transitioning from TurningPoint 5 to TurningPoint Cloud - NO LMS 1

Section 1: Ribbon Customization

Generating Open For Business Reports with the BIRT RCP Designer

Microsoft Excel Tips & Tricks

Lightworks v12. Quick Start Guide

tools that make every developer a quality expert

Excel 2007 Basic knowledge

TIPS & TRICKS JOHN STEVENSON

1. Online help for WorkZone Client What's new Getting started with WorkZone Client Working with the user interface 15

Content Author's Reference and Cookbook

Lab - Data Backup and Recovery in Windows XP

Word 2010: The Basics Table of Contents THE WORD 2010 WINDOW... 2 SET UP A DOCUMENT... 3 INTRODUCING BACKSTAGE... 3 CREATE A NEW DOCUMENT...

6. If you want to enter specific formats, click the Format Tab to auto format the information that is entered into the field.

Dreamweaver CS6 Basics

Handout: Word 2010 Tips and Shortcuts

How to Create a Newsletter Using Common Sense Software - Custom Design

IT Quick Reference Guides Using Windows 7

Building and Using Web Services With JDeveloper 11g

MindGenius SharePoint Integration

Appointments: Calendar Window

Building a Personal Website (Adapted from the Building a Town Website Student Guide 2003 Macromedia, Inc.)

CHROMEBOOK TIPS & TRICKS

STUDENT ACTIVITY _KEY: CONFIGURING CONTROL PANEL OPTIONS AND DESKTOP SETTINGS

collab.virginia.edu UVACOLLAB ECLPS: BUILDING COURSE PORTALS UVaCollab User Guide Series

Web Ambassador Training on the CMS

Creating XML Report Web Services

Data Tool Platform SQL Development Tools

How To Use Query Console

Transcription:

XML Editing with Oxygen Getting started, tips and tricks Oxygen is the industry-standard application for XML editing. There are other XML editors available (http://www.xml.com/pub/pt/3 currently lists 149 of them), but these are some good reasons for using Oxygen: It's cross-platform (Windows, Mac and Linux) It's mature It has built-in support for TEI Its developers are involved in the TEI community It's more fully-featured than any other editor Virtually all digital humanists use it Many labs in UVic have it installed It's cheap if you have to buy it Setting up a project in Oxygen Even the simplest XML project consists of more than one file; at the very least, you'll have an XML file and a schema to validate it against. It makes sense to keep your files in one place, and to be able to browse them easily from inside Oxygen. This is done by setting up a project. First, you'll need to organize your files. Put all your files in one location. Make sure they're all named correctly. NO SPACES! NO PUNCTUATION! When you first start Oxygen, it opens with a default sample project. You need to create your own project file, pointing at your own project materials. Let's imagine you have a project called Victorian Poems and your files are all in a folder called vicpoems. Right-click on sample.xpr and choose New / Project...

Navigate to your vicpoems folder; that's where we're going to create the project file. Call the file vicpoems.xpr. Now you have a project. But there's nothing in it; we need to add the project folder itself, so that we can see all the files. Right-click on the project file and choose Add Folder... Choose your project folder (in this case, vicpoems). You should see your project folder as a tree that you can expand to see all the files in it. Now you can open a file by double-clicking it in the project panel. Oxygen will remember your project and reload it next time you start the program; it will also reload any files you had open the last time you were working.

The Oxygen Layout The Oxygen program is based on the programming IDE Eclipse. This means it's highly configurable; you can easily change the layout to suit your working methods and preferences. It also means it's very complicated and full of features and panels whose purpose is not obvious. This is a quick tour of the panels we think are most important and useful. If you have a big screen, you can use the default Oxygen layout, which looks like this: We've already looked at the Project panel. Below it is the Outline panel, which shows the file that you're currently editing as a tree, expanding downwards and to the right, like a traditional file manager. In the middle is the editing area. This screenshot shows one file open, but you can have multiple files open at the same time. On the right, you'll see the Attributes and Elements panels. Like the Outline panel, these are dynamic; they will change as you move your cursor from one place to another in the document. The Attributes panel will always show you the list of attributes which is available for the element where your cursor is

currently located. Similarly, the Elements panel shows the list of elements which is allowed in the current cursor position. Note that this only works when your XML file is linked to a working schema. The Attributes and Elements panels have a very handy feature: if you put your mouse over an item in the list, you'll see the definition of that item from the TEI schema: If you're working on a smaller screen, the default layout for Oxygen can be too much; you end up with not enough space for actually editing your files. If that's the case, you can close all the panels on the right to get more space: Any panel you've closed can be re-opened by clicking on Window / Show View.

Even without the element and attribute panels, you can still see information about elements and attributes while you're editing. If you type an open bracket in your document, Oxygen knows you're starting to type an element, so it will show you a list of all the elements available at that position: Similarly, if you put your cursor inside an opening tag, after the end of the element name, and type a space, Oxygen will give you information about all the attributes available: Creating a new TEI file There are two ways to create a new TEI file: you can use your own project schema, or you can use one of the existing TEI schemas built into Oxygen. If you have your own schema: 1. Click on File / New 2. Choose New Document / XML Document 3. Click on Customize 4. In the Schema URL box, navigate to the location of your schema 5. Click on Create This will give you a brand-new TEI file, linked to your schema. It will probably also have some content, although probably not enough to create a valid file. If you want to use one of the built-in schemas: 1. Click on File / New

2. Click on Framework templates / TEI P5 and choose a template (e.g. All [TEI P5]) 3. Click on Create Again, this will give you a basic TEI file linked to the appropriate schema. Validating your file You should validate your file often. Whenever you happen to stop typing, in fact. To validate your file, click on this little button: or Document / Validate / Validate. You should see something reassuring like this at the bottom of the window: If you see this instead: STOP EDITING IMMEDIATELY. If you carry on working, you will compound errors to the point where it can be very difficult to recover from them. When validation fails, you will see a report in a new panel at the bottom of Oxygen, which explains the problems. The report may or may not be helpful. For instance, you may see something like this: E [Jing] element hed not allowed anywhere; expected element ab, addspan,... Jing is the name of one of the programs Oxygen uses to validate XML. In this case, it's telling you that you've inserted an element <hed>, but the schema quite rightly says that no such element exists. Clearly it's a typo; you probably meant <head>. Double-click on the error report to go directly to the error in your XML file. You'll see something with a squiggly red line under it. This is most likely where you need to make your fix. Sometimes it's not so easy to figure out the problem. Here are some strategies you can try which might help: Check that the file is well-formed (Document / Validate / Check Well-Formedness). Sometimes it's not just that you've typed bad TEI; you might have typed something that isn't even correct XML. Try undoing recent changes. Oxygen's Undo history is typically set to remember the last 200 changes, so you can go back quite a long way till you find the problem. Try cutting out whole sections of the file and stashing them in a separate temporary document until you find which area has the problem.

Above all, don't start editing again until you have a valid document. Useful keyboard shortcuts Oxygen has dozens of keyboard shortcuts, under Options / Menu Shortcut Keys. These are some of the most useful ones: Select some text, and press Control + e. You'll be able to choose an element to put around the text. Put your cursor in an element, and press Control + Alt + x. The tag will disappear, leaving its contents. Put your cursor in an element, and press Control + Shift + [comma]. The tag will be commented out. Press the same thing again, and the comment will disappear. Press Control + Shift + V to validate your file. Press Control + Shift + W to check well-formedness. Press Control + Shift + Y to toggle Line Wrap. Mostly, when editing TEI documents, we want to have line wrap turned on, but it's off by default in Oxygen. There are lots of things that you can set up a keyboard shortcut for. Here's an example: Go to Options / Menu Shortcut Keys. Type maximize. You should see Maximize/Restore Editor Area. Click on the description, and then on Edit. Type the F11 key, and press OK. Now hit F11 a couple of times while you're editing. It hides then restores all the surrounding panels. This can be very handy if you're editing a large document on a small screen. Other useful features Oxygen has a very rich feature set, but here are a couple of features you'll find useful in most projects: Find All. Hit Find / Find Replace (or Control + f) to see the find box. Try Find All. You'll get a list of hits in the window at the bottom. Clicking on each hit will take you to it in the document. Tip: If you're using this to make changes, then make your changes from the bottom up. If you make changes from the top of the document, the other hits will no longer point at the right location in the document, because the offsets have changed. Find / Replace in Files. Right-click on a folder in your Project panel, and click on Find / Replace in Files. You'll be able to search the entire folder, and get back a list of results just like Find All, but grouped into files. Double-click on a hit to open the file and jump to the hit location. The XPath box. In the top left, near the File menu, is a text box labelled XPath 2.0. Type //p in this box and press Return to find all the <p> tags, or //@type to find all the type attributes.