LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Show details for ContentContent
Ready-to-use samples
Hide details for Online resourcesOnline resources
Technotes and goodies
Header files
Happy readers




Hosted by Prominic.NET, Inc.
Main topic: Using the DXL exporter APIs from LotusScript

Using the DXL exporter APIs from LotusScript (by Kenneth Haggman, 01/22/2006 09:47:38 PM)

Hi Normunds.

As we both well know, LotusScript has most of the DXL covered now.

I have, however, run into a problem and I am not even sure whether this is something that can be fixed using the standard LotusScript DXL classes or if I will need to use the API's for it.

In designer, when using the menu selections Tools -> DXL Utilities -> Viewer for a form, the output produced starts with "<?xml version='1.0' encoding='utf-8'?>".

When I use the LotusScript classes to generate DXL for the same form, the output starts with "<?xml version="1.0" encoding="utf-16"?>".

With the utf-8 version, all attributes are enclosed in double quotes, as in form name="Contact".

In the utf-16 version, single quotes are used, form name='Contact'.

In my LotusScript code, I am amending the DXL in several places to contain other values. This is not a problem and works fine.

But when trying to import the amended DXL, I will get errors for certain design elements.

Forms, and other design elements as well, may well contain attribute values containing quotes. For example, the Contact form in the NAB contains the following attribute:

description='Choose Enabled if you want to request the server's certificate to verify the server's identity is the same as the server name you created the account for. Choose Disabled if you do not want to perform this extra check.'

As you see, that attribute has single quotes as delimiters, but also single quotes within it, and this will cause an error when trying to import it.

I have a number of questions here.

1. Is the single/double quotes a direct result of the utf-8/utf-16 setting?

2. Is there perhaps another way to get the DXL exporter to convert those "inner" quotes to something that won't break the importer?

3. I have tried specifying the charset in my LotusScript code when I open streams, but no matter what I do I get utf-16.

4. Is it possible, somehow, to work around these issues using the API's instead?

Thankful for any response.