Pages: « 1 2 3 4 5 6 7 8 9 10 »
 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.

 on: February 21, 2018, 03:47:26 AM 
Started by hico - Last post by hico
Thanks for your advice! That sounds like we've done everything fine till now, we use XMetaL API in a dll, which seems to work. If we have more than one Macro, all macros are packed into the .mcr build by XMetaL Developer, right?

The thing is...we have a lot of different schema DTDs. How can we deploy these? In the past, we handled this with the help of a catalog file, that referenced sub-catalog files and so on, so that referenced schema DTDs could be resolved. I know that there's a catalog in "Rules" folder, but can I reference my own catalog in any way? Or does I have to build my own document level customization for every schema DTD? How would I deploy the .xac, that means, in which folder do I have to place it, or reference it?

We are on the very beginning of our customization, so, sorry for your time.

 on: February 20, 2018, 01:11:41 PM 
Started by hico - Last post by Derek Read
It sounds like this is an application-level customization. In that case you can ignore the XAC file. Both are built just because that is how XMetaL Developer was designed but the XAC file isn't really useful. You can consider your application-level customization to consist of the MCR file itself (unless it calls other code like an XFT form or a DLL that you need to deploy as well).

XAC files are ZIP files containing a copy of whatever was "built" when you select build in Visual Studio, together with a manifest that lets XMetaL Author know what to do with the file(s). A XAC is (arguably) slightly more useful for a document-level customization where your customization consists of DTD/XSD/RLX/RLD, CSS, CTM, MCR, XFT and possibly other files. All of those files are zipped into a single XAC file. When that file is read by XMetaL Author (or XMAX) it is first unzipped to a temp folder then all the files are read in as they would be if opened directly. The single benefit (if you can call it that) is that you can then deploy a single file. However, this can add to the complexity of debugging issues, and it makes it much more difficult to tweak a customization after deployment.

I did a webinar a few years ago on customization deployment. The accompanying document that describes the subject in detail now lives here:

 on: February 20, 2018, 06:28:07 AM 
Started by hico - Last post by hico
We have installed XMetaL Developer recently. The output of a customization project is, e.g., a .mcr and a so called .xac. So, how do I deploy the .xac? If I copy the .mcr in the "Startup" folder, the .mcr seems to run, I also can debug it with "debugger" keyword, as I read here. But what about the .xac? I did not find anything about .xac deployment in the developer and customization guides and would be very thankful for your assistance. Kind regards

 on: January 22, 2018, 03:25:17 PM 
Started by lerche - Last post by Derek Read
Any MCR file you place in the Startup folder is Application-level (available before any documents are open and for every document type).

 on: January 21, 2018, 03:12:47 PM 
Started by lerche - Last post by lerche
Thank you very much for your answer!

It's a great pity, but it is good to know. What would you suggest for writing a global macro that can analyse the content for several kinds of XML documents? I think the only way is to write a macro for a specific dtd. After that i would deploy the resulting macro in the startup folder. Are there any other good options?

 on: January 19, 2018, 08:03:09 PM 
Started by lerche - Last post by Derek Read
This is a known limitation. It is documented in the readme for XMetaL Developer as "Application-level XAC debugging does not work".

You will need to deploy the MCR file in this case, and if you need to debug it you can insert a debugger statement into the file at the location you want to trigger script debugging. It isn't as elegant as being able to start it from Visual Studio with the ability to set a break point but it should give you script debugging.

For JScript insert the keyword "debugger" (without quotes) at the line you wish to trigger the debugger.

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