This paper discusses the dimension of spline spaces with highest order smoothness over hierarchical T-meshes over certain type of hierarchical T-meshes. The major step is to set up a bijection between the spline space with highest order smoothness over a hierarchical T-mesh and a univariate spline space whose definition depends on the l-edges of the extended T-mesh. We decompose the univariate spline space into direct sums in the sense of isomorphism using the theory of the short exact sequence in homological algebra. According to the decomposition of the univariate spline space, the dimension formula of the spline space with highest order smoothness over certain type of hierarchical T-mesh is presented. A set of basis functions of the spline space is also constructed.