Pages: 1
Author Topic: entities issue  (Read 3424 times)

Posts: 17

« on: August 21, 2010, 01:38:42 AM »


We are facing a weird issue with xmetal. Our xml file has entities in hex format. One specific entity"&" occurs both in element content and in attribute values.

When such an xml file is opened by xmetal, the above entity is successfully converted into "∓" in element content but is converted into "&" in attribute values. This causes an invalid document to exist in xmetal.

1. It seems like a bug with xmetal. How can we get it fixed?

2. Any workarounds we can do in xmetal for this issue. The modification of the file outside xmetal is not a possibility.

3. I tried writing an application level macro "On_Application_Before_Document_Open", and thought of changing the file before it is processed by xmetal. However

    a. The above macro seems to be getting called after the document has been opened. I figured that out by showing an alert. The alert was displayed after the document was displayed

    b. Even if the above is not correct, I could not find an API to write a file, though there is an API to read the file.

4. I wrote On_Document_Open_Complete macro for the specific DTD and tried fixing all such attributes. However, for a file size of 2 MB, this pre-processing takes more than 20 minutes. So this solution is also not acceptable.

We are using XMetal 5.5  Any help with the above will be great.

« Last Edit: August 21, 2010, 01:42:43 AM by sapraaman » Logged
Derek Read
Program Manager (XMetaL)

Posts: 2621

« Reply #1 on: August 23, 2010, 04:21:54 PM »

I'm surprised your script takes so long. 2MB is pretty large but I think I have a script that will work faster (I'm talking at most seconds, not a 1/3 of an hour). However, if you have many of these files it may ultimately be best to address this issue as a batch process outside of XMetaL Author.

Please try the scripting workaround provided as an MCR file located here:,989
« Last Edit: August 23, 2010, 04:41:39 PM by Derek Read » Logged

Posts: 17

« Reply #2 on: August 24, 2010, 11:13:41 AM »

Thanks Derek.
Pages: 1
Jump to: