Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Basically title.
I have a bunch of tables generated with a script and they are relatively small files. However, if I open them in arbortext and then save, they're all saved with attribute info and other abortext tags. This isn't ideal as it clutters the info and makes it hard to navigate line to line changes.
The attributes that get added are not weird, as in they exist in the dtd, however, I would like arbortext to not insert these. I'd also like to prevent it from adding <? ?> tags as they also interfere. Additionally, it likes to shift lines in the code based on some arbitrary number the user can set - width and that may differ between users. If i set it to a high number the code is still janky and any pretty print I apply externally gets tossed out the window.
On one level, it would help to know what doctype you're using (DITA, Docbook, something custom?), and what attributes specifically are getting inserted.
However, the larger issue seems to be that you are having trouble finding meaningful changes in your documents using a text editor to do a "diff" style line-by-line comparison. I would say that's probably not the best approach to finding changes in XML documents. With XML, linebreaks can appear in many places that are not syntactically significant, to facilitate things like the "pretty printing" you mention.
But the whole point of a tool like Arbortext is to work with the document structure instead of treating the XML like a traditional text file. So, my advice would be to take advantage of Arbortext's Compare feature to do your version checking. You can open the updated file, and compare it to the previous version, and it will show you changes between the two versions in the Editor window. The animation below demonstrates the process--it's very easy. It shows you what has changed in your document structure, without being limited to line-by-line changes in the serialized file.
Hi Clay,
I am using custom dtd which is largely based off of docbook.
For things like tags, attributes get randomly added. Well, all of them are added. I thought the dtd/interface would just give me a blip if I wanted to add an attribute or tag that's not allowed, but it is inserting everything. It's causing significant file size increase and processing. I can open the files with a regular text editor but when opening with Arbortext, it freezes. For reference, the files are registers are are quite long already, This kind of problem extends to the compare method you show, and I would much prefer to not add any post auto-formatting to files if I can - since the files I am working with are already so large that hovering my mouse over the insert menu causes the software to hang.
I would also want to remove the auto-generated arbortext only <?> tags.
For
There are a couple of preferences you can try to see if they help:
set writeunspecifiedattrs=none
set writepi=none
Note that some table features, such as custom row heights or cell shading, may be lost if you save without Arbortext PIs, since there's no DTD markup in standard OASIS tables for that.
You can set these in the Tools->Preferences->Advanced dialog.
Regarding reformatting of the serialized document, I don't think there's much you can do about that. But again, I recommend against anything that treats your XML documents as plain text files, as it introduces the risk of breaking the structure and leaving you with non-well-formed content.
Hi Clay, I am using styler 7 and 8.1.2 at the moment and there is no option for writeunspecifiedattrs
Hmm. For some reason, that option doesn't appear in the Advanced preferences panel. But they are both legitimate settings going back to at least 7.1, which you can verify by searching the Help Center for both 7.1 and 8.x.
If you can't set it in the Preferences dialog, you may have to do it in the Command Window or in an ACL file. You can try it in the Arbortext Command Window, and if it looks like it will help, you can add the commands to an init.acl file in your custom/init folder.
Hi @DL_10914713,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Of course, if you have more to share on your issue, please pursue the conversation.
Thanks,
Anurag
