D.2 Data types

D.2.1 Definitions

angle

A representation of an angle consisting of an optional " + " or " - " character immediately followed by a number immediately followed by an angle unit identifier. Angle unit identifiers are: " deg " (for degrees)" grad " (for grads), and " rad " (for radians). The specified values are normalized to the range 0deg to 360deg . A property may define additional constraints on the value.

character

A single Unicode character.

color

Either a string of characters representing a keyword or a color function defined in Section B.2.2 on page 310. The list of keyword color names is: aqua , black , blue , fuchsia , gray , green , lime , maroon , navy , olive , purple , red , silver , teal , white , and yellow .

country

A string of characters conforming to an ISO 3166 country code.

family- name

A string of characters identifying a font.

frequency

A number immediately followed by a frequency unit identifier. Frequency unit identifiers are: " Hz " (for Hertz) and " kHz " (for Kilohertz).

id

A string of characters conforming to the definition of an NCName in XML Names and unique within the stylesheet.

idref

A string of characters conforming to the definition of an NCName in XML Names and matching an ID property value used within the stylesheet.

integer

A signed integer value which consists of an optional " + " or " - " character followed by a sequence of digits. A property may define additional constraints on the value.

keep

A compound data type with the components of within-line , within-column , and within-page . The value of each component is either " auto ", " always ", or an integer .

language

A string of characters conforming to an ISO 639 3-letter code.

length

A signed length value where the length is a real number plus a unit qualification. A property may define additional constraints on the value.

length-bp-ip-direction

A compound data type, with the components of block-progression-direction and inline-progression-direction . Each component is a length . A property may define additional constraints on the values.

length-conditional

A compound data type, with length and conditionality components. The length component is a length . The conditionality component is either " discard " or " retain ". A property may define additional constraints on the values.

length-range

A compound data type, with minimum , optimum , and maximum components. Each component is a length . If minimum is greater than optimum , it will be treated as if it had been set to optimum . If maximum is less than optimum , it will be treated as if it had been set to optimum . A property may define additional constraints on the values.

name

A string of characters representing a name. It must conform to the definition of an NCName in XML Names.

number

A signed real number which consists of an optional " + " or " - " character followed by a sequence of digits followed by an optional " . " character and a sequence of digits. A property may define additional constraints on the value.

percentage

A signed real percentage which consists of an optional " + " or " - " character followed by a sequence of digits followed by an optional " . " character and a sequence of digits followed by " % ". A property may define additional constraints on the value.

script

A string of characters conforming to an ISO 15924 script code.

space

A compound data type, with minimum , optimum , maximum , precedence , and conditionality components. The minimum , optimum , and maximum components are length s. The precedence component is either " force " or an integer . The conditionality component is either " discard " or " retain ". If minimum is greater than optimum , it will be treated as if it had been set to optimum . If maximum is less than optimum , it will be treated as if it had been set to optimum .

string

A sequence of characters.

time

A number immediately followed by a time unit identifier. Time unit identifiers are " ms " (for milliseconds ) and " s " (for seconds).

uri-specification

A sequence of characters starting with " url( ", followed by optional white space, followed by an optional single quote ( ' ) or double quote ( " ) character, followed by a URI reference as defined in RFC 2396, followed by an optional single quote ( ' ) or double quote ( " ) character, followed by optional white space, followed by " ) ". The two quote characters must be the same and must both be present or absent. If the URI reference contains a single quote, the two quote characters must be present and be double quotes.

D.2.2 Relevant standards

Many of the data types refer to other standards and recommendations, listed below.

CSS2

World Wide Web Consortium. Cascading Style Sheets, level 2 (CSS2) , as amended by Errata document 2001/04/04. W3C Recommendation (http://www.w3.org/TR/1998/REC-CSS2-19980512/).

DSSSL

International Organization for Standardization, International Electrotechnical Commission. ISO/IEC 10179:1996. Document Style Semantics and Specification Language (DSSSL) . International Standard.

ICC

International Color Consortium. Specification ICC.1:1998-09, File Format for Color Profiles (http://www.color.org/ICC-1_1998-09.PDF).

IEEE 754

Institute of Electrical and Electronics Engineers. IEEE Standard for Binary Floating-Point Arithmetic . ANSI/IEEE Std 754-1985.

ISO15924

International Organization for Standardization. ISO 15924:1998. Code for the representation of names of scripts . Draft International Standard.

ISO31

International Organization for Standardization. ISO 31:1992, Amended 1998. Quantities and units . International Standard.

JLS

J. Gosling, B. Joy, and G. Steele. The Java Language Specification (http://java.sun.com/docs/books/jls/index.html).

OpenType

Microsoft, Adobe. OpenType specification v.1.2 (http://www.microsoft.com/truetype/tt/tt.htm).

RDF

World Wide Web Consortium. Resource Description Framework (RDF) Model and Syntax Specification . W3C Recommendation (http://www.w3.org/TR/REC-rdf-syntax/).

RFC 2070

IETF. RFC 2070. Internationalization of the Hypertext Markup Language (http://www.ietf.org/rfc/rfc2070.txt).

RFC 2119

IETF. RFC 2119. Key words for use in RFCs to Indicate Requirement Levels (http://www.ietf.org/rfc/rfc2119.txt).

RFC 2396

IETF. RFC 2396. Uniform Resource Identifiers (URI): Generic Syntax (http://www.ietf.org/rfc/rfc2396.txt).

RFC3066

IETF. RFC 3066. Tags for the Identification of Languages (http://www.ietf.org/rfc/rfc3066.txt).

sRGB

Anderson, M., Motta, R., Chandrasekar, S., and Stokes, M. A Standard Default Color Space for the Internet sRGB (http://www.w3.org/Graphics/Color/sRGB.html).

UNICODE

Unicode Consortium. The Unicode Standard, Version 3.0 (http://www.unicode.org/unicode/uni2book/u2.html).

UNICODE Character Database

Unicode Consortium. Unicode Character Database (http://www.unicode.org/Public/UNIDATA/).

UNICODE TR20

Unicode Consortium. D rst, Martin and Freytag, Asmus. Unicode Technical Report #20. Unicode in XML and other Markup Languages Unicode Technical Report (http://www.unicode.org/unicode/ reports /tr20/).

UNICODE UAX #9

Unicode Consortium. The Unicode Standard, Version 3.1.0. Unicode Standard Annex #9: The Bidirectional Algorithm (http://www.unicode.org/unicode/reports/tr9/).

XML

World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation (http://www.w3.org/TR/2000/REC-xml-20001006).

XML Names

World Wide Web Consortium. Namespaces in XML. W3C Recommendation (http://www.w3.org/TR/REC-xml-names/).

XPath

World Wide Web Consortium. XML Path Language. W3C Recommendation (http://www.w3.org/TR/xpath).

XSLT

World Wide Web Consortium. XSL Transformations (XSLT). W3C Recommendation (http://www.w3.org/TR/xslt).

D.2.3 XSLT format tokens

A token can be used to represent how numbers are to be rendered as a sequence of characters.

  • It can be used for xsl:number in XSLT.

  • It can be used for page numbering in XSL-FO.

  • The representation of the numbers, the format of the separator sequences between multiple numbers, and the format of the terminator sequence can all be specified using attributes that accept attribute value templates.

  • A token may be omitted to indicate decimal.

    • The default presentation is with a period as the separator (not terminator) sequence.

The format=" token " attribute specifies the counting scheme to be used when formatting the value.

  • format="1" gives 1, 2, ..., 9, 10, 11, ..., 99, 100, 101, ...

  • format="01" gives 01, 02, ..., 09, 10, ..., 99, 100, ...

    • Each "0" prefix is a zero-fill indication for number values formatted shorter than the length of the format string.

    • grouping-separator="," specifies the character between groups of digits.

    • grouping-size="3" specifies the number of digits in each group (e.g. the value of 3 gives "1,000,000").

  • format="a" gives a, b, ..., z, a, ab, ac, ...

  • format="A" gives A, B, ... Z, AA, AB, AC, ...

    • lang specifies the alphabet to be used when numbering with an alphabetic sequence.

    • The range of values as the same as for the xml:lang attribute in XML 1.0.

  • format="i" gives i, ii, iii, iv, v, ..., ix, x, xi, ...

  • format="I" gives I, II, III, IV, V, ..., IX, X, XI, ...

  • format=" a-Unicode-character " specifies a translation.

    • It converts the number into a representation based upon a specific language or character set.

    • The XSLT Recommendation lists a number of examples of Unicode characters representing specific conversions such as Katakana (regular and "iroha" orderings), Thai, Hebrew, Greek, Old Slavic, etc.

    • letter-value ="alphabetic" and letter-value="traditional" are used for ambiguous distinctions.

      • These distinguish between numbering schemes in those languages where the first character of the sequence is ambiguous.

      • This is unlike English where the different first characters of " a " and " i " distinguish alphabetic and roman numeral formats.



Definitive XSL-FO
Definitive XSL-FO
ISBN: 0131403745
EAN: 2147483647
Year: 2002
Pages: 99
Authors: G. Ken Holman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net