Pages: 1 2 3 4 5 6 7 8 9 10
 on: March 05, 2018, 07:47:22 AM 
Started by AmitElhanan - Last post by AmitElhanan
Thank you Derek,

I'll give these suggestions a shot.

 on: March 01, 2018, 05:22:17 PM 
Started by AmitElhanan - Last post by Derek Read
This somewhat related idea might also be useful:,738.0.html

 on: March 01, 2018, 01:31:58 PM 
Started by AmitElhanan - Last post by Derek Read
Popping something up in Normal view in the same way it appears in Tags On view would tend to get in the way I think, at least if the same gesture was used.

The only thing I can think of that might give you some bit of similar functionality immediately using existing functionality and that wouldn't get in the way would be to display something in the status bar. There isn't a lot of room in there though, so I think you'd want to limit which attributes are being displayed to one or two.

The following would give you that functionality, provided it doesn't conflict with another macro already in your customization(s) that is displaying information in there:

<MACRO name="On_Update_UI" lang="JScript" hide="false"><![CDATA[

//add attributes to the following array to include them in the status bar display
var attrs = ["id","href"];

var msg = "";
for(i=0;i<attrs.length;i++) {
msg += attrs[i] + "=\"";
msg += Selection.ContainerAttribute(attrs[i]) + "\"  ";

I don't think that is much better than having the Attribute Inspector open but you might feel otherwise. One benefit might be that displaying this information in the status bar kind of makes sense because you don't really know exactly what you have selected in Normal view unless you look at the mini-context to see which element you are in (and that appears just above the status bar, so you're looking in the same place).

 on: March 01, 2018, 09:42:17 AM 
Started by AmitElhanan - Last post by AmitElhanan
Is there a way to get the attribute hover that works on the "Tags On View" to work in the "Normal View"?

Using XMetaL Author Enterprise 10.0

 on: February 26, 2018, 03:43:56 AM 
Started by anton - Last post by anton
Thank you, Derek, that's exactly what we need!

 on: February 21, 2018, 02:26:03 PM 
Started by anton - Last post by Derek Read
When you use addElement() you are modifying the in-memory model of the DTD (which is why it is used in the event On_DTD_Open_Complete). That change is permanent until the DTD is reloaded. There is no equivalent API for removing such definitions from the in-memory model of the DTD.

If the only issue is that you don't want the user to insert the element using the Element List you can modify what appears in the Element List using the On_Update_ElementList event and the API ElementList.RemoveItem(elemname). This event fires each time the element list is updated which gives you the flexibility to include logic that decides whether or not to remove an item under specific circumstances. If you want it to never be listed then your logic would just always remove it.

This will not stop a user from pasting the element into a document or typing it into Plain Text view. That would require the DTD to be reloaded.

 on: February 21, 2018, 02:16:28 PM 
Started by bk - Last post by Derek Read
It would be the IE WebBrowser control (Shell.Explorer) that is not passing the message through in this case.

I don't know how easy it would be to do this, but I think you would need to handle the click in an HTML page. That likely means opening an HTML page in IE (instead of opening the SVG in IE) then passing the file path for the SVG from XMetaL to the web page (instead of passing it to IE), and then having the HTML file load the SVG file (likely through script so that the path can be varied). Now that an HTML page is loaded you may have the ability to process an OnClick event in there, but that depends on how the SVG is being displayed by IE (natively or via another control) and whether it exposes the OnClick event when you click on an SVG image.

There is no native support for rendering SVG in XMetaL Author, which is why the IE WebBrowser control (Shell.Explorer) is usually used. There are other ActiveX controls that render SVG but I believe any that are currently supported (by their maker) are commercial.

Adobe used to make an ActiveX control and was providing it for free for use with Internet Explorer, but it was specifically designed for use with IE so it had some quirks that made it unusable in other software. They stopped supporting it long ago.

 on: February 21, 2018, 01:58:46 PM 
Started by hico - Last post by Derek Read
You can put multiple macros into one MCR file or you can build multiple MCR files. If installing to a single machine the result is basically going to be the same, though loading order of macros may differ depending on the filename of the MCR files.

To XMetaL, each schema (DTD or XSD) is the basis for a single document-level customization. It loads the XML file, finds the DTD or XSD file (see the document I referenced previously for a very detailed description of how a DTD or XSD is found) then all other files needed to render the display of the XML file and provide UI interaction are loaded (this includes CSS, CTM, MCR and possibly other files). The minimum is CSS and CTM but there are over 1000 APIs you can use to customize how users interact with the XML and the main UI of the application, and what happens for many many events.

You can either add your entries to the catalog file or add your own catalog file(s) and reference them from the XMetaL catalog file. The software needs to start looking somewhere and it uses its own catalog file to do that.

However, there are many other ways to find your schema (see the document I referenced previously for a very detailed description). Some options:

1. Place your DTD/XSD any other files in the same folder as your XML file or nearby, perhaps in a subfolder, sibling folder, etc, then in the XML file's DOCTYPE declaration or SchemaLocation point to the DTD/XSD using a relative path.
2. Place your DTD/XSD file in the Rules folder. This is where XMetaL looks for schemas when it can't find them using any other method. This is by far the simplest solution as it means you can have literally any random value in the XML for DOCTYPE or SchemaLocation and if XMetaL can't find the file there it looks in the Rules folder and loads everything from there.
3. Add catalog entries for each of your DTDs, then set a unique PUBLICID value in each of your XML files XMetaL Author can use to find them based on the catalog entries.
3. Some CMS systems have the capability to manage and deploy customization files for XMetaL Author. The vendor can tell you if this is the case and how to configure that.
4. Create a macro that overrides all of the above, parses the XML file (using some external process) and then tells XMetaL Author where to look for the DTD by overriding the SYSTEMID value. This gives you absolute control but is overkill 99.9% of the time.

 on: February 21, 2018, 09:55:30 AM 
Started by anton - Last post by anton
Hey Derek,

Our plugin highlights words in XML documents by embracing them into a new tag.
To allow that we add this tag to the document's DTD:

     LPDISPATCH p = docOwner.get_doctype();
     DOMDocumentType dtd(p);
     dtd.addElement(pszTag, "", TRUE, TRUE);

Having this done we can start highlighting words.
As a result this tag gets viewable in the Element List pane.

However it remains there even after the highlight has been cleared and all occurances of the tags removed from the document.

Any chance to remove it from the Element List so that it no longer irritates customers?

thank you,

 on: February 21, 2018, 06:31:48 AM 
Started by bk - Last post by bk
On XMetal Author Entreprise 12, when rendering SVG image in XMetal using the Shell.Explorer.2 ActiveX, we are unable to catch the "onClick" event (we want to do it to launch the SVG authoring program).

My understanding is that the ActiveX doesn't forward the click event to Xmetal.

Are there any ideas to catch this events ? (setting something in the activeX for instance)
Are there any other way to display SVG image in Xmetal ?

Thanks in advance for your answers.

Pages: 1 2 3 4 5 6 7 8 9 10