# File nqxml/document.rb, line 25
 def addToProlog(entity)
	    @prolog << entity
	    if entity.instance_of?(Doctype)

		# Although this check is performed by the tree parser, we
		# check again here. The document's creation may be in the
		# hands of someone (or something) else.
		raise ParserError.new("DOCTYPE already defined") if @doctype

		@doctype = entity
	    end
	end