XML Blog

Thursday, June 26, 2014

Webinar: New in oXygen XML Editor 16 - XSLT Quick Fixes

Share to Facebook Share to Twitter Email This Share on Google Plus Share on Tumblr
This webinar presents the XSLT Quick Fixes functionality in detail and then go through some of the other important new features in the new oXygen release including:

  • new XSLT refactoring actions
  • support for developing XSLT stylesheets for Saxon CE
  • XPath execution over multiple files
  • the new Ant editor
  • and more.





Tuesday, June 10, 2014

How To Disable Caching In WebHelp Pages Created By Oxygen Application

Share to Facebook Share to Twitter Email This Share on Google Plus Share on Tumblr
Sometimes a set of WebHelp pages needs to be updated often on a company website, either an intranet site with important information shared between different departments of the same company, or a publicly exposed website. The need to always deliver the latest version to the intended audience arises in such cases, with the immediate consequence that the latest version of a WebHelp page should always be requested from the server upon re-loading that page in a Web browser on the client side, rather than re-using an outdated version cached in the browser.

This no-cache policy is implemented in a WebHelp page with the addition of the following two HTML META directives:

  <meta http-equiv="Pragma" content="no-cache" />
  <meta http-equiv="Expires" content="-1" />


These directives must be added in the file:


OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\createMainFiles.xsl


in the template with the attribute name="create-toc-common-file", in the <head> element, for example:


  <html>
    <head>
      <xsl:if test="$withFrames">
          <base target="contentwin"/>
      </xsl:if>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      
      <!-- Disable caching of WebHelp pages in web browser. -->
      <meta http-equiv="Pragma" content="no-cache" />
      <meta http-equiv="Expires" content="-1" />
      .  .  .


After this modification in the createMainFiles.xsl file, repeating the WebHelp transformation in Oxygen will add the two META directives to the generated WebHelp pages.

Tuesday, June 03, 2014

Create a Custom Skin for Oxygen WebHelp Pages with the WebHelp Skin Builder

Share to Facebook Share to Twitter Email This Share on Google Plus Share on Tumblr
One of the new features of Oxygen 16.0 is the option of setting a skin for the WebHelp pages created by the DITA WebHelp transformation or the DocBook WebHelp transformation, in the form of a CSS stylesheet that modifies the default look of all WebHelp pages in a consistent way.

You can choose one of the six predefined skins available on the Skins tab of the DITA WebHelp transformation:

The Skins tab in the Oxygen WebHelp transformation

or you can build your own custom CSS skin visually on the Oxygen website: 

The Skin Builder in action on the Oxygen website


The WebHelp Skin Builder is a small Web app that allows you to configure many CSS properties of a large palette of elements in the header area, the content area or the Table of Contents area of a WebHelp page, like: background color, border, margin, font properties, text properties, adding a logo image in the header area, etc. The properties are grouped by type of component of a WebHelp page like: title, paragraph, list, figure, table, etc.

Once created with the WebHelp Skin Builder and set in the Oxygen WebHelp transformation as a custom CSS skin, it can really give a professional look to a set of WebHelp pages published on your company website, which has the potential to impress your users. Give it a try and let me know what you think!

Tuesday, May 27, 2014

