} // Default ctor for default info. public XslDecimalFormat(Compiler c) { XPathNavigator n = c.Input; IXmlLineInfo li = n as IXmlLineInfo; if (li != null) { lineNumber = li.LineNumber; linePosition = li.LinePosition; } baseUri = n.BaseURI; if (n.MoveToFirstAttribute()) { do { if (n.NamespaceURI != String.Empty) { continue; } switch (n.LocalName) { case "name": break; // already handled case "decimal-separator": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT decimal-separator value must be exact one character", null, n); } info.NumberDecimalSeparator = n.Value; break; case "grouping-separator": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT grouping-separator value must be exact one character", null, n); } info.NumberGroupSeparator = n.Value; break; case "infinity": info.PositiveInfinitySymbol = n.Value; break; case "minus-sign": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT minus-sign value must be exact one character", null, n); } info.NegativeSign = n.Value; break; case "NaN": info.NaNSymbol = n.Value; break; case "percent": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT percent value must be exact one character", null, n); } info.PercentSymbol = n.Value; break; case "per-mille": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT per-mille value must be exact one character", null, n); } info.PerMilleSymbol = n.Value; break; case "digit": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT digit value must be exact one character", null, n); } digit = n.Value [0]; break; case "zero-digit": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT zero-digit value must be exact one character", null, n); } zeroDigit = n.Value [0]; break; case "pattern-separator": if (n.Value.Length != 1) { throw new XsltCompileException("XSLT pattern-separator value must be exact one character", null, n); } patternSeparator = n.Value [0]; break; } }while (n.MoveToNextAttribute()); n.MoveToParent(); info.NegativeInfinitySymbol = info.NegativeSign + info.PositiveInfinitySymbol; } }