Path: blob/master/libs/xslt/libxslt/numbersInternals.h
4393 views
/*1* Summary: Implementation of the XSLT number functions2* Description: Implementation of the XSLT number functions3*4* Copy: See Copyright for the status of this software.5*6* Author: Bjorn Reese <[email protected]> and Daniel Veillard7*/89#ifndef __XML_XSLT_NUMBERSINTERNALS_H__10#define __XML_XSLT_NUMBERSINTERNALS_H__1112#include <libxml/tree.h>13#include "xsltexports.h"1415#ifdef __cplusplus16extern "C" {17#endif1819struct _xsltCompMatch;2021/**22* xsltNumberData:23*24* This data structure is just a wrapper to pass xsl:number data in.25*/26typedef struct _xsltNumberData xsltNumberData;27typedef xsltNumberData *xsltNumberDataPtr;2829struct _xsltNumberData {30const xmlChar *level;31const xmlChar *count;32const xmlChar *from;33const xmlChar *value;34const xmlChar *format;35int has_format;36int digitsPerGroup;37int groupingCharacter;38int groupingCharacterLen;39xmlDocPtr doc;40xmlNodePtr node;41struct _xsltCompMatch *countPat;42struct _xsltCompMatch *fromPat;4344/*45* accelerators46*/47};4849/**50* xsltFormatNumberInfo,:51*52* This data structure lists the various parameters needed to format numbers.53*/54typedef struct _xsltFormatNumberInfo xsltFormatNumberInfo;55typedef xsltFormatNumberInfo *xsltFormatNumberInfoPtr;5657struct _xsltFormatNumberInfo {58int integer_hash; /* Number of '#' in integer part */59int integer_digits; /* Number of '0' in integer part */60int frac_digits; /* Number of '0' in fractional part */61int frac_hash; /* Number of '#' in fractional part */62int group; /* Number of chars per display 'group' */63int multiplier; /* Scaling for percent or permille */64char add_decimal; /* Flag for whether decimal point appears in pattern */65char is_multiplier_set; /* Flag to catch multiple occurences of percent/permille */66char is_negative_pattern;/* Flag for processing -ve prefix/suffix */67};6869#ifdef __cplusplus70}71#endif72#endif /* __XML_XSLT_NUMBERSINTERNALS_H__ */737475