This paper discusses subtyping of tree-structured data encountered on the Web, e.g. XML and HTML data. Our long range objective
is to define a type system for Web and/or Semantic Web query languages amenable to static type checking. We propose a type
formalism motivated by XML Schema and accommodating two concepts of subtyping: inclusion subtyping (corresponding to XML Schema
notion of type restriction) and extension subtyping (motivated by XML Schema’s type extension). We present algorithms for
checking both kinds of subtyping. The algorithms are polynomial if certain conditions are imposed on the type definitions;
the conditions seem natural and not too restrictive.