use ctxt->standalone = -2 to indicate that the XMLDecl was parsed but no * parser.c: use ctxt->standalone = -2 to indicate that the XMLDecl was parsed but no standalone attribute was found, suggested by Michael Day to detect if an XMLDecl was found. Daniel