# File nqxml/tokenizer.rb, line 528 def resolveSystemLiteral(externalId) uri = @currInput.uri basedir = uri.nil? ? nil : File.dirname(uri.path) litWIthoutQuotes = externalId.systemLiteral.sub(/\["'](.*)["']\/, '\1') uri = URI.parse(litWIthoutQuotes, basedir) if externalId.kind_of?(GeneralEntityTag) && externalId.nDataDeclName != nil # An NDATA is unparsed; read the input and return it. return uri.fetch() else body = uri.fetch() # FIX # Ignore xml preprocessor instruction. This is incorrect; # we should respect the encoding. if body =~ EXTERNAL_XML_PREPROC_REGEX body[0 .. $1.length] = '' end # Is normalizing the text the right thing to do? I don't # think so; see the table in the XML spec section 4.4. # return normalizeAttributeValue(body) return body end end