cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Coloring XML and SGML nodes in Arbortext

Highlighted

Coloring XML and SGML nodes in Arbortext

Hello!

I use Java (the plugin is made) for modifying the content of the opened XML/SGML files (Arbortext 5.2).

How should I modify the color of the nodes (I mean programming mode)?

As far as I'm concerned, the usage of _font nodes is forbidden (a-la <_font>text</_font>). At least it leads to errors in SGML.

Then we should use processing instructions (PI). How should we create them?

The standard Java DOM method createProcessingInstruction() does not work when we deal with SGML.

I think that it's because of the different format of PIs in SGML and XML.

Should we use Acl OID commands/functions (goto_oid, insert_tag)?

But I have met the problem of incorrect cursor positioning after Application.messageBox execution in the onclick event handler.

1)calling dialog via Application.messageBox(...)

2)getting the first oid of the required node

3)Setting cursor before the start tag via "goto_oid(oid,-2)".

4) Trying to insert PI via "it _font" command. It leads to splitting textnode in fact.

If I comment the Application.messageBox(...) call then the font PI is inserted correctly.

How should I prevent misplacing the cursor?

Maybe I have to use totally another approach...

Thanks in advance.