Hidden features in Oxygen (that you likely don't know about)

I made a list with a couple of hidden features that I find useful when working with Oxygen. If you have other suggestions, features that you use very often, we will be happy if you share them with us.
  1. Quick find toolbar
    A reduced version of the Find / Replace dialog is available as a toolbar, displayed at the bottom of the Oxygen window. Press Alt + Shift + F to display it, and ESC to close it and give the focus in editor.

  2. Wrap/unwrap selected text in an element
    To wrap some text in an element use Surround with Tags(Ctrl+E) action. To unwrap just delete the start tag or the end tag, or use the Delete Element Tags(Alt+Shift+X) action.

  3. Context Sensitive Help/Dynamic Help View
    Dynamic Help view is a help window that changes its content to display the help section referring to the currently selected view from Oxygen.

    Also the help system is context sensitive: press F1 in any dialog to quickly access the relevant help section of the User Manual.










  4. Ctrl+Click Navigation
    By holding down Ctrl (CMD on Mac) in the Text editing mode some components become links that you can follow to get to the definition of those components. For example, in an XML document, an element name becomes a link to that element definition in the associated schema or DTD. In an XSL stylesheet, a variable reference becomes a link to that variable definition, and so on.

  5. Component dependencies
    The Component Dependencies view presents a tree of component dependencies starting with a specified component. Allows you to spot the dependencies for the selected component of an XSLT stylesheet, an XML Schema, a Relax NG schema, or a NVDL schema.
    For example you can quickly see from where an XSLT variable is called, and if called from other variables, functions or named templates, you can expand further to see where they are called from.




  6. Learn structure
    When working with documents that do not specify a schema, or for which the schema is not known or does not exist, Oxygen is able to learn and translate the document structure to a DTD.

  7. Modify all matches
    Allows you to easily modify the occurrences of the text found through executing a find operation or an XPath expression. When you use this action, a thin rectangle replaces the highlights and lets you start editing.

  8. Layout specific for each project
    If you work on multiple projects or multiple XML vocabularies, you can choose to keep a separate layout for each project. Thus when you move between projects you get not only the last opened files specific to that project restored but also the exact layout of views, editors and toolbars.. Enable Options->Preferences-> Perspectives Layout, the "Remember layout changes for each project" option and then Oxygen will remember the exact layout for each project.

  9. Memory status
    Enable "Show memory status" option to view the memory Oxygen XML Editor uses. To free memory, click the Run Garbage Collector button located in the bottom right corner of the screen. The memory status bar has a light blue background which turns yellow or red when Oxygen XML Editor uses too much memory.

  10. Show/Hide Element Names in Outline View
    You are able to control the visibility of the element names in the Outline View. Hiding element names allows you to focus more on the document content.

  11. XML Master Files support
    Oxygen helps you edit XML modules referred using XInclude or External Entities. By setting the XML Master File, Oxygen provides a context to solve issues like module validation, editing using the content completion assistant, ID referencing or XML module connection overview (understanding how modules are connected with each other).

Thursday, May 08, 2014

Oxygen Authoring Tips and Tricks

Share to Facebook Share to Twitter Email This Share on Google Plus Share on Tumblr
When I started writing on the Oxygen XML Blog, back in 2013 I wanted to have my first blog post about Oxygen Tips and Tricks but I somehow never got around to it. Now the time has come.
These are a few of the minor (and sometimes hidden) features which might bring significant usability features when editing in the visual Author editing mode:
  1. [General Editing]: Triple click to select. Triple click the text content of a certain XML element to select the entire element. Afterwards you can easily cut/copy or move it.
  2. [General Editing]: Move up and down to re-arrange content. Use the [Alt-UP] and [Alt-Down] keyboard shortcuts to move paragraphs, list items or any other kind of block like elements up or down in the parent container.
  3. [General Editing]: Code Templates. In the Oxygen Preferences->Editor / Templates / Code Templates page you can define code templates for inserting small and often used pieces of XML inside the XML document (either in the Text or in the Author editing modes). A code template can have inside it a wide selection of editor variables among which the special ${caret} and ${selection} editor variables which allow you to define where the caret will be placed after the template is inserted and how the existing selection will be placed in the newly inserted XML fragment.
  4. [General Editing]: Symbols toolbar. Go to the Window menu->Configure Toolbars... and show the Symbols toolbar in order to define and easily insert a set of most used character symbols.
  5. [General Editing]: Middle mouse button click to close editor tab. Click using the middle mouse button on an opened editor's tab to close it.
  6. [General Editing]: Edit Attributes in-place. Use ALT-ENTER to show the in-place attributes editing dialog and avoid using the Attributes view to modify or add/remove a new attribute.
  7. [DITA/Docbook/TEI/XHTML]: Copy/paste resources to create links. Copy a resource (XML file, binary/image file) in the Project view or in the DITA Maps Manager view or in the operating system's file system browser (Windows Explorer on Windows or Finder on Mac OSX) and then paste it in an XML document opened in the Author visual editing mode in Oxygen. A proper link (or image reference if it is the case) to that resource will be inserted. The same functionality applies to drag and drop.
  8. [DITA/Docbook/TEI/XHTML]: Convert content on paste (Smart paste). Paste content from an office application (MS Office, Libre or Open Office), a web browser or from a spreadsheet (Excel, Calc) and then paste it inside an XML document opened in Oxygen in the Author visual editing mode. The content will be converted to the proper target XML vocabulary and inserted inside.
  9. [DITA]: Paste as link/keyref or as content (key) reference. Assign an ID to an XML element from a DITA topic. Select and copy that element. Then open the referencing topic, right click inside and look in the Paste special menu.
  10. [DITA]: Use Subject Scheme Maps to control attribute values. You can control profiling attributes (and any other kind of attribute) values by associating a Subject Scheme Map to the DITA Map you are editing. More details... Video demonstration...
Off the top of my head, these are the tips I can up with so far. Do you have any other features that you've discovered and use daily when editing with Oxygen?

Wednesday, April 16, 2014

How to set a favicon in Webhelp pages

Share to Facebook Share to Twitter Email This Share on Google Plus Share on Tumblr
Small additions or customizations are frequently needed or desirable in the WebHelp pages generated by the DITA Map WebHelp transformation in Oxygen. This need will prompt a serial of blog posts with specific WebHelp customizations and the required source code modifications.

In the first installment let's see how we can add one of those small but significant details which lend a mark of distinction and help to increase the consistency with the overall website design theme: setting a favicon.  [ BTW the upcoming version of Oxygen will introduce a set of built-in WebHelp skins (design themes) and also a small WebHelp Skin Builder web app for visually building your own WebHelp skin/theme. Sounds like an interesting topic for a future blog post! ]

The recent versions of all the mainstream browsers (by that I mean the Web browsers with more than 3% Web usage share) will know how to interpret the following link XHTML elements:


<link rel="icon" href="/favicon.ico" type="image/x-icon"/>

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>



The href attribute obviously must point to the favicon file available on the server which hosts the Webhelp pages.

These two elements must be inserted in the file:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\com.oxygenxml.webhelp\xsl\createMainFiles.xsl
in the template with the attribute name="create-toc-common-file", in the head element, after title:


<title> 
    <xsl:value-of select="$title"/>
</title>

<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>


That's it! Repeating the WebHelp transformation will add the favicon to the title of the browser tab.

It would be nice to have a customization mechanism for separating the built-in WebHelp files and the custom code files, but that is an enhancement for a future version of Oxygen.

Wednesday, March 05, 2014

What's your greatest wish for Oxygen XML Author 16.0?

Share to Facebook Share to Twitter Email This Share on Google Plus Share on Tumblr
Oxygen 16.0 is planned to be released in a couple of months and we already have quite an impressive array of new features which we plan to make available in it.
Here's some of the stuff we are working on right now:
  1. Editing properties of multiple selected table columns, rows and cells will be a snap using the Table Properties action.
    You will be able to easily select table cells either by pressing CTRL and clicking them or by selecting cell content which spans multiple cells.
  2. You will be able to highlight with custom colors and styles elements which have certain profiling attributes with certain values set on them.
  3. The Oxygen Eclipse Plugin distribution will be updated to have a validation stripe showing all errors found in the visual Author editing mode. The Author visual editing mode will also have a validation status which will show the error closest to the caret position.
  4. We added API which allows you to programatically import an XML options file in the started application. Used with a plugin deployed as an add-on this API allows you to distribute a fixed set of options as a starting point to all users. Our Plugins SDK will contain such a sample plugin which makes use of the new API to distribute.
So what would be your biggest feature-request wish for the upcoming Oxygen XML Author 16.0?