Difference between revisions of "Metadata XML Schema"
Line 5: | Line 5: | ||
<TR style="HEIGHT: 15pt;background-color: #aaaaaa;" height=40> | <TR style="HEIGHT: 15pt;background-color: #aaaaaa;" height=40> | ||
<TD style="WIDTH: 48pt; HEIGHT: 15pt" class=xl66 height=20 width=64>Type</TD> | <TD style="WIDTH: 48pt; HEIGHT: 15pt" class=xl66 height=20 width=64>Type</TD> | ||
− | <TD style=" | + | <TD style="WIDTH: 48pt" class=xl66 width=64>Title</TD> |
− | <TD style=" | + | <TD style="WIDTH: 48pt" class=xl66 width=64>Caption</TD> |
− | <TD style=" | + | <TD style="WIDTH: 122pt" class=xl66 width=162>Collection By Resource ID</TD> |
− | <TD style=" | + | <TD style="WIDTH: 98pt" class=xl66 width=131>Copyright_Statement</TD> |
− | <TD style=" | + | <TD style="WIDTH: 42pt" class=xl66 width=56>Creators</TD> |
− | <TD style=" | + | <TD style="WIDTH: 47pt" class=xl66 width=63>Language</TD> |
− | <TD style=" | + | <TD style="WIDTH: 95pt" class=xl66 width=126>Metadata_Language</TD></TR> |
<TR style="HEIGHT: 200px;background-color: #eeeeee;" height=86> | <TR style="HEIGHT: 200px;background-color: #eeeeee;" height=86> | ||
<TD style="WIDTH: 48pt; HEIGHT: 64.5pt" class=xl67 height=86 width=64>InteractiveResource</TD> | <TD style="WIDTH: 48pt; HEIGHT: 64.5pt" class=xl67 height=86 width=64>InteractiveResource</TD> | ||
− | <TD style=" | + | <TD style="WIDTH: 48pt" class=xl67 width=64>Ustilago tragopogi-pratensis</TD> |
− | <TD style=" | + | <TD style="WIDTH: 48pt" class=xl67 width=64>Ustilago tragopogi-pratensis (Pers.) Roussel;</TD> |
− | <TD style=" | + | <TD style="WIDTH: 122pt" class=xl67 width=162>872783096</TD> |
− | <TD style=" | + | <TD style="WIDTH: 98pt" class=xl67 width=131>© XXX</TD> |
− | <TD style=" | + | <TD style="WIDTH: 42pt" class=xl67 width=56>Mr Smith</TD> |
− | <TD style=" | + | <TD style="WIDTH: 47pt" class=xl67 width=63>fr</TD> |
− | <TD style=" | + | <TD style="WIDTH: 95pt" class=xl67 width=126>fr</TD></TR> |
<TR style="HEIGHT: 200px;background-color: #eeeeee;" height=120> | <TR style="HEIGHT: 200px;background-color: #eeeeee;" height=120> | ||
<TD style="WIDTH: 48pt; HEIGHT: 90pt; BORDER-TOP: medium none" class=xl67 height=120 width=64>InteractiveResource</TD> | <TD style="WIDTH: 48pt; HEIGHT: 90pt; BORDER-TOP: medium none" class=xl67 height=120 width=64>InteractiveResource</TD> | ||
− | <TD style=" | + | <TD style="WIDTH: 48pt; BORDER-TOP: medium none" class=xl67 width=64>Puccinia coronata</TD> |
− | <TD style=" | + | <TD style="WIDTH: 48pt; BORDER-TOP: medium none" class=xl67 width=64>Puccinia coronata Cda.; sur Alopecurus agrestis L.</TD> |
− | <TD style=" | + | <TD style="WIDTH: 122pt; BORDER-TOP: medium none" class=xl67 width=162>872783096</TD> |
− | <TD style=" | + | <TD style="WIDTH: 98pt; BORDER-TOP: medium none" class=xl67 width=131>© ABC</TD> |
− | <TD style=" | + | <TD style="WIDTH: 42pt; BORDER-TOP: medium none" class=xl67 width=56>Mr Fritz</TD> |
− | <TD style=" | + | <TD style="WIDTH: 47pt; BORDER-TOP: medium none" class=xl67 width=63>de</TD> |
− | <TD style=" | + | <TD style="WIDTH: 95pt; BORDER-TOP: medium none" class=xl67 width=126>de</TD></TR> |
<TR style="HEIGHT: 200px;background-color: #eeeeee;" height=171> | <TR style="HEIGHT: 200px;background-color: #eeeeee;" height=171> | ||
<TD style="WIDTH: 48pt; HEIGHT: 128.25pt; BORDER-TOP: medium none" class=xl67 height=171 width=64>InteractiveResource</TD> | <TD style="WIDTH: 48pt; HEIGHT: 128.25pt; BORDER-TOP: medium none" class=xl67 height=171 width=64>InteractiveResource</TD> | ||
− | <TD style=" | + | <TD style="WIDTH: 48pt; BORDER-TOP: medium none" class=xl67 width=64>Uromyces arenariae-leptoclados</TD> |
− | <TD style=" | + | <TD style="WIDTH: 48pt; BORDER-TOP: medium none" class=xl67 width=64>Uromyces arenariae-leptoclados Vienn.-Bourg.; sur Arenaria leptoclados Guss.</TD> |
− | <TD style=" | + | <TD style="WIDTH: 122pt; BORDER-TOP: medium none" class=xl67 width=162>872783096</TD> |
− | <TD style=" | + | <TD style="WIDTH: 98pt; BORDER-TOP: medium none" class=xl67 width=131>© ZZZ</TD> |
− | <TD style=" | + | <TD style="WIDTH: 42pt; BORDER-TOP: medium none" class=xl67 width=56>Mr Fritz</TD> |
− | <TD style=" | + | <TD style="WIDTH: 47pt; BORDER-TOP: medium none" class=xl67 width=63>it</TD> |
− | <TD style=" | + | <TD style="WIDTH: 95pt; BORDER-TOP: medium none" class=xl67 width=126>it</TD></TR></TABLE> |
Revision as of 10:21, 4 November 2009
Suppose you have this metadata to publish:
Type | Title | Caption | Collection By Resource ID | Copyright_Statement | Creators | Language | Metadata_Language |
InteractiveResource | Ustilago tragopogi-pratensis | Ustilago tragopogi-pratensis (Pers.) Roussel; | 872783096 | © XXX | Mr Smith | fr | fr |
InteractiveResource | Puccinia coronata | Puccinia coronata Cda.; sur Alopecurus agrestis L. | 872783096 | © ABC | Mr Fritz | de | de |
InteractiveResource | Uromyces arenariae-leptoclados | Uromyces arenariae-leptoclados Vienn.-Bourg.; sur Arenaria leptoclados Guss. | 872783096 | © ZZZ | Mr Fritz | it | it |
You have to create three XML file with this content:
File 1: (demoData1.xml)
<?xml version="1.0" encoding="UTF-8"?> <K2NMetadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="K2N.xsd" timestamp="2009-11-04T13:05:01.667+02:00"> <InteractiveResource> <!-- Mandatory --> <Resource_ID>d1e4</Resource_ID> <Service_Attribution_URI>http://www.keytonature.eu/wiki/</Service_Attribution_URI> <Collection_By_Resource_ID>872783096</Collection_By_Resource_ID> <!-- End Mandatory --> <Title>Ustilago tragopogi-pratensis</Title> <Caption>Ustilago tragopogi-pratensis (Pers.) Roussel;</Caption> <Copyright_Statement>@ XXX</Copyright_Statement> <Creators>Mr Smith</Creators> <Language><li>fr</li></Language> <Metadata_Language>fr</Metadata_Language> </InteractiveResource> </K2NMetadata>
File 2: (demoData2.xml)
<?xml version="1.0" encoding="UTF-8"?> <K2NMetadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="K2N.xsd" timestamp="2009-11-04T13:05:01.667+02:00"> <InteractiveResource> <!-- Mandatory --> <Resource_ID>d1e4</Resource_ID> <Service_Attribution_URI>http://www.keytonature.eu/wiki/</Service_Attribution_URI> <Collection_By_Resource_ID>872783096</Collection_By_Resource_ID> <!-- End Mandatory --> <Title>Puccinia coronata</Title> <Caption>Puccinia coronata Cda.; sur Alopecurus agrestis L.</Caption> <Copyright_Statement>@ ABC</Copyright_Statement> <Creators>Mr Fritz</Creators> <Language><li>de</li></Language> <Metadata_Language>de</Metadata_Language> </InteractiveResource> </K2NMetadata>
File 3: (demoData3.xml)
<K2NMetadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="K2N.xsd" timestamp="2009-11-04T13:05:01.667+02:00"> <InteractiveResource> <!-- Mandatory --> <Resource_ID>d1e4</Resource_ID> <Service_Attribution_URI>http://www.keytonature.eu/wiki/</Service_Attribution_URI> <Collection_By_Resource_ID>872783096</Collection_By_Resource_ID> <!-- End Mandatory --> <Title>Uromyces arenariae-leptoclados</Title> <Caption>Uromyces arenariae-leptoclados Vienn.-Bourg.; sur Arenaria leptoclados Guss.</Caption> <Copyright_Statement>@ ZZZ</Copyright_Statement> <Creators>Mr Fritz</Creators> <Language><li>it</li></Language> <Metadata_Language>it</Metadata_Language> </InteractiveResource> </K2NMetadata>
User can upload his xml files to Fedora repository from http://<URL of application>.
A form is presented to user, where he must supply some informations (some already filled):
fedora Host: host name of Fedora application server (localhost if Fedora is installed on same server of XML upload application); fedora Port: port number of Fedora application server; fedora Path: application path of Fedora application server (default fedora); fedora Login and Fedora Password: credential to submit file to Fedora repository (admin credentials); PID: unique identifier to assign to content to be published; XML File: XML file to publish to repository.
After click on 'Upload File' button, page show server messages indicating the success or failure of operation.
XML uploaded must must be valid according to the scheme K2N.xsd and K2NDictionary.xsd. You can check validity of your XML file by using online validation tool at http://www.xmlvalidation.com/. The tool allows you to upload the XML file as well as the required xsd file for validation. If your Xml file is valid, tools reply "No errors were found". If your xml file is not valid, a report is generated showing you errors and allowing you to edit the XML file for any corrections.
Here's an example of valid XML:
<?xml version="1.0" encoding="UTF-8"?>