Esempio n. 1
0
  void startElement(const AttributesT& atts)
  {
    ++depth_;
    string_type base = atts.getValue(xbc_.xml_uri, xbc_.base);
    if(base.empty())
      return;

    string_type baseURI = absolutise(currentBase(), base);
    bases_.push(std::make_pair(depth_, baseURI));
  } // startElement
Esempio n. 2
0
	TokenStream::const_iterator convert(TokenStream::const_iterator begin, TokenStream::const_iterator end, Value& out)
	{
		Token first = *begin;
		auto it = begin; 
		it++;

		Value base(first.value);
		Value result(0);

		while (it != end && it->type == TOKEN_NUMBER)
		{
			result *= base;
			result += it->value;
			++it;
		}

		if (it != end && it->type == TOKEN_DECIMAL_POINT) 
		{
			//Decimal values.
			Value base(first.value);
			Value currentBase(first.value);

			++it;
			while (it != end && it->type == TOKEN_NUMBER)
			{
				Value v(it->value);
				v /= currentBase;

				result += v;
				currentBase *= base;
				++it;
			}
		}

		out = result;
		return it;
	}
Esempio n. 3
0
 string_type makeAbsolute(const string_type& spec) const
 {
   return absolutise(currentBase(), spec);
 } // makeAbsolute