added flag field to lvalue; made xmlgen_xf code stand-alone