Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free as boolean #9

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OxygenProject.xpr
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Files here correspond as follows to the Recommended Practice document
NISO RP-22-2015, revision after July, 2015.

The files in the examples directory correspond to the examples listed
in the appendices of the Recommended Practice.

See also the [NISO ALI Schemas page](http://www.niso.org/schemas/ali/).
10 changes: 5 additions & 5 deletions niso-ali-1.0.xsd → ali.xsd
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.niso.org/schemas/ali/1.0/">
targetNamespace="http://www.niso.org/schemas/ali/">
<xsd:element name="free_to_read">
<xsd:complexType>
<xsd:attribute name="end_date" use="optional" type="xsd:date"/>
<xsd:attribute name="start_date" use="required" type="xsd:date"/>
<xsd:attribute name="start_date" use="optional" type="xsd:date"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="license_ref">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:anyURI">
<xsd:attribute name="start_date" use="optional" type="xsd:date"/>
</xsd:extension>
<xsd:extension base="xsd:anyURI">
<xsd:attribute name="start_date" use="optional" type="xsd:date"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
Expand Down
17 changes: 17 additions & 0 deletions examples/document.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This schema file exists only so as to test validation of some of the example XML files.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ali="http://www.niso.org/schemas/ali/">
<xsd:import schemaLocation="../ali.xsd" namespace='http://www.niso.org/schemas/ali/'/>
<xsd:element name="document">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded"
processContents="skip"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

4 changes: 4 additions & 0 deletions examples/free-to-read-indefinitely.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": true
}
24 changes: 5 additions & 19 deletions examples/free-to-read-indefinitely.rdf
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:ali="http://www.niso.org/schemas/ali/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:RDF xmlns:ali="http://www.niso.org/schemas/ali/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description rdf:about="http://dx.doi.org/10.1234567890">
<!-- Various metadata elements can go here... -->
<dc:title>A Breakthrough Paper</dc:title>
<ali:free_to_read rdf:parseType="Resource">
<!-- free to read from issued date -->
<ali:start_date rdf:datatype="xsd:date">2014-12-24</ali:start_date>
</ali:free_to_read>
<ali:license_ref rdf:parseType="Resource">
<!-- applying a license from 1 Nov 2014 onwards -->
<ali:start_date rdf:datatype="xsd:date">2014-11-01</ali:start_date>
<ali:uri rdf:resource="http://www.psychoceramics.org/license_v1.html"/>
</ali:license_ref>
<ali:license_ref rdf:parseType="Resource">
<!-- making the license more liberal one year later -->
<ali:start_date rdf:datatype="xsd:date">2015-11-01</ali:start_date>
<ali:uri rdf:resource="http://www.psychoceramics.org/open_license.html"/>
</ali:license_ref>
<ali:free_to_read rdf:datatype="xsd:boolean">true</ali:free_to_read>
</rdf:Description>
</rdf:RDF>
1 change: 1 addition & 0 deletions examples/free-to-read-indefinitely.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<free_to_read xmlns="http://www.niso.org/schemas/ali/"/>
33 changes: 15 additions & 18 deletions examples/free-to-read-indefinitely.xmp
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:ali="http://www.niso.org/schemas/ali/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description rdf:about="http://dx.doi.org/10.1234567890">
<!-- Various metadata elements can go here... -->
<dc:title>A Breakthrough Paper</dc:title>
<ali:free_to_read>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<!-- free to read from issued date -->
<ali:start_date>2014-12-24</ali:start_date>
</rdf:li>
</rdf:Bag>
</ali:free_to_read>
</rdf:Description>
</rdf:RDF>
<rdf:RDF xmlns:ali="http://www.niso.org/schemas/ali/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description rdf:about="http://dx.doi.org/10.1234567890">
<!-- Various metadata elements can go here... -->
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">A Breakthrough Paper</rdf:li>
</rdf:Alt>
</dc:title>
<ali:free_to_read
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</ali:free_to_read>
</rdf:Description>
</rdf:RDF>
10 changes: 5 additions & 5 deletions examples/free-to-read-period.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": {
"start_date": "2013-02-03",
"end_date": "2013-10-03"
}
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": {
"start_date": "2013-02-03",
"end_date": "2013-10-03"
}
}
8 changes: 8 additions & 0 deletions examples/free-to-read-period.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<document xmlns:ali="http://www.niso.org/schemas/ali/">
...
<ali:free_to_read start_date="2014-01-01"
end_date="2014-12-31"/>
<ali:license_ref start_date="2015-02-03"
>http://www.examplesite.org/open_license.html</ali:license_ref>
...
</document>
9 changes: 4 additions & 5 deletions examples/free-to-read-periods.rdf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:ali="http://www.niso.org/schemas/ali/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:RDF xmlns:ali="http://www.niso.org/schemas/ali/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description rdf:about="http://dx.doi.org/10.1234567890">
<!-- Various metadata elements can go here... -->
<dc:title>A Breakthrough Paper</dc:title>
Expand Down
81 changes: 41 additions & 40 deletions examples/free-to-read-periods.xmp
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:ali="http://www.niso.org/schemas/ali/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description rdf:about="http://dx.doi.org/10.1234567890">
<!-- Various metadata elements can go here... -->
<dc:title>A Breakthrough Paper</dc:title>
<ali:free_to_read>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<!-- free to read period around X-Mas -->
<ali:start_date>2014-12-24</ali:start_date>
<ali:end_date>2014-12-31</ali:end_date>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<!-- free to read period for Valentine’s Day -->
<ali:start_date>2015-02-14</ali:start_date>
<ali:end_date>2015-02-14</ali:end_date>
</rdf:li>
</rdf:Bag>
</ali:free_to_read>
<ali:license_ref>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<!-- applying a license from 1 Nov 2014 onwards -->
<ali:start_date>2014-11-01</ali:start_date>
<ali:uri>http://www.psychoceramics.org/
license_v1.html</ali:uri>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<!-- making the license more liberal one year later -->
<ali:start_date>2015-11-01</ali:start_date>
<ali:uri>http://www.psychoceramics.org/
open_license.html</ali:uri>
</rdf:li>
</rdf:Bag>
</ali:license_ref>
</rdf:Description>
</rdf:RDF>
<rdf:RDF xmlns:ali="http://www.niso.org/schemas/ali/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description rdf:about="http://dx.doi.org/10.1234567890">
<!-- Various metadata elements can go here... -->
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">A Breakthrough Paper</rdf:li>
</rdf:Alt>
</dc:title>
<ali:free_to_read>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<!-- free to read period around X-Mas -->
<ali:start_date>2014-12-24</ali:start_date>
<ali:end_date>2014-12-31</ali:end_date>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<!-- free to read period for Valentine’s Day -->
<ali:start_date>2015-02-14</ali:start_date>
<ali:end_date>2015-02-14</ali:end_date>
</rdf:li>
</rdf:Bag>
</ali:free_to_read>
<ali:license_ref>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<!-- applying a license from 1 Nov 2014 onwards -->
<ali:start_date>2014-11-01</ali:start_date>
<ali:uri>http://www.psychoceramics.org/license_v1.html</ali:uri>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<!-- making the license more liberal one year later -->
<ali:start_date>2015-11-01</ali:start_date>
<ali:uri>http://www.psychoceramics.org/open_license.html</ali:uri>
</rdf:li>
</rdf:Bag>
</ali:license_ref>
</rdf:Description>
</rdf:RDF>
10 changes: 0 additions & 10 deletions examples/license-only.json

This file was deleted.

14 changes: 6 additions & 8 deletions examples/license-with-start-date.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": {
"start_date": "2014-04-04"
},
"license_ref": {
"uri": "http://creativecommons.org/licenses/3.0/",
"start_date": "2014-04-04"
}
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": true,
"license_ref": {
"start_date": "2014-04-04",
"uri": "http://creativecommons.org/licenses/3.0/"
}
}
8 changes: 8 additions & 0 deletions examples/license.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": true,
"license_ref": {
"uri": "http://creativecommons.org/licenses/3.0/"
}
}

3 changes: 3 additions & 0 deletions examples/license.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<license_ref xmlns="http://www.niso.org/schemas/ali/"
start_date="2014-01-01"
>https://creativecommons.org/licenses/by/4.0/</license_ref>
22 changes: 8 additions & 14 deletions examples/two-licenses.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
{
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": {
"start_date": "2014-04-04"
},
"license_ref": [
{
"start_date": "2014-04-04",
"uri": "http://creativecommons.org/licenses/by/3.0/"
},
{
"start_date": "2015-04-04",
"uri": "http://creativecommons.org/licenses/by/4.0/"
}
]
"@context": "http://www.niso.org/schemas/ali/1.0/jsonld.json",
"free_to_read": true,
"license_ref": [
{ "start_date": "2014-04-04",
"uri": "http://creativecommons.org/licenses/by/3.0/" },
{ "start_date": "2015-04-04",
"uri": "http://creativecommons.org/licenses/by/4.0/" }
]
}
9 changes: 9 additions & 0 deletions jsonld.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "http://www.niso.org/schemas/ali/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"uri": { "@type": "@id" },
"start_date": { "@type": "xsd:date" },
"end_date": { "@type": "xsd:date" }
}
}
11 changes: 0 additions & 11 deletions niso-ali-1.0.json

This file was deleted.