33: def parse_attr(attr, value)
34: case attr
35: when NamespaceAttrName
36: @namespace = value.source
37: when SchemaLocationAttrName
38: @schemalocation = URI.parse(value.source)
39: if @schemalocation.relative? and !parent.location.nil? and
40: !parent.location.relative?
41: @schemalocation = parent.location + @schemalocation
42: end
43: if root.importedschema.key?(@schemalocation)
44: @content = root.importedschema[@schemalocation]
45: else
46: root.importedschema[@schemalocation] = nil
47: @content = import(@schemalocation)
48: root.importedschema[@schemalocation] = @content
49: end
50: @schemalocation
51: else
52: nil
53: end
54: end