Please enable JavaScript to view this site.

Manual InterForm400 English 2023

Navigation: XML output > InterXML Module

Tips for advanced XML+ files

Scroll Prev Top Next More

When you build up an advanced XML file, there might be a few areas, where you might need some extra inspiration. Below a few extra tips are included.

 

This is a good tip, but it cannot be guaranteed, that this will work in any future version of InterForm400: Debugging your XML+ definition is possible, if you first convert the input spooled file into the output XML file the command, APF3812/CVTSPLFXML. Then you can check the processing behind the scenes by checking out the contents of one of the InterForm400 work files: QTEMP/XMLLINWK. This file contains a record for every identified page type and line type and the triggered spooled file line is also included on the right like below:

 

 

                                Display Report                                

                                             Report width . . . . . :     445  

Position to line  . . . . .              Shift to column  . . . . . .   26    

Line   ....3....+....4....+....5....+....6....+....7....+....8....+....9....+..

        PAGTYP      LINTYP        OCCUR  RELLIN  SPLTXT                        

000001  FIRST_PAGE  DET_LINE          1       1         Interword400     510  

000002  FIRST_PAGE  DET_LINE          2       1         PDF security     520  

000003  FIRST_PAGE                                                            

000004  FIRST_PAGE                                      Herring Marine Research

000005  FIRST_PAGE                                      Seaweed Street 14      

000006  FIRST_PAGE                                      9000 Battleaxe        

000007  FIRST_PAGE                                      DK-Denmark            

000008  FIRST_PAGE                                      ---------------------  

000009  FIRST_PAGE                                      Att: Martin Merman    

000010  FIRST_PAGE                                                            

000011  FIRST_PAGE                                      Re. Your new InterForm4

000012  FIRST_PAGE                                      -----------------------

000013  FIRST_PAGE                                      Congratulations with yo

000014  FIRST_PAGE                                      You are now able to ful

000015  FIRST_PAGE                                      InterForm400 with one o

000016  FIRST_PAGE                                      your customers and ease

 

 

During processing of an input XML file (either via the CVTSPLFXML command or via the X-function in AFC) the job might stop with an error message: AFC5026 Error running finishing definition xxxxxx (R I). The reason can e.g. be an invalid Xpath expression, which is covered below:

 

You will find more information in the joblog under the second level information for the message: Error calculating 1 xpath expression(s). The additional information will explain in details e.g.:

 

Message . . . . :   Error calculating 1 xpath expression(s).          

Error 'System function substring() cannot be called with one argument'

calculating xpath expression 'substring(212123)'.

 

So you need to go back to the definition and correct the errors before retrying the definition.  

 

In case of Xpath errors: The problem nodes in the output XML file are also marked to make it easier to find and solve the problems:

 

<?xml version="1.0" encoding="UTF-8"?>

  <Root>

     <Test>

          <Field1>Herr+exit</Field1>

          <Field2>Seaw+exit</Field2>

          <Field3>9000+exit</Field3>

          <XpathError>@XPATH-EXPRESSION:  ,substring(212123)</XpathError>

     </Test>

  </Root>