Abstract:EDI (electronic data interchange), as a kind of information technology, has been widely used in the field of shipping.However, since various countries and various shipping companies use different EDI packet formats and systems, the ability of data circulation is poor.In order to solve the problem of semantic heterogeneity in shipping field information sharing, this paper introduces the concept of ontology into the field of shipping and proposes an ontology construction method based on the XSLT and XPath technology.It realizes the semi-automatization conversion from the XML Schema document to the OWL syntax ontology document and builds the maritime domain ontology.The experimental results prove that this method improves the efficiency of ontology construction, and ensures the correctness of the ontology.