Pages: 1
Author Topic: Form to set conref - "read-only" node  (Read 2140 times)

Posts: 2

« on: March 20, 2012, 07:50:36 AM »


We have a client that makes heavy use of <keyword> elements as "variables". They insert a <keyword> almost every other sentence that conrefs a value from a Variables file that they use to help maintain consistency in product names, etc.
To help ease this process, I've used the XMetaL Form Layout Tool to create a form that is displayed in place of keywords. The form consists of a simple dropdown populated with their full list of possible variables. When they select a value, the OnXftPutFormToDoc method takes the selected value, constructs a conref value out of it, and then sets the conref attributes on the current node.

All works as expected, EXCEPT that if I "Refresh All References" (F11), though the value is correctly retrieved and displayed, any further attempts to change the selection in the dropdown are met with the message that "Error: this node is read-only" (

It seems that having XMetaL resolve the reference causes the node with the conref to become read-only, and I can then no longer reset the conref.

Any ideas on how to get around this?

FYI - I'm using XMetaL 5.5, and here's the method in question:

function TheView_OnXftPutFormToDoc(domNode) {
   var conref = variablesFilePath + "#variables/" + ComboBox1.XmlValue;
   if (!domNode.attributes.getNamedItem("conref")) {
        var conrefAttribute = ActiveDocument.createAttribute("conref");
        conrefAttribute.Value = conref;
   } else {
      domNode.attributes.getNamedItem("conref").Value = conref;

Thanks in advance,
Reuven Weiser
Suite Solutions
Derek Read
Program Manager (XMetaL)

Posts: 2621

« Reply #1 on: March 26, 2012, 11:53:08 AM »

If you have not already done so please contact Partner Support about this.

It is best not to discuss partner-related support issues on the forum (ie: making modifications to the product that JustSystems does not officially support) as it can lead to misunderstandings with clients.
« Last Edit: March 26, 2012, 11:55:00 AM by Derek Read » Logged
Pages: 1
Jump to: