DITA and XMetaL Discussion
mikestratton99 May 31, 2019 at 9:15 pm
How to insert a link to a MS Outlook Email Template into a Task Topic?May 31, 2019 at 9:15 pmParticipants 1Replies 2Last Activity 1 year, 10 months ago
Product: XMetaL Author Enterprise 11.0
OS: Windows 10 Enterprise
OS Build: 16299.1146
SITUATION: I was given a document in MS Word format and asked to convert it into a task topic in XMetaL. The Word doc details the procedure for how a user can report a software issue to tech support, and it contains a clickable link that opens a MS Outlook email template. (The email template is a blank trouble report that consists of a series of questions for the user to answer to describe their software issue before sending it to tech support.)
Screen shot from Word doc attached.
QUESTION: How can I create a link in my XMetaL task topic that links to/opens this same Outlook blank email template?Derek Read May 31, 2019 at 11:17 pm
Reply to: How to insert a link to a MS Outlook Email Template into a Task Topic?May 31, 2019 at 11:17 pm
DITA supports linking to any file type.
However, what happens when the user clicks on a link to that file will depend on what format you are transforming to, what the DITA Open Toolkit creates for that link in that particular output, which application the person viewing/reading that particular output is using, and how that application (maybe a browser, but possibly also the OS, antivirus, etc) deals with the link when that person clicks on it, and whether the user has the right software installed to open and use an OFT file (ie: they have MS Outlook installed or some other software capable of using that file). Best case scenario is that it might be automatically associated with the right software like Outlook and opened. Worst case scenario is that nothing happens or the application tells the user it doesn't know what to do with an OFT file. Medium case scenario is that the application tells the user it doesn't know what to do and simply offers to save the file, or perhaps locate some software that can open it.
Lots of variables there, but perhaps some of them are within your control.
First thing I'd try is this:
1. Figure out where you are going to save the OFT file. This will either need to be a permanent location or travel with the other file you are outputting from this particular DITA task (ie: full path, or URL, or relative path).
2. Create a link from the task to the OFT file: Insert > Link > File Reference, browse to and select the OFT file. Or if the file will live on a web server then use: Insert > Link > Web Link.
3. Generate output for the task (using whatever output format you need it to be in) and see if it does what you need under whichever test conditions the person reading your output content will be using.
The following works under these specific conditions for me on Windows:
@href value links to the *.oft file (ie: C:temptemplate.oft) or relative path (ie: template.oft) and @scope is set to either “peer” or “external”. (see note 1)
2. Generate output in HTML form using the default DITA OT. Most people are generating some form of HTML (CHM, HTML, Java Help, etc, so this is my assumption).
3. Open the resulting HTML file in a browser.
4. In the HTML (in the browser) click on the link to the OFT file. Some versions of IE will just try to open the file, some will trigger a security warning, some will prompt you to save and / or scan for viruses then might offer to open the file. Other browsers should do similar things.
5. If whatever happens in #4 triggers the file to be opened then it might open. I have MS Outlook installed and it is associated with these files so opens the OFT file.
Note 1: The DITA specs are a bit vague on which @scope value is correct for this particular case, but the DITA OT generates a link (at least in HTML) that browsers seem to deal with in a somewhat expected way in both cases. That expected way (for me) is that because the browser itself can't open the file it either offers to save it somewhere on my system, or it saves a temp copy and offers to open it in an application or my choosing, or it saves a temp copy and then automatically opens it in MS Outlook (if I have it installed).
If all that works then you might be done — assuming all the people reading that topic in its output form have a similar setup.
If it doesn't work then you might need to adjust attributes for the
(perhaps a relative link is needed if you are shipping the OFT file together with the output topic, or perhaps if you are storing the OFT file on a web server you really should be using a URL instead). The main two for are @href and @scope (see the DITA specs for details) which you can also adjust using the Attribute Inspector (F6). Depending on the output you are generating you may also need to adjust how the DITA OT generates that output (CHM, PDF, HTML, Java Help, etc) or whichever other process you are using to generate output if it is using something other than the DITA OT, a modified copy of the DITA OT, or something else.
If things beyond how output is generated need to be modified, or controlled, I don't know that there is much else you can do unless this is part of some internal system and you can force people reading the file to follow some procedure and configure their computers a specific way. ie: If the person reading your output doesn't have or refuses to install MS Outlook what do you want them to do instead?
- You must be logged in to reply to this topic.