XPath Expressions in Multiple Language Environments
Text Attributes
Most table elements contain a text
attribute that contains the information as it would appear in a
pivot table in the current output language. For example, the column
in a frequency table that contains counts is labeled Frequency in English but Frecuencia in Spanish.
For XPath expressions that need to work in a multiple language
environment, it is recommended to use the text_eng
attribute, whose value is the English value of the text
attribute regardless of the output language.
For example, in the case of Frequency discussed above the associated text_eng
attribute would always have the value 'Frequency'
, so your XPath expression would contain @text_eng='Frequency'
instead of @text='Frequency'
. The OATTRS
subcommand
of the SET
command specifies
whether text_eng
attributes are
included in OXML output. See the topic XVERSION and OATTRS Subcommands for more information.
Positional Arguments
For many table types you can use positional arguments that are
not affected by output language. For example, in a frequency table
the column that contains counts is always the first column, so a positional
argument of category[1]
at the
appropriate level of the tree structure should always select information
in the column that contains counts.
In some table types, however, the elements in the table
and order of elements in the table can vary. For example, the order
of statistics in the columns or rows of table subtype "Report" generated
by the MEANS
command is determined
by the specified order of the statistics on the CELLS
subcommand. In fact, two tables of this type may
not even display the same statistics at all. So category[1]
might select the category that contains mean
values in one table, median values in another table, and nothing at
all in another table.