DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Form to set conref – "read-only" node
-
rweiser March 20, 2012 at 1:50 pm
Form to set conref – "read-only" node
March 20, 2012 at 1:50 pmParticipants 0Replies 1Last Activity 10 years, 10 months agoHi.
We have a client that makes heavy use of
elements as “variables”. They insert a 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” (http://cl.ly/2a3m3Y0e3G3y352T0z0e).
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;
domNode.attributes.setNamedItem(conrefAttribute);
} else {
domNode.attributes.getNamedItem("conref").Value = conref;
}
}Thanks in advance,
Reuven Weiser
Suite SolutionsDerek Read March 26, 2012 at 5:53 pm
Reply to: Form to set conref – "read-only" node
March 26, 2012 at 5:53 pmIf 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.
-
AuthorPosts
- You must be logged in to reply to this topic.