void SortRegions(vector<PSMILRegionElement*>& regions, PSMILElement* parent)
{
	ASSERT(0);
#if 0
	UPOSITION pos = parent->m_childList.GetHeadPosition();
	while (pos)
	{
		CPSMILElementImpl* pElement = (CPSMILElementImpl*)parent->m_childList.GetNext(pos);

		CComQIPtr<ILSMILRegionElement> region = pElement->m_pNode;
		if (region)
		{
			CPSMILRegionElement* pRegionElement = (CPSMILRegionElement*)pElement;

			CComBSTR bstrZIndex;
			region->getAttribute(L"z-index", &bstrZIndex);
			if (bstrZIndex.Length())
			{
				pRegionElement->m_computedZIndex = (long)_variant_t(bstrZIndex);
			}
			else
			{
				pRegionElement->m_computedZIndex = 0;	// ? that of parent
			}

		// Insert sorted
			for (int i = 0; i < regions.GetSize(); i++)
			{
				if (pRegionElement->m_computedZIndex < regions[i]->m_computedZIndex)
				{
					//regions.InsertAt(i, pRegionElement);
					break;
				}
			/*
				the rule concerning time priority is maintained, meaning that in the case
				of a z-index conflict, the media visible in the overlap will be determined
				by the region that is rendering the media that has most recently begun in
				time. If the conflicting media began at the same time, then the rule using
				the textual order of the media elements in the SMIL document is applied
				*/
				else if (pRegionElement->m_computedZIndex == regions[i]->m_computedZIndex)
				{
					//static_cast<SMILRegionElement*>(region.p)->m_p
				}
			}

			regions.InsertAt(i, pRegionElement);
		}
	}
#endif
}
int GetTransformValuesArray(const WCHAR* str, vector<double>& values)
{
//	int len = str.GetLength();
	const WCHAR* p = str;

	while (*p && isspace(*p)) p++;	// Skip spaces

	//int i = 0;
	while (*p)
	{
		double value = getfnumber(&p);
		if (p == NULL)
		{
			values.RemoveAll();	// On error, make all values parsed so far invalid?
			return 0;
		}

			/*
		CWCharString str_value;
		while (*p && (*p != ',') && (*p != ' '))
		{
			str_value += *p;
			p++;
		}

		while (i < len && p[i] == ' ') i++;	// Skip spaces
		*/

		if (*p == L',') p++;

		//str_value.TrimRight();
		//str_value.TrimRight();

		//double value = atof(str_value);
		values.Add(value);

		while (*p && isspace(*p)) p++;	// Skip spaces
	}

	return values.GetSize();
}
	tWord32 GetSizeOfTarget() {
		return m_itrTargetSymbol->GetSize();
	}