def parse_attr(attr, value)
case attr
when NamespaceAttrName
@namespace = value.source
when SchemaLocationAttrName
@schemalocation = URI.parse(value.source)
if @schemalocation.relative? and !parent.location.nil? and
!parent.location.relative?
@schemalocation = parent.location + @schemalocation
end
if root.importedschema.key?(@schemalocation)
@content = root.importedschema[@schemalocation]
else
root.importedschema[@schemalocation] = nil
@content = import(@schemalocation)
root.importedschema[@schemalocation] = @content
end
@schemalocation
else
nil
end
end