Pages: « 1 2 3 4 5 6 7 8 9 10 »
 on: July 06, 2017, 09:59:05 AM 
Started by akheiljain - Last post by akheiljain
Hi Derek,
I was able to run my js using the sample,514.0.html, but once the event takes place in the browser window, it doesn't report the event back to XMetal.
I have the mcr set to :
<?xml version="1.0"?>
   <MACRO name="On_Application_Open_Complete" lang="JScript" hide="true"><![CDATA[
      // XMetaL Script Language JSCRIPT:
      ResourceManager.Visible = true;
      ResourceManager.RemoveTab( "Assets" );
      ResourceManager.RemoveTab( "Desktop" );
      ResourceManager.AddTab("Web Service","Shell.Explorer");
      ResourceManager.SelectTab("Web Service");
      WebService = ResourceManager.ControlInTab( "Web Service" );
      WebService.navigate( "file:///C:/Program%20Files%20(x86)/XMetaL%209.0/Author/Forms/resManTest.html" );

And the html file looks like :"http://hw-en-daem-ap01:8080","Picker")
if(window.addEventListener) {
        window.addEventListener("message", receiveMessage, false);
    else if (window.attachEvent) {
        window.attachEvent("onmessage", receiveMessage, false);
    function receiveMessage(event) {
        console.log("Received message from: " + event.origin);

The receiveMessage is never called.

 on: July 05, 2017, 04:39:36 AM 
Started by Consigliere - Last post by Consigliere

I've been struggling with trying to convert Word documents into DITA. I have a number of methods available, but none have really worked out for me. I'm using XMetaL 12 Author Enterprise.

I have tried to convert Word documents into DITA with a program called X-ICE, which is advertised as sort of an extension of XMetaL. However, there is next to no information on it online. There's the user manual online - which happens to be more complete than the manual it comes with - but no one has as much as commented on the program on any forums, let alone shared tips or tricks or anything.

My problem with X-ICE lies in that it requires you to create specific rules to "scan" Word documents with. In certain cases, it goes well enough, but in other cases, the documents' styling is like a patchwork so rules like that won't work. And even if the text is styled conveniently enough that X-ICE can go through it, its output is not simple enough to customize. It constantly runs into problems, such as not closing tags, or closing them but leaving the cursor inside the tag - things that are fairly small, but will throw a gigantic monkey wrench in the works. And EVEN if this problem was solved, it would arise all over again once documents with differently funky layouts pop up. So all in all, X-ICE doesn't sound like a very stable solution.

There is another converter program called Convertoo, but it's even worse than X-ICE in certain ways. While X-ICE's shortcomings could arguably be called user-based on some level, Convertoo simply won't work with half the Word documents I try to convert.

I've even tried looking up alternative methods, such as converting Word into RTF and then somehow converting that into DITA/XML, but that was a fairly fruitless endeavour too. I tried using Paul Tremblay's rtf2xml program, but the attempt fell short at installation.

So my question is: Does XMetaL have any form of assistance regarding the conversion of Word documents into DITA/XML? Oxygen apparently does it natively, but does XMetaL have anything similar? How do people usually deal with the need to bring a ton of legacy documents into DITA?

I've tried copying and pasting the contents of an RTF file to a Generic Topic, and although it did keep the tables, images, and other elements intact, it did have its own problems. And correcting hundreds of files manually doesn't sound too plausible...

 on: July 04, 2017, 09:26:08 PM 
Started by bjorn - Last post by tonys
I believe when disabling macros it is best to use the On_Update_UI even macro. All macros are enabled when this is called so disabling macros elsewhere will probably give the wrong result.

Try something like this:

<MACRO name="On_Update_UI" lang="JScript"><![CDATA[
if (ActiveDocument.ViewType == 2) /* 2: plain text */

 on: July 04, 2017, 06:15:10 AM 
Started by bjorn - Last post by bjorn
We use track changes when editing documents.
I see when I switch from "Tags on view" mode to "Plain text view" mode the buttons in the reviewing toolbar goes gray, meaning that they can't be used. I have added a custom button to the reviewing toolbar and I want the new button to also be "gray" when changing to "Plain text view".

I guess the function that is making the default reviewing buttons gray is a builtin function in XMetaL, meaning that they cannot be altered.

Is there a function that is executed when changing view mode? Maybe I can change this method to deactivate the new button/icon.

Or do you have any other suggestions to solve this?

Using XMetaL Version#:


 on: June 29, 2017, 04:44:23 PM 
Started by formsandprecedents - Last post by Derek Read
I think you can only really do this in Plain Text view, since your id values and the content inside the <label> and the other text is probably different for different <footnote> elements. You can find things using regular expressions but there is no mechanism in this version to leave some portion of what has been found unchanged (the replacement affects everything you find).

So, use Plain Text view and make two separate replacements like this:

Replacement #1:
Find: <footnote
Replace: .<footnote

Replacement #2:
Find: </footnote>.
Replace: </footnote>

The other option would be to write a script. That would involve walking the document using a few different APIs, finding the element in question, checking to see if it has a period before it, if not add one, checking to see if it has a period after it and removing it. Unless you need to do this all the time (or for multiple users) I'd just use the Find described above.

 on: June 28, 2017, 08:55:54 PM 
Started by formsandprecedents - Last post by formsandprecedents
Sorry for the nooby question, but can anyone suggest a search and replace string for the following situation:

I am trying to move the punctuation mark to before the footnote mark throughout an entire document. The XML tags are as follows:

<footnote id="FN1"><label>1</label>footnote text goes here</footnote>.

 on: June 28, 2017, 01:50:56 PM 
Started by MarcB - Last post by Derek Read
Sounds like a good solution.

Sorry about saying to check for @colnum on entry elements. That is of course not actually allowed in a CALS table. It is the colname as you suggested (and discussed in all of those DITA trackers).

XMetaL Author does get rid of the colname when you merge cells. Most of the time we try to keep the XML to a minimum where possible. Because colname is not needed in this case it is dropped. It seems a bit odd that the DITA OT would be checking for that though. It is not actually a required element at all (according to the DTDs) so I'm not sure what it is even validating against in this case (or if this is validation). A table without any colname values will validate according to the DITA DTDs. It will also render correctly (at least in XMetaL Author) because in this case the order of the entry elements is then assumed to be the order they should appear in the row (left to right) as described in the CALS spec.

 on: June 28, 2017, 01:03:54 PM 
Started by PhilB - Last post by Derek Read
The functionality that drives the DITA authoring is effectively disabled in Plain Text view because the APIs required are not available.

You can easily conref to a row from another table just like you can any other element in Tags On or Normal view:

1. Put your selection inside the table you want to add the conref target row to.
2. From the Reuse menu select "Insert Element with Content Reference".
3. In the dialog that appears (Insert Element with Content Reference) you will see a list of id values under "Start of Range" that are in the current document.
  a. If the row you want to conref to is in the list select it then click OK. A source row ("local content") will be inserted and the reference to the other row will be added to it (the conref attribute will be set).
  b. If the table row is in another document then select the other file using the Browse button. A list of elements that have an id in that other document will be shown and you can select the row from this list. A source row ("local content") will be inserted and the reference to the other row will be added to it (the conref attribute will be set).

In both cases the source (aka: local content) for the row that is inserted will be given the same number of entry elements as the row above it in the table (the same as adding a row "normally"). This allows it to be rendered as part of the rest of the table even in cases where you have selected a row with fewer or more entry elements. The number of entry elements isn't mandated by XML validity, or DITA, or the CALS table specs. In most cases you'll want to conref to similar table rows to keep things simple and avoid working with complicated structures that include  spanning (@morerows, @namest and @nameend).

If this doesn't work for you I would suggest contacting SDL to ask for special instructions. Their integration with XMetaL Author Enterprise might alter our features, or their CMS might have special requirements for this.

 on: June 28, 2017, 09:41:39 AM 
Started by PhilB - Last post by PhilB

Sorry I didn't see the other discussion when I searched and thanks for your response. 

I forgot to add that we are using SDL Knowledge Center - Publication Manager (12.0.1) with XMetaL Author Enterprise 9.  XMetaL will not allow me to insert a content reference when in plain text view.  It is grayed out.  If I am in normal or tag view it will allow me to insert a conref.  However I am only able to do a table not a row. 

Are you using SDL as well or is your conref going through XMetaL?

 on: June 28, 2017, 08:32:01 AM 
Started by PhilB - Last post by MarcB
This is dealt with in the topic "Conref a table row" in the General XMetaL Discussion section of this forum.

It works.

I have found, though, that I need to enter the same number of empty cells to the target row (the one containing the @conref) as there are in the source row (the one containing the @id).
I do that in plain text view.

But that applies to XMetaL 12, so I'm not sure the same holds for version 9.

Pages: « 1 2 3 4 5 6 7 8 9 10 »
email us