Use Google to find help fast. For example, search on "xpressdox choosefromlist".

The Gender Function

The Gender Function

Generic documents such as contracts often have numerous places where the construct “his/her” appears, or perhaps “his” is used in the document and a preamble has words to the effect of  “masculine usage includes feminine and singular includes plural”.

With document assembly, and XpressDox in particular, the template can provide instructions in conditional assembly which can insert the correct gender-related pronouns in the places where they are required.

Singular

Suppose a data element called PartyGender will have the value “Male” when the party is male, and “Female” when the party is female (perhaps by use of the <<ChooseFromRDBList(PartyGender,Female,Male)>> command)

The  Gender function would be used in this way:

Care must be taken to include <<Gender(PartyGender,1,'his,her')>> contact details.

or

We will endeavour to send the contract to <<Gender(PartyGender,1,'him,her')>> within 5 working days.

Plurals and Neuter

The reason for the 1 in the parameter list is that the Gender function caters for plurals as well as gender.  In fact, the function also accommodates “neuter” gender.  An example would be:

<<ChooseFromRDBList(PartyGender,Male,Female,Entity)>>
Please make sure to include <<Gender(PartyGender,1,'his,her,its')>> contact details.

In the case where one or more parties is involved, then the need to cater for plurals becomes evident.  A snippet of a template might look like:

The parties are: <<ForEach(Party)>><<When(position() > 1, and )>><<Name>> <<ChooseFromRDBList(PartyGender,Male,Female,Entity)>> <<End()>>

Please make sure to include <<Gender(Party[1]/PartyGender, count(Party),'his,her,its,their')>> contact details.

It is sufficient to use the PartyGender that applies to the first Party (i.e. Party[1]/PartyGender) , because this value is relevant only when there is only one party.

Using Boolean (true/false) values instead of a count

Depending on the source of the data, or the decision of the template author, the use of the singular or plural might not depend on the number of a repeating item, but rather on the value captured by the user in the interview (or in data sourced outside the interview where the template author has no control over the format, such as in data retrieved from a data source). In this case a “boolean expression” can be specified instead of a count. For example:

<<ChooseUsingCheckBox(OnlyOneParty,Y,N)>>
Please make sure to include <<Gender(PartyGender,(OnlyOneParty = 'Y'),'his,her,its,their')>> contact details.

Other languages and codes

The above examples have all pre-supposed that the PartyGender code is either “Male” or “Female”.  Which is fine for English data.  But suppose the data are captured, or sourced from a data source, where the code for masculine or feminine is not Male/Female, but something like “Manlik” and “Vroulik”.

XpressDox can still render the correct English (or other language) pronouns using the Gender command, as follows:

<<ChooseFromRDBList(PartyGender,Manlik,Vroulik,Ander)>>
Please make sure to include <<Gender(PartyGender,1,'his,her,its','Manlik,Vroulik,Ander')>> contact details.

There are additional sets of values for PartyGender (i.e. in addition to the “Male”/”Female” pair) which will be recognised implicitly by XpressDox (i.e. without having to include them as the last parameter to the Gender function), they are:

M: male and F: female
1: male and 0: female
Y:male and X:female

So that, for example

<<ChooseFromRDBList(PartyGender,Y~~Male,X~~Female,E~~Entity)>>
Please make sure to include <<Gender(PartyGender,1,'his,her,its')>> contact details.

will function correctly.

Note that the sets of codes above cannot be mixed, in other words, <<ChooseFromRDBList(PartyGender,Male,F)>>
and then
<<Gender(PartyGender,1,'his,her,its')>>
will result in “its” being returned if the user chose “F” in the RDB list.

Leave a Reply