GXS AI: how to process slash in XML data

If you are working with XML in GXS AI and your data contains a slash (like <Date>2016/01/08</Date>), you might face a situation when your map cannot process it, since slash is a special symbol.

Since this question is raised from time to time, I decided to write a short post about it. There are 2 ways (we are speaking about the map development, not about the map working in the production system):

1. you can change your data manually and add a release character in front of your slashes in the data
2. you can run otxmlcanon.exe pre-processor which would “fix” your XML file and do the same as it described in #1

otxmlcanon.exe -r \ _in.xml

Then, in your source model you should add release character:

SET_RELEASE(92) ; \ – this one is important

Gennady Kim

GXS AI: How to debug maps

I believe every GXS AI map developer knows how hard it might be to debug maps. I’m using SEND_SMSG function when I need to debug a piece of code

First of all, I’m using .bat files to run my maps

otrun -at %MAP_NAME%S.att -cs %OT_QUEUEID% -DLOCALE="English_UnitedStates.Latin1@Binary" -DINPUT_FILE=%BASE_PATH%__in.txt -DOUTPUT_FILE=%BASE_PATH%__out.txt -tl 1023 -lg _log.txt -I

this key “-lg _log.txt” tells the translator to use _log.txt for the translation session output. So, every time I’m using SEND_SMSG it writes it’s 1+ params into _log.txt. For example:

SEND_SMSG(1, STRCAT("GID_21_BALQTE_BSD_02_02_2002: ", VAR->GID_21_BALQTE_BSD_02_02_2002_T))

And in _log.txt:

Session [003407] Started: at: Sat Jul 25 09:03:04 2012
--GID_21_BALQTE_BSD_02_02_2002: AAA
--GID_21_BALQTE_BSD_02_02_2002: BBB
Session [003407] ended: err: 0 at: Sat Jul 25 09:03:04 2012

…As always, just an idea 🙂

Gennady Kim

Notepad++ and GXS AI models

As you probably know, often GXS AI developer use 3rd party editors when working with the models (instead of Workbench). My colleagues use Notepad++ with a “plugin” (User Defined Language) developed by Igor Nechaev:

notepad plus gxs ai

it highlights used constructions, allows to to collapse/expand blocks of code, helps you to comment/uncomment blocks of code and so on.

Here is the code of this “plugin” (User Defined Language):
Continue reading

GXS AI – stay tuned

I decided to continue describing GXS AI basics. This time I’ll be using GXS AI 5.2. There are some lessons about conditions, arrays, outputs and so on. After it, I’m going to give several examples of using of XSLT – xslt as s-model and xslt as t-model. Stay tuned!

GXS AI: models analyzer

As I wrote before, I’m often trying to use/create some tools/scripts which helps me to do different things – build the test data, compare outputs or check the models. For example when I was working a lot with GXS AI I created a tool which showed me the list of the variables and arrays used in the maps + some “assumptions” (for example, if a variable is not used). Also, it generated a code to check all the arrays (they all should be empty at the end of the translation). It helped us to keep the maps clean. There is no Print to File option in GXS AI Workbench (like Sterling’s MapEditor has) so often it was hard to see the whole picture, especially when the map contained hundreds or thousands lines.

Such tool would also help you to migrate maps from GXS AI to Sterling GIS/SI (or another EAI) and back.

Here are some screenshots just to give you an idea:

Continue reading