DITA and XMetaL Discussion
t3programmer March 1, 2012 at 9:33 am
XMetaL customizing: How to support new image types?March 1, 2012 at 9:33 amParticipants 2Replies 3Last Activity 10 years, 7 months ago
I am a programmer for an XML authoring system that uses XMetaL as XML editor.
We use the authoring system to produce Web-based trainings that make extensive use of video films.
Currently, we are only using video files that have the file type “swf”.
For displaying them in XMetaL, we insert them as images and use the same IE Active X control that is used by the macro “SVG_OnInitialize” of the XMetal standard. For this, the only change we did was to change the function “isSVG” such that it returns “true” in the “swf” case, too. That is, we essentially use the code:
var ipc = Application.ActiveInPlaceControl;
if ( ipc != null )
if( isSVG( src ) )
ipc.Control.Navigate2( “file:///” + ActiveDocument.Path + “\” + src + fileExt );
Now we want to support additional video types (“flv”, “f4v”). These video formats cannot be displayed by the Flash Plugin for IE. However, they can be referenced and displayed by a Flash application (“flvplayer.swf”).
Principal approaches that we could think of were:
- Use a different Active X control than IE, or
- Open the “flvplayer.swf” instead of the image file, passing the image file as parameter, or
- Create an HTML page on-the-fly and display it with the IE control (see code below, replace **vid location** by the image file).
wmode=”transparent” data=”flvplayer.swf?file=**vid location**&autoStart=true”>
How can this be done in XMetaL? Which approach would you recommend?
I am using XMetaL Author Enterprise 6.0. My XMetaL version is 6.0.0.079. I use it on the operating system Windows XP Professional, Service Pack 3.Derek Read March 1, 2012 at 5:34 pm
Reply to: XMetaL customizing: How to support new image types?March 1, 2012 at 5:34 pm
You will need to add new settings into the CTM file to identify which ActiveX control and which events to fire. The settings are in a section called:
You will need to create a new section, or change the section currently set up for IE (Shell.Explorer.1).
It looks like you are already modifying the scripts that come with the DITA functionality. Keep in mind that officially we are not supporting customization of the DITA authoring functionality at this level (yet).
If this is for another DTD/XSD (your own customization) then the XMetaL Developer Customization Guide has a section on using ActiveX controls called: “In-Place Control” which is a subtopic within “Display As” (these terms will have little meaning if you are not using XMetaL Developer).t3programmer March 5, 2012 at 8:11 am
Reply to: XMetaL customizing: How to support new image types?March 5, 2012 at 8:11 am
I got one step further: I replaced the OCXReplacement entry for “Shell.Explorer.2” by
ipc.Control.LoadMovie( 0, “file:///” + ActiveDocument.Path + “\” + src + fileExt );
I can use the Flash player for displaying “swf” files. “flv” files are not yet displayed. How to do this, I'll try to figure out myself.
However, I have now lost the SVG functionality since the new ActiveX control replaces the old one.
- How can I define that both “Shell.Explorer.2” and “ShockwaveFlash.ShockwaveFlash.10” are available as in-place-controls in XMetaL? I would like to use “Shell.Explorer.2” for images with extension “svg” and “ShockwaveFlash.ShockwaveFlash.10” for images with extension “swf”.
Still, I have another question:
Derek Read March 7, 2012 at 12:55 am
- Within my debugging environment “XMetal Developer 6.0” the in-place-controls are no longer working. That means:
- When debugging the code of “SVG_OnShouldCreate.js”, in the 'Debug Variables Window' it says 'undefined' for 'ipc.Control' and 'Server exception error' for 'ipc.NextEventParam'.
- After opening in XMetaL, the “swf” images are displayed like missing graphics.
In contrast, without debugging, XMetaL displays the “swf” images correctly. What can be reasons why the in-place-controls do not work in the VisualStudio 2008 debugging session?
Reply to: XMetaL customizing: How to support new image types?March 7, 2012 at 12:55 am
Please see this part of my answer: “It looks like you are already modifying the scripts that come with the DITA functionality. Keep in mind that officially we are not supporting customization of the DITA authoring functionality at this level (yet).”
I'm afraid this means that you are really on your own here. The documentation for embedding ActiveX controls in the XMetaL Developer Customization Guide and the Programmers Guide may help you, as well as the Journalist sample (which also embeds IE unfortunately), but since you are making changes to a portion of the DITA functionality that is unsupported. Other clients might be able to help if they have tried to do this (that is what the forum is for) but keep in mind that if you do alter the code in this area it will be difficult for XMetaL Support to help you in other areas if those changes break other features. Support would need to answer any questions about other broken functionality based on the assumption that you have not made these changes and that you have a “clean” installation (so you'd need to back them out and reproduce the issue without these changes in place).
- You must be logged in to reply to this topic.