fragments are now zero-indexed
rewrite fragment index attributes to leave no gaps between fragments
respect original dom order of fragments with no explicit index