Access Development-Git
Repository 1 (XML scheme development)
Name | D-SI-development/XML |
---|---|
Url | https://gitlab1.ptb.de/D-SI-development/xml.git |
Status | private |
Sub folders Development
URL: https://gitlab1.ptb.de/D-SI-development/xml/tree/master/Development
Sub folder SI
URL: https://gitlab1.ptb.de/D-SI-development/xml/tree/master/Development/SI
XSD: https://gitlab1.ptb.de/D-SI-development/xml/blob/master/Development/SI/SI_Format_v1.1.xsd
Sub folder Release
URL: https://gitlab1.ptb.de/D-SI-development/xml/tree/master/Release
Publishable versions from the development folder are copied to the release folder. Only the content of the release folder may be committed to the public repository 2.
Token for read-only access to repository 1:
Token name: gitlab+deploy-token-2
Token value: fV4pFo4pcjxd1w8KmC6q
In order to make a local copy of repository 1 it is required to install Git. After that step, use the following command line input:
- Open cmd.exe under Windows or the terminal in Linux.
- Navigate to the folder where to create the local copy
- Type the following command:
git clone https://gitlab+deploy-token-2:fV4pFo4pcjxd1w8KmC6q@gitlab1.ptb.de/D-SI-development/xml.git
Developer access to repository 1
To get a user account contact Daniel Hutzschenreuter (E-Mail Daniel.Hutzschenreuter@ptb.de).
Access rights to branches:
- pull from the master branch
- pull/push to the DevProposals branch.
The DevProposals branch was created in order to allow developers to add proposals for the XML implementation of the meta-data format and to add XML examples files. The restriction of pushing to the DevProposals branch prevents changes of the master branch. Maintainers of the repository and all developers can comment these changes. The maintainers organize the merge of the proposal branch with the master branch.
Repository 2 (Release of XML schema with DOI number)
Name | D-SI-public sources/XML |
---|---|
Url | https://gitlab1.ptb.de/D-SI-public/xml.git |
Status | public |
The namespace that is used in the public XML scheme for the meta-data format.
Target namespace SI: https://gitlab1.ptb.de/D-SI-public/xml/tree/master/SI
Sub folder SI:
URL: https://gitlab1.ptb.de/D-SI-public/xml/tree/master/SI
XSD: https://gitlab1.ptb.de/D-SI-public/xml/blob/master/SI/SI_Format_v0.0.0.xsd
Integration of XML Schema files
For Schema from development repository 1
- Clone (copy) the repository by using the developer access or the access token.
- Now you have a local copy of the XML scheme. In this example it is considered that the XML scheme has the location C://myfolder/Release/SI_Format_v1.0.2.xsd
- Create a new XML file (e.g.: MyFirstReal.xml at C://myFolder)
- Add the following lines to the file MyFirstReal.xml.
- The line 2 in the file defines the XML root element si:real.
- The root element has the qualified namespace si with the target URL https://gitlab1.ptb.de/D-SI-public/xml/tree/master/SI
- The lines 3 and 4 define the physical location of the XML scheme. It associates the URL of namespace si with the local XML scheme file at C://myfolder/Release/SI_Format_v1.0.1.xsd. There must be a blank space between the namespace URL and the location of the file SI_Format_v1.0.2.xsd.
For Schema from public release repository 2
- Create a new XML file (e.g.: MyFirstReal.xml at C://myFolder)
- Add the following lines to the file MyFirstReal.xml.
- The line 2 in the file defines the XML root element si:real and its namespace si. The XML scheme file does not need to be included implicitly.
Integration of XML scheme into other XML schemes
-
Add the namespace
xmlns:si="https://gitlab1.ptb.de/D-SI-public/xml/tree/master/SI"
to the scheme definition. -
The following additional steps have to be done for including the scheme from the development repository.
- Also add the namespace
xmlns:xs="http://www.w3.org/2001/XMLSchema"
to the scheme definition. - Further add the following element to the schema definition that provides the location of the D-SI meta-data format.
- Also add the namespace
<xs:import namespace=" https://gitlab1.ptb.de/D-SI-public/xml/tree/master/SI " schemaLocation=" C:\myfolder\Release\SI_Format_v1.0.2.xsd " />
A good general description how to use XML schemes and data structure models with some examples is provided by an online tutorial of Torsten Horn (https://www.torsten-horn.de/techdocs/java-xsd.htm)