General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Invalid tgroup attributes resulting from Selection.InsertCALSTable()
-
smm735 June 26, 2018 at 8:23 pm
Invalid tgroup attributes resulting from Selection.InsertCALSTable()
June 26, 2018 at 8:23 pmParticipants 4Replies 5Last Activity 4 years agoHi,
We have recently begun using XMax 11.0.0.084
When I call AxXmetaLControlLib.AxXMetaLControl.Selection.InsertCALSTable(2, 2, “table”, True, False) and then immediately read AxXmetaLControlLib.AxXMetaLControl.Document.xml the latter property contains the xml for my new table but looks like this:
test
test
test
test
test
test
More importantly, the tgroup element contains what appears to be an invalid attribute “Desc” and I don't understand why the “cols” attribute is set to “cols-value” instead of 2. Subsequent processing chokes on the tgroup element as it does not like either the “Desc” attribute or the “cols-value” value for the “cols” attribute.
When I switch to XMax 7 (our previous version) and make the same call the xml looks like this:
test
test
test
test
test
test
Any thoughts or suggestions on why I may be seeing this?
Thanks,
SeanDerek Read June 27, 2018 at 8:48 pm
Reply to: Invalid tgroup attributes resulting from Selection.InsertCALSTable()
June 27, 2018 at 8:48 pmMy first recommendation would be to try the current release.
If this was a bug in 11.0.0.084 I think it must require a specific setup to reproduce. I am unable to reproduce the issue in 11.0.0.084, 11.0.0.091 and 13.0.0.033 (current release).
Here is my test script:
[code]//XMetaL Script Language JScript:
Selection.InsertCALSTable(2, 2, “table”, true, false);
ActiveDocument.Host.Alert(ActiveDocument.xml);[/code]This also gives me the expected results:
[code]//XMetaL Script Language JScript:
Selection.InsertCALSTable(2, 2, “table”, true, false);
if (Selection.InContextOfType(“TABLE”)) {
if (Selection.MoveToElement(“table”,false)) {
Selection.SelectElement();
ActiveDocument.Host.Alert(Selection.Text);
}
}[/code]As does switching to Plain Text view and viewing the XML source.
Selecting the table, copying it to the clipboard, and pasting that into a text editor also gives me the correct results.What do you see in Plain Text view?
Presumably in your case XMAX is also giving you validation errors?
If not, does the schema define an @Desc?I'm trying to figure out which API is causing the problem for you: ActiveDocument.xml or InsertCALSTable.
Ultimately we will need to reproduce this though.If you can reproduce this issue with 13 please let XMetaL Support know. The issue does not appear to be reproducible with a schema that supports the standard CALS table model, so if it requires a specific DTD or XSD to reproduce the issue please provide the files needed when you submit the support case.
smm735 July 11, 2018 at 4:05 pm
Reply to: Invalid tgroup attributes resulting from Selection.InsertCALSTable()
July 11, 2018 at 4:05 pmThanks Derek,
Just curious how I would get the latest release/build of XMax? The website seems to indicate that XMax 11 is the latest release. We were provided with 11.0.0.084 but you mentioned using 11.0.0.091 and I'm not sure how to obtain different binaries. The Downloads page has 2 options – both for XMetaL Author, nothing for XMax.
I see that XMetal Author is at v13 but we are not using Author – just XMax.
Derek Read July 12, 2018 at 5:09 pm
Reply to: Invalid tgroup attributes resulting from Selection.InsertCALSTable()
July 12, 2018 at 5:09 pmPlease contact the JustSystems sales people.
In general you need to go through them to get any XMetaL software other than the current release of XMetaL Author Enterprise which runs in trial mode by default, so it's used for evaluations (licenses are still provided by the sales team). There is no trial mode for XMAX so we do not make it readily available.
smm735 July 12, 2018 at 5:59 pm
Reply to: Invalid tgroup attributes resulting from Selection.InsertCALSTable()
July 12, 2018 at 5:59 pmThanks,
We have actually resolved the issue by reordering our DTD elements.
Previously the parent element was defined before the Table elements in our DTD. Relocating the parent element to follow the Table elements resolved the issue. I'm not sure why we only started seeing the issue in Xmax 11 and not in Xmax 7. I wasn't aware that the element declaration order mattered in a DTD…
Derek Read July 12, 2018 at 7:55 pm
Reply to: Invalid tgroup attributes resulting from Selection.InsertCALSTable()
July 12, 2018 at 7:55 pmThe order definitely does not matter. It would be useful if you were able to submit the files you are using to XMetaL Support so they can have a look and try to reproduce the issue.
-
AuthorPosts
- You must be logged in to reply to this topic.