Question

I need to export forms from an Oracle Forms application to XML, but when I do this through the command line, the XML has the dimensions wrong.

I'm using the frm2xml tool provided with Oracle Forms

When the dimensions on Forms Builder (Oracle 10g) are in Points or Pixels there is no problem with the export process, But, when the dimensions are in Centimeters or Inches (decimal values) the dimensions are exported without the decimal mark (.)

On Builder

width - 19.103
Height - 9.39

On XML

Width="19103" Height="939"

The command I'm using is:
c:\swora10g\jdk\bin\java -classpath c:\swora10g\forms\java\frmxmltools.jar;c:\swora10g\forms\java\frmjdapi.jar;c:\swora10g \lib\xmlparserv2.jar;c:\swora10g\lib\xschema.jar oracle.forms.util.xmltools.Forms2XML OVERWRITE=YES "C:\SusMng\lib\ExampleForm.fmb"

I can't find any solution for this problem. I need the decimal value. It is not the regional settings on my computer, I have checked and tested it.

Thanks in Advance!

Was it helpful?

Solution

Integer types are used by design. And it's designed by Oracle that if the coordinates are inches, the size & position attributes are multiplied by 1000. So the decimal mark is not ignored and it's not a bug.

What do you use XML files for?

If you need decimal values I suggest you to divide integer values by 1000 in further processing (or if you really need decimal values in these XML files you can use XSLT transformation - a bit crazy solution ).

If you want to dig deeper or if you work a lot with such XML files, I suggest you to generate XML Schema file, so you can see the big picture of possilbe elements and attributes. To achieve this you can use the frmxmlsg.bat tool. As you can see in forms.xsd file, every size (widht, height) and position attributes are always of type integer (regardless of coordinates):

<attribute name="Width" type="int"/>
<attribute name="Height" type="int"/>
<attribute name="XPosition" type="int"/>
<attribute name="YPosition" type="int"/>

Note, that if you'll use XSLT on your file and you add decimals, your XML file won't be valid against the schema.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top