Pages: 1
Print
Author Topic: Setting up CTM file for XML Schema based document  (Read 5692 times)
Polly Poon
Member

Posts: 8


« on: August 04, 2009, 08:05:34 PM »

Hi,

I am having problems setting up the CTM file for a XML Schema based document.

Initially I opened a XML document defined by a XML Schema. XMetaL Author 5.5 has automatically created a CTM file for me.

I checked the automatically generated CTM file and found that a set of ns prefix mapping has been created. A set of <ElementProperties> are also defined for my XML document.

I tried to modified the CTM file. First, i have taken out the <NoPrettyPrinting> element from the <GlobalPrettyPrintOptions> to activate the pretty print options that are defined for the element.

I then tried to configure the <ElementProperties> for the elements. However, none of the settings I added to the CTM file appears to have taken effect.

For example, I added <BlankLineBeforeStartTag> to one of the <ElementProperties> of <block>. Then I saved the CTM file and open the XML Document in XMetaL. When I switched to the plain text view, no new blank lines were inserted before the start tag of <block>.

Are there anythings i need to add to the CTM file for it to take effect?

Logged
Su-Laine Yeo
Solutions Consultant
Member

Posts: 260


« Reply #1 on: August 05, 2009, 03:39:04 PM »

I'm not sure if this is the only issue, but you do have to restart XMetaL in order for CTM changes to take effect.
Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #2 on: August 05, 2009, 05:07:57 PM »

I think Su-Laine is correct. Unless you have XMetaL Developer installed, changes you make to customization files typically require you to restart XMetaL Author.

It could also be that (if you are hand-coding your CTM files) you have introduced an error. In most cases XMetaL Author will simply ignore things it does not understand. In some cases it will read the file up to that point and ignore the rest. In some cases it might skip over a section it doesn't understand. In rare cases it may be possible to crash the product as well, though I believe most of these have been ironed out (ideally you shouldn't be feeding the product invalid configuration settings anyway, we only test with files generated by XMetaL Developer as that is the expected use case).
« Last Edit: August 05, 2009, 05:12:00 PM by Derek Read » Logged
Pages: 1
Print
Jump to:  

email us