# File temp/entity.rb, line 35
                def initialize stream, value=nil, parent=nil, reference=false
                        super(parent)
                        @ndata = @pubid = @value = @external = nil
                        if stream.kind_of? Array
                                @name = stream[1]
                                if stream[-1] == '%'
                                        @reference = true 
                                        stream.pop
                                else
                                        @reference = false
                                end
                                if stream[2] =~ /SYSTEM|PUBLIC/
                                        @external = stream[2]
                                        if @external == 'SYSTEM'
                                                @ref = stream[3]
                                                @ndata = stream[4] if stream.size == 5
                                        else
                                                @pubid = stream[3]
                                                @ref = stream[4]
                                        end
                                else
                                        @value = stream[2]
                                end
                        else
                                @reference = reference
                                @external = nil
                                @name = stream
                                @value = value
                        end
                end