主权项 |
1. A method, implemented at least in part by a computing device, for converting extensible markup language (XML) to web ontology language (OWL), the method comprising:
receiving one or more XML documents; receiving a plurality of XML schema documents; performing, by the computing device, model extraction using the plurality of XML schema documents, the model extraction comprising:
performing schema consolidation on the plurality of XML schema documents to generate a consolidated XML schema document, the performing schema consolidation comprising:
storing namespaces and associated namespace prefixes from the one or more XML documents and the plurality of XML schema documents into a hash;merging the plurality of XML schema documents to create a merged XML schema document, the merging comprising:
examining the hash for each namespace prefix; andadding the namespace prefix to elements and attributes of the merged XML schema document; andreorganizing the merged XML schema document comprising resolving internal references, the reorganizing comprising removing include elements and import elements in the reorganized merged XML schema document; andgenerating, using the consolidated XML schema document, an OWL model ontology; performing, by the computing device, instance generation using the one or more XML documents and the plurality of XML schema documents to create an OWL instance ontology; and outputting, by the computing device, the OWL model ontology and the OWL instance ontology.
|