Home › Forums › General XMetaL Discussion › Xmetal -Attribute in MiniTemplate › Reply To: Xmetal -Attribute in MiniTemplate
Reply to: Xmetal -Attribute in MiniTemplate
December 13, 2012 at 9:58 pmSorry, took me a while to test this since 5.5 is an unsupported release (a reason to upgrade).
I can't reproduce this issue with 5.5 or 6.0 (the earliest supported release). My test:
1) Modify the Journalist.ctm file by changing the
2) Create a new file from the Journalist template in File > New.
3) Using the Element List insert a
4) Run a macro similar to yours:
var rng =ActiveDocument.Range;
rng.InsertWithTemplate("Para");
Again, the same XML is inserted, including the @Id and value.
I could not test with your scenario exactly as the Journalist DTD doesn't support the element you mention, called
Check to see that what your mini template is inserting is in fact valid. That is really the only thing I can think of. However, in that case the child element will not be inserted at all and the fallback in that case (when InsertWithTemplate fails) is for XMetaL to insert the element using InsertElement() instead, so that you would end up with