Automatic transformation of XML namespaces/Extracting information from RDF

Every time an RDF file is loaded, the following algorithm takes place:

  1. If the file is invalid and user specified the option to completely reject invalid RDF, then the following is skipped.
  2. Store all triples with predicates rdfs:subClassOf and :higherThan and :lowerThan.
  3. process rdfs:seeAlso as described below.
  4. For every of the below defined RDF classes (:Namespace, :Transformer, :Command, :WebService) find start nodes that is RDF nodes which have rdf:type predicate with the given class as object. (TODO: Simplify the description using subclasses.)
  5. For every start node and its corresponding grammar tree verify that it conforms to the tree and do all other validation checks.
  6. Reject information from start nodes which violates any validation rules. Extract namespaces, transformations, and precedences as get from the rest (that is valid) start nodes and their grammar trees.

Note that the information is extracted in the order of triples in the RDF file.

When processing scripts (for validation of a namespace or for a transformer), just ignore scripts of unknown rdf:type.