ISO/IEC PRF 23360-1-4
(Main)Linux Standard Base (LSB)
Linux Standard Base (LSB)
Noyau de base normalisé Linux (LSB)
General Information
RELATIONS
Standards Content (sample)
INTERNATIONAL ISO/IEC
STANDARD 23360-1-4
First edition
2021-08
Linux Standard Base (LSB) —
Part 1-4:
Languages specification
Reference number
ISO/IEC 23360-1-4:2021(E)
ISO/IEC 2021
---------------------- Page: 1 ----------------------
ISO/IEC 23360-1-4:2021(E)
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2021
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting
on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address
below or ISO’s member body in the country of the requester.ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2021 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 23360-1-4:2021(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical
committees established by the respective organization to deal with particular fields of technical activity.
ISO and IEC technical committees collaborate in fields of mutual interest. Other international
organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the
work.The procedures used to develop this document and those intended for its further maintenance are
described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the
different types of document should be noted (see www.iso.org/directives orwww.iec.ch/members_experts/refdocs).
Attention is drawn to the possibility that some of the elements of this document may be the subject of
patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Details
of any patent rights identified during the development of the document will be in the Introduction and/or
on the ISO list of patent declarations received (see www.iso.org/patents) or the IEC list of patent
declarations received (see patents.iec.ch).Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and
expressions related to conformity assessment, as well as information about ISO's adherence to the World
Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT),see www.iso.org/iso/foreword.html. In the IEC, see www.iec.ch/understanding-standards.
This document was prepared by the Linux Foundation [as Linux Standard Base (LSB): Languages
specification] and drafted in accordance with its editorial rules. It was assigned to Joint Technical
Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages, their
environments and system software interfaces, and adopted by National Bodies.This first edition of ISO/IEC 23360-1-4 cancels and replaces ISO/IEC 23360-1:2006, which has been
technically revised.A list of all parts in the ISO/IEC 23660 series can be found on the ISO and IEC websites.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html and www.iec.ch/national-
committees.© ISO/IEC 2021 – All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC 23360-1-4:2021(E)
Contents
Foreword ...................................................................................................................................................... iii
Introduction ................................................................................................................................................ . v
I Introductory Elements ............................................................................................................................. 1
1 Scope ................................................................................................................................................................ 2
2 Normative References............................................................................................................................... 3
3 Requirements ............................................................................................................................................... 4
3.1 Relevant Libraries ................................................................................................................................ 4
4 Terms and Definitions .............................................................................................................................. 5
5 Documentation Conventions ................................................................................................................. 7
II Python Interpreter ................................................................................................................................... 8
6 Python Interpreter ..................................................................................................................................... 9
6.1 Introduction ............................................................................................................................................ 9
6.2 Python Interpreter Location ............................................................................................................ 9
6.3 Python Interpreter Version .............................................................................................................. 9
6.4 Operators and Functions ................................................................................................................... 9
6.5 Python Modules .................................................................................................................................... 9
6.6 Python Interpreter Command ........................................................................................................ 9
III Perl Interpreter ..................................................................................................................................... 15
7 Perl Interpreter .......................................................................................................................................... 16
7.1 Introduction .......................................................................................................................................... 16
7.2 Perl Interpreter Location ................................................................................................................ 16
7.3 Perl Interpreter Version .................................................................................................................. 16
7.4 Perl Operators and Functions ....................................................................................................... 16
7.5 Perl Modules ......................................................................................................................................... 16
7.6 Perl Interpreter Command ............................................................................................................. 19
IV XML2 library ........................................................................................................................................... 20
8 Libraries ........................................................................................................................................................ 21
8.1 Interfaces for libxml2........................................................................................................................ 21
8.2 Data Definitions for libxml2........................................................................................................... 49
V XSLT library ........................................................................................................................................... 126
9 Libraries ..................................................................................................................................................... 127
9.1 Interfaces for libxslt ........................................................................................................................ 127
9.2 Data Definitions for libxslt ........................................................................................................... 132
VI Package Format and Installation ................................................................................................. 151
10 Software Installation ...................................................................................................................... 152
10.1 Package Dependencies ............................................................................................................... 152
Annex A Alphabetical Listing of Interfaces by Library .............................................................. 153
A.1 libxml2 ........................................................................................................................................................... 153
A.2 libxslt .............................................................................................................................................................. 181
iv © 2021 ISO/IEC – All rights reserved---------------------- Page: 4 ----------------------
ISO/IEC 23360-1-4:2021(E)
Introduction
The LSB defines a binary interface for application programs that are compiled
and packaged for LSB-conforming implementations on many different hardware
architectures. A binary specification must include information specific to the
computer processor architecture for which it is intended. To avoid the complexity
of conditional descriptions, the specification has instead been divided intogeneric parts which are augmented by one of several architecture-specific parts,
depending on the target processor architecture; the generic part will indicate
when reference must be made to the architecture part, and vice versa.
This document should be used in conjunction with the documents it references.
This document enumerates the system components it includes, but descriptions
of those components may be included entirely or partly in this document, partly
in other documents, or entirely in other reference documents. For example, the
section that describes system service routines includes a list of the system
routines supported in this interface, formal declarations of the data structures
they use that are visible to applications, and a pointer to the underlying
referenced specification for information about the syntax and semantics of each
call. Only those routines not described in standards referenced by this document,
or extensions to those standards, are described in the detail. Informationreferenced in this way is as much a part of this document as is the information
explicitly included here.
The specification carries a version number of either the form x.y or x.y.z. This
version number carries the following meaning:
1. The first number (x) is the major version number. Versions sharing the same
major version number shall be compatible in a backwards direction; that is,
a newer version shall be compatible with an older version. Any deletion of
a library results in a new major version number. Interfaces marked as
deprecated may be removed from the specification at a major version
change.
2. The second number (y) is the minor version number. Libraries and
individual interfaces may be added, but not removed. Interfaces may be
marked as deprecated at a minor version change. Other minor changes may
be permitted at the discretion of the LSB workgroup.
3. The third number (z), if present, is the editorial level. Only editorial changes
should be included in such versions.Since this specification is a descriptive Application Binary Interface, and not a
source level API specification, it is not possible to make a guarantee of 100%backward compatibility between major releases. However, it is the intent that
those parts of the binary interface that are visible in the source level API will
remain backward compatible from version to version, except where a featuremarked as "Deprecated" in one release may be removed from a future release.
Implementors are strongly encouraged to make use of symbol versioning to
permit simultaneous support of applications conforming to different releases of
this specification.
LSB is a trademark of the Linux Foundation. Developers of applications or
implementations interested in using the trademark should see the Linux
Foundation Certification Policy for details.
© 2021 ISO/IEC – All rights reserved
---------------------- Page: 5 ----------------------
ISO/IEC 23360-1-4:2021(E)
I Introductory Elements
© 2021 ISO/IEC – All rights reserved 1
---------------------- Page: 6 ----------------------
ISO/IEC 23360-1-4:2021(E)
1 Scope
The LSB Languages specification defines components for runtime languages
which are found on an LSB conforming system.
2 © 2021 ISO/IEC – All rights reserved
---------------------- Page: 7 ----------------------
ISO/IEC 23360-1-4:2021(E)
2 Normative References
The specifications listed below are referenced in whole or in part by the LSB
Languages specification. Such references may be normative or informative; a
reference to specification shall only be considered normative if it is explicitly cited
as such. The LSB Languages specification may make normative references to aportion of these specifications (that is, to define a specific function or group of
functions); in such cases, only the explicitly referenced portion of the specification
is to be considered normative.Table 2-1 Informative References
Name Title URL
ISO C (1999) ISO/IEC 9899:1999 -
Programming
Languages -- C
Perl Core Modules Perl 5.8.8 Core Modules http://perldoc.perl.org
/5.8.8/index-modules-
A.html
Perl Functions Perl 5.8.8 Functions http://perldoc.perl.org
/5.8.8/perlfunc.html
Perl Language Perl 5.8.8 Language http://perldoc.perl.org
Reference Reference /5.8.8/index-
language.html
Perl Manual Perl 5.8.8 Manual Page http://perldoc.perl.org
/5.8.8/perlrun.html
Perl Operators Perl 5.8.8 Operators and http://perldoc.perl.org
Precedence /5.8.8/perlop.html
Perl Syntax Perl 5.8.8 Syntax http://perldoc.perl.org
/5.8.8/perlsyn.html
Python Library Python Library http://www.python.or
Reference Reference Release 2.4.2 g/doc/2.4.2/lib/lib.ht
Python Reference Python Reference http://www.python.or
Manual Manual Release 2.4.2 g/doc/2.4.2/ref/ref.ht
Reference Manual for Reference Manual for http://xmlsoft.org/ht
libxml2 libxml2 ml/index.html
Reference Manual for Reference Manual for http://xmlsoft.org/xslt
libxslt libxslt /html/index.html
© 2021 ISO/IEC – All rights reserved 3
---------------------- Page: 8 ----------------------
ISO/IEC 23360-1-4:2021(E)
3 Requirements
This specification describes runtime language interpreters which shall be found
in specified locations. It also defines a number of runtime modules which shall
be in an implementation-defined directory which the interpreters shall search by
default.
3.1 Relevant Libraries
The libraries listed in Table 3-1 shall be available on a Linux Standard Base system,
with the specified runtime names. This list may be supplemented or amended bythe architecture-specific specification.
Table 3-1 Standard Library Names
Library Runtime Name
libxml2 libxml2.so.2
libxslt libxslt.so.1
These libraries will be in an implementation-defined directory which the
dynamic linker shall search by default.
4 © 2021 ISO/IEC – All rights reserved
---------------------- Page: 9 ----------------------
ISO/IEC 23360-1-4:2021(E)
4 Terms and Definitions
For the purposes of this document, the terms and definitions given in ISO/IEC
2382, ISO 80000–2, and the following apply.
ISO and IEC maintain terminological databases for use in standardization at the
following addresses:
— ISO Online browsing platform: available at https://www.iso.org/obp
— IEC Electropedia: available at http://www.electropedia.org/
4.1
archLSB
Some LSB specification documents have both a generic, architecture-neutral
part and an architecture-specific part. The latter describes elements whose
definitions may be unique to a particular processor architecture. The term
archLSB may be used in the generic part to refer to the corresponding section
of the architecture-specific part.
4.2
Binary Standard, ABI
The total set of interfaces that are available to be used in the compiled binary
code of a conforming application, including the run-time details such ascalling conventions, binary format, C++ name mangling, etc.
4.3
Implementation-defined
Describes a value or behavior that is not defined by this document but is
selected by an implementor. The value or behavior may vary among
implementations that conform to this document. An application should not
rely on the existence of the value or behavior. An application that relies on
such a value or behavior cannot be assured to be portable across conforming
implementations. The implementor shall document such a value or behavior
so that it can be used correctly by an application.
4.4
Shell Script
A file that is read by an interpreter (e.g., awk). The first line of the shell script
includes a reference to its interpreter binary.© 2021 ISO/IEC – All rights reserved 5
---------------------- Page: 10 ----------------------
ISO/IEC 23360-1-4:2021(E)
4.5
Source Standard, API
The total set of interfaces that are available to be used in the source code of a
conforming application. Due to translations, the Binary Standard and theSource Standard may contain some different interfaces.
4.6
Undefined
Describes the nature of a value or behavior not defined by this document
which results from use of an invalid program construct or invalid data input.
The value or behavior may vary among implementations that conform to this
document. An application should not rely on the existence or validity of the
value or behavior. An application that relies on any particular value or
behavior cannot be assured to be portable across conforming
implementations.
4.7
Unspecified
Describes the nature of a value or behavior not specified by this document
which results from use of a valid program construct or valid data input. The
value or behavior may vary among implementations that conform to this
document. An application should not rely on the existence or validity of the
value or behavior. An application that relies on any particular value or
behavior cannot be assured to be portable across conforming
implementations.
In addition, for the portions of this specification which build on IEEE Std 1003.1-
2001, the definitions given in IEEE Std 1003.1-2001, Base Definitions, Chapter 3apply.
6 © 2021 ISO/IEC – All rights reserved
---------------------- Page: 11 ----------------------
ISO/IEC 23360-1-4:2021(E)
5 Documentation Conventions
Throughout this document, the following typographic conventions are used:
function()
the name of a function
command
the name of a command or utility
CONSTANT
a constant value
parameter
a parameter
variable
a variable
Throughout this specification, several tables of interfaces are presented. Each
entry in these tables has the following format:
name
the name of the interface
(symver)
An optional symbol version identifier, if required.
[refno]
A reference number indexing the table of referenced specifications that
follows this table.
For example,
forkpty(GLIBC_2.0) [SUSv4]
refers to the interface named forkpty() with symbol version GLIBC_2.0 that is
defined in the reference indicated by the tag SUSv4.
Note: For symbols with versions which differ between architectures, the symbol
versions are defined in the architecture specific parts of of this module specification
only. In the generic part, they will appear without symbol versions.© 2021 ISO/IEC – All rights reserved 7
---------------------- Page: 12 ----------------------
ISO/IEC 23360-1-4:2021(E)
II Python Interpreter
8 © 2021 ISO/IEC – All rights reserved
---------------------- Page: 13 ----------------------
ISO/IEC 23360-1-4:2021(E)
6 Python Interpreter
6.1 Introduction
The Python intrepreter API is described in the Python Library Reference, with
the following requirements for an LSB conforming runtime.
6.2 Python Interpreter Location
The Python interpreter binary, or a link to the binary, shall exist at
/usr/bin/python.
6.3 Python Interpreter Version
The default installed Python version shall be 2.4.2 or greater.
6.4 Operators and Functions
Core Python operators, subroutines, and built-in functions shall be present and
shall operate as defined in Python Reference Manual.
6.5 Python Modules
An LSB conforming implementation shall provide the Python modules as
described in Table 6-1 with at least the behavior described as mandatory in the
referenced underlying specification. Some Python modules may be marked as
deprecated, and applications should avoid using these as they may be withdrawn
in future releases of this specification.
Table 6-1 Python Modules
array [1] csv [1] imp [1] posix [1] sys [1]
binascii [1] datetime [1] itertools [1] pwd [1] syslog [1]
bisect [1] errno [1] locale [1] random [1] termios [1]
cPickle [1] exceptions marshal [1] re [1] thread [1]
[1]
cStringIO [1] fcntl [1] mmap [1] resource [1] time [1]
cmath [1] gc [1] operator [1] select [1] unicodedata
[1]
codecs [1] grp [1] os [1] signal [1] weakref [1]
collections heapq [1] ossaudiodev socket [1] zipimport [1]
[1] [1]
crypt [1] hotshot [1] parser [1] string [1] zlib [1]
Referenced Specification(s)
[1]. Python Reference Manual
6.6 Python Interpreter Command
This section contains a description of the python command.
© 2021 ISO/IEC – All rights reserved 9
---------------------- Page: 14 ----------------------
ISO/IEC 23360-1-4:2021(E)
PYTHON
Name
python — an interpreted, interactive, object-oriented programming language
Synopsis
python [-d ] [-E ] [-h ] [-i ] [ -m module-name ] [-O ] [ -Q argument ] [-
S ] [-t ] [-u ] [-v ] [-V ] [ -W argument ] [-x ] [ -c command | script |
- ] [arguments]
DESCRIPTION
Python is an interpreted, interactive, object-oriented programming language that
combines remarkable power with very clear syntax. For an introduction to
programming in Python you are referred to the Python Tutorial. The Python
Library Reference documents built-in and standard types, constants, functions
and modules. Finally, the Python Reference Manual describes the syntax and
semantics of the core language in (perhaps too) much detail. (These documents
may be located via the INTERNET RESOURCES below; they may be installed on
your system as well.)
Python's basic power can be extended with your own modules written in C or
C++. On most systems such modules may be dynamically loaded. Python is also
adaptable as an extension language for existing applications. See the internal
documentation for hints.
Documentation for installed Python modules and packages can be viewed by
running the pydoc program.
COMMAND LINE OPTIONS
-c command
Specify the command to execute (see next section). This terminates the option
list (following options are passed as arguments to the command).
Turn on parser debugging output (for wizards only, depending on
compilation options).
Ignore environment variables like PYTHONPATH and PYTHONHOME
that modify the behavior of the interpreter.
Prints the usage for the interpreter executable and exits.
When a script is passed as first argument or the -c option is used, enter
interactive mode after executing the script or the command. It does not read
the $PYTHONSTARTUP file. This can be useful to inspect global variables
or a stack trace when a script raises an exception.
-m module-name
10 © 2021 ISO/IEC – All rights reserved
---------------------- Page: 15 ----------------------
ISO/IEC 23360-1-4:2021(E)
Searches sys.path for the named module and runs the corresponding .py file
as a script.
Turn on basic optimizations. This changes the filename extension for
compiled (bytecode) files from .pyc to .pyo. Given twice, causes docstrings
to be discarded.
-Q argument
Division control; see PEP 238. The argument must be one of "old" (the default,
int/int and long/long return an int or long), "new" (new division semantics,
i.e. int/int and long/long returns a float), "warn" (old division semantics
with a warning for int/int and long/long), or "warnall" (old division
semantics with a warning for all use of the division operator). For a use of
"warnall", see the Tools/scripts/fixdiv.py script.
Disable the import of the module site and the site-dependent manipulations
of sys.path that it entails.
Issue a warning when a source file mixes tabs and spaces for indentation in
a way that makes it depend on the worth of a tab expressed in spaces. Issue
an error when the option is given twice.
Force stdin, stdout and stderr to be totally unbuffered. On systems where it
matters, also put stdin, stdout and stderr in binary mode. Note that there is
internal buffering in xreadlines(), readlines() and file-object iterators ("for
line in sys.stdin") which is not influenced by this option. To work around
this, you will want to use "sys.stdin.readline()" inside a "while 1:" loop.
Print a message each time a module is initialized, showing the place
(filename or built-in module) from which it is loaded. When given twice,
print a message for each file that is checked for when searching for a module.
Also provides information on module cleanup at exit.
Prints the Python version number of the executable and exits.
-W argument
Warning control. Python sometimes prints warning message to sys.stderr. A
typical warning message has the following form: file:line: category: message.
By default, each warning is printed once for each source line where it occurs.
This option controls how often warnings are printed. Multiple -W options
may be given; when a warning matches more than one option, the action for
the last matching option is performed. Invalid -W options are ignored (a
warning message is printed about invalid options when the first warning is
issued). Warnings can also be controlled from within a Python program
using the warnings module.
© 2021 ISO/IEC – All rights reserved 11
---------------------- Page: 16 ----------------------
ISO/IEC 23360-1-4:2021(E)
The simplest form of argument is one of the following action strings (or a
unique abbreviation): ignore to ignore all warnings; default to explicitly
request the default behavior (printing each warning once per source line); all
to print a warning each time it occurs (this may generate many messages if a
warning is triggered repeatedly for the same source line, such as inside a
loop); module to print each warning only only the first time it occurs in each
module; once to print each warning only the first time it occurs in the
program; or error to raise an exception instead of printing a warning message.
The full form of argument is action:message:category:module:line. Here, action is
as explained above but only applies to messages that match the remainingfields. Empty fields match all values; trailing empty fields may be omitted.
The message field matches the start of the warning message printed; this
match is case-insensitive. The category field matches the warning category.
This must be a class name; the match test whether the actual warning
category of the message is a subclass of the specified warning category. The
full class name must be given. The module field matches the (fully-qualified)
module name; this match is case-sensitive. The line field matches the line
number, where zero matches all line numbers and is thus equivalent to an
omitted line number.
Skip the first line of the source. This is intended for a DOS specific hack only.
Warning: the line numbers in error messages will be off by one!INTERPRETER INTERFACE
The interpreter interface resembles that of the UNIX shell: when called with
standard input connected to a tty device, it prompts for commands and executes
them until an EOF is read; when called with a file name argument or with a file
as standard input, it reads and executes a script from that file; when called with -
c command, it executes the Python statement(s) given as command. Here commandmay contain multiple statements separated by newlines. Leading whitespace is
significant in Python statements! In non-interactive mode, the entire input is
parsed before it is executed.
If available, the script name and additional arguments thereafter are passed to
the script in the Python variable sys.argv , which is a list of strings (you must first
import sys to be able to access it). If no script name is given, sys.argv[0] is an empty
string; if -c is used, sys.argv[0] contains the string '-c'. Note that optionsinterpreted by the Python interpreter itself
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.