1 | /*
|
---|
2 | * Summary: Implementation of the XSLT number functions
|
---|
3 | * Description: Implementation of the XSLT number functions
|
---|
4 | *
|
---|
5 | * Copy: See Copyright for the status of this software.
|
---|
6 | *
|
---|
7 | * Author: Bjorn Reese <[email protected]> and Daniel Veillard
|
---|
8 | */
|
---|
9 |
|
---|
10 | #ifndef __XML_XSLT_NUMBERSINTERNALS_H__
|
---|
11 | #define __XML_XSLT_NUMBERSINTERNALS_H__
|
---|
12 |
|
---|
13 | #include <libxml/tree.h>
|
---|
14 | #include "xsltexports.h"
|
---|
15 |
|
---|
16 | #ifdef __cplusplus
|
---|
17 | extern "C" {
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * xsltNumberData:
|
---|
22 | *
|
---|
23 | * This data structure is just a wrapper to pass xsl:number data in.
|
---|
24 | */
|
---|
25 | typedef struct _xsltNumberData xsltNumberData;
|
---|
26 | typedef xsltNumberData *xsltNumberDataPtr;
|
---|
27 |
|
---|
28 | struct _xsltNumberData {
|
---|
29 | const xmlChar *level;
|
---|
30 | const xmlChar *count;
|
---|
31 | const xmlChar *from;
|
---|
32 | const xmlChar *value;
|
---|
33 | const xmlChar *format;
|
---|
34 | int has_format;
|
---|
35 | int digitsPerGroup;
|
---|
36 | int groupingCharacter;
|
---|
37 | int groupingCharacterLen;
|
---|
38 | xmlDocPtr doc;
|
---|
39 | xmlNodePtr node;
|
---|
40 |
|
---|
41 | /*
|
---|
42 | * accelerators
|
---|
43 | */
|
---|
44 | };
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * xsltFormatNumberInfo,:
|
---|
48 | *
|
---|
49 | * This data structure lists the various parameters needed to format numbers.
|
---|
50 | */
|
---|
51 | typedef struct _xsltFormatNumberInfo xsltFormatNumberInfo;
|
---|
52 | typedef xsltFormatNumberInfo *xsltFormatNumberInfoPtr;
|
---|
53 |
|
---|
54 | struct _xsltFormatNumberInfo {
|
---|
55 | int integer_hash; /* Number of '#' in integer part */
|
---|
56 | int integer_digits; /* Number of '0' in integer part */
|
---|
57 | int frac_digits; /* Number of '0' in fractional part */
|
---|
58 | int frac_hash; /* Number of '#' in fractional part */
|
---|
59 | int group; /* Number of chars per display 'group' */
|
---|
60 | int multiplier; /* Scaling for percent or permille */
|
---|
61 | char add_decimal; /* Flag for whether decimal point appears in pattern */
|
---|
62 | char is_multiplier_set; /* Flag to catch multiple occurences of percent/permille */
|
---|
63 | char is_negative_pattern;/* Flag for processing -ve prefix/suffix */
|
---|
64 | };
|
---|
65 |
|
---|
66 | #ifdef __cplusplus
|
---|
67 | }
|
---|
68 | #endif
|
---|
69 | #endif /* __XML_XSLT_NUMBERSINTERNALS_H__ */
|
---|