Automatic transformation of XML namespaces/Extracting information from RDF
Every time an RDF file is loaded, the following algorithm takes place:
- If the file is invalid and user specified the option to completely reject invalid RDF, then the following is skipped.
- Store all triples with predicates rdfs:subClassOf and :higherThan and :lowerThan.
- process rdfs:seeAlso as described below.
- For every of the below defined RDF classes (:Namespace, :Transformer, :CommandLine, :NamedScript, :WebService) find start nodes that is RDF nodes which have rdf:type predicate with the given class as object.
- For every start node and its corresponding grammar tree verify that it conforms to the tree and do all other validation checks.
- 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.