Anonymous (owner)

Revisions

  • 200199 Fri Jul 31 08:07:46 -0700 2009
  • d7dce1 Fri Jul 31 07:59:42 -0700 2009
  • 4275df Fri Jul 31 07:57:41 -0700 2009
  • 136800 Fri Jul 31 07:56:17 -0700 2009
gist: 159255 Download_button fork
public
Public Clone URL: git://gist.github.com/159255.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
   targetNamespace="http://example.org/ils-item-info/TODO"
   xmlns:ilsitem="http://example.org/ils-item-info/TODO"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   elementFormDefault="qualified" attributeFormDefault="unqualified"
   xsi:schemaLocation="http://example.org/ils-item-info/TODO TODO"
>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/03/xml.xsd" />
<xsd:import namespace="http://purl.org/dc/elements/1.1/"
            schemaLocation="http://dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd"/>
 
<xsd:annotation>
  <xsd:description>
    A simple schema to express some elements about an item in an ILS or other
    library inventory system. This schema specifically includes items
    that I could not find a good way to express in MFHD or
    dlf:SimpleAvailability (or any other schema I looked at). This is intended
    to be used as a supplement to MFHD, SimpleAvailability, or other more
    standardized schemas/vocabularies. These elements can define an 'item'
    or 'holding', as appropriate. Intended to be embedded in another schema
    (such as dlf ils-di) that will maek clear by context what is being
    described.
    
    These items are largely internal ILS codes for certain types/classes
    of data in an ILS. The schema supports simply providing the internal
    ILS code without trying to map to a standard vocabulary. Alternately,
    if a standard vocabularly exists (with URIs) and a mapping is possible,
    you can provide those too.
    
    There are a number of elements provided for certain kinds of data, including
    location, collection, item type, item status.
    
    For each of those qualities, an element is provided. These elements are
    intentionally defined globally in the schema to allow re-use. A 'wrapper'
    element descriptionSet is also provided that can contain any of these
    elements.
    
    Each of these elements is defined as an ilsitem:valueType, a type which
    allows one or more ids (internal system ids or from a standard vocabularly)
    in a child dc:identifier, one publically displayable label in a dc:title,
    and a longer form description (and/or link to such) in an
    ilsitem:description.
  </xsd:description>
</xsd:annotation>
 
<xsd:element name="descriptionSet" type="ilsitem:descriptionSetType">
  <xsd:annotation>
    <xsd:documentation>
      A collection element that can a set of any of the ilsitem elements, in
      any order.
      Also intentionally defined to allow you to include things from
      external schemas in here too.
    </xsd:documentation>
  </xsd:annotation>
</xsd:element>
 
 
<xsd:complexType name="descriptionSetType">
    <xsd:all>
      <xsd:element ref="ilsitem:location" minOccurs="0"/>
      <xsd:element ref="ilsitem:collection" minOccurs="0"/>
      <xsd:element ref="ilsitem:itemType" minOccurs="0"/>
      <xsd:element ref="ilsitem:itemStatus" minOccurs="0"/>
      <xsd:element ref="ilsitem:shelfMarkType" minOccurs="0"/>
      
      <xsd:any namespace="##other" processContents="strict" minOccurs="0"/>
    </xsd:all>
</xsd:complexType>
 
<xsd:element name="location" type="ilsitem:valueType">
  <xsd:annotation>
    <xsd:documentation>
      The location as defined by the ILS or inventory system. A location is
      usually a library branch, building, or other physical location, but can
      also be a part of a building, or something non-physical like "Online".
    </xsd:documentation>
  </xsd:annotation>
</xsd:element>
 
<xsd:element name="collection" type="ilsitem:valueType">
  <xsd:annotation>
    <xsd:documentation>
      The collection as defined by the ILS or inventory system. A collection is
      often a sub-part of a location, but can also be a grouping that crosses
      locations. A Collection combined with Location is, in many
      libraries/systems, necessary to identify where a physical object is to
      be found.
    </xsd:documentation>
  </xsd:annotation>
      
<xsd:element name="itemType" type="ilsitem:valueType" />
<xsd:element name="itemStatus" type="ilsitem:valueType" />
 
<xsd:element name="shelfMarkType" type="ilsitem:valueType">
  <xsd:annotation>
    <xsd:description>
      An ILS defined type for the call number or other shelf mark used on an
      item. While this may contain identifiers with suitable URLs identifying
      a standard type such as DDC or LCC, a shelf mark type is often purely
      internal to the ILS/inventory control system.
      
      Provision for specifying the actual call number/shelf mark is not
      currently made in this schema. It is assumed the call number itself
      will be provided in another schema, such as MFHD or ISO Holdings, but
      those schemas lack facility to describe internal type/class of call
      number, so we provide it here.
    </xsd:description>
  <xsd:annotation>
</xsd:element>
 
 
<xsd:complexType name="valueType">
      <xsd:annotation>
        <xsd:documentation>
          Consists of zero or more identifiers (dc:identifier),
          optionally one user-displayable label (dc:title), and optionally one
          user-displayable longer description of the type (dc:description).
          
          The identifier(s) can be either URIs or simple string literals. Only
          one simple string literal should be included, and will be understood
          to be an internal ID in the providing system. As many URIs as you like
          can be included, identifying the object described according to some
          external vocabularly or system.
          
          The dc:description body can be plain text, HTML, or any other format.
          If a format is not XML, the content should be XML-escaped! This
          includes text/html (but not application/xhtml+xml).
          The mime-type of the format is given in attribute contentType,
          probably either text/plain or text/html.
          If none given, assumed default is text/plain. text/plain can contain
          newlines, which should be respected/translated by consuming app where
          possible. eg &gt;dc:description ilsitem:contentType="text/html"&lt;
          
          Instead, or in addition, a url to present to the user for more
          description can be included with attribute xml:href
        </xsd:documentation>
    </xsd:annotation>
 
    <xsd:element ref="dc:identifier" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element ref="dc:title" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="description" minOccurs="0" maxOccours="1"
      type="ilsitem:descriptionWithExtraAttributes"/>
      
    
</xsd:complexType>
 
<xsd:complexType name="descriptionWithExtraAttributes">
  <xsd:annotation>
    <xsd:documentation>
      Originally I hoped to use dc:description for this, but I really wanted
      to add the contentType and href attributes, to deal with actual use
      cases and problems I've experienced when not having these. Couldn't
      figure out a way to legally add attributes to dc:description.
    </xsd:documetnation>
  </xsd:annotation>
  
  <xsd:simpleContent>
    <xsd:extension base="xsd:string">
      <xsd:attribute name="contentType" use="optional" type="xsd:string">
      <xsd:attribute ref="xml:href" use="optional">
    </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType
 
 
 
</xml:schema>