Where to post copyright information on XSD?

When placing copyright information in an XML Schema Definition (XSD), is there an official (or semi-official, generally accepted) place for this?

Based Where to add a version to an XSD schema? , there is an official attribute versionin the element xs:schema- is there something similar for copyright information?

I saw people using annotation / documentation elements (like here ) for something like this - is this a common way to do this?

<xsd:annotation>
  <xsd:documentation xml:lang="en">
     Copyright 2015 Example.com. All rights reserved.
  </xsd:documentation>
</xsd:annotation>
+4
source share
1 answer

XSD itself does not have specific direct support for copyright information. In practice, three methods are used:

  • XML level comments:

    <!-- Copyright 2015 Example.com. All rights reserved. -->
    

    , , XSD. , ​​ XML (<?xml version="1.0" encoding="utf-8" ?>), XSD, XSD .

  • XSD ( ):

    <xsd:annotation>
      <xsd:documentation xml:lang="en">
        Copyright 2015 Example.com. All rights reserved.
      </xsd:documentation>
    </xsd:annotation>
    

    XML-, - : , / .

  • appinfo XSD:

    <xsd:annotation>
      <xsd:appinfo>
        <copyright-notice>
          Copyright 2015 Example.com. All rights reserved.
        <copyright-notice>
        <license uri="http://www.apache.org/licenses/LICENSE-2.0"
                 version="2.0">Apache License, Version 2.0</license>
        <author>J Smith</author>
        <!-- ... -->
      </xsd:appinfo>
    </xsd:annotation>
    

    XSD.

, , .

+5

Source: https://habr.com/ru/post/1599855/


All Articles