An experimental tool for extracting and validating DC metadata encoded as XHTML meta elements.
$page
= URL of XHTML doc$profile
= URL of profile$xslstyle
= URL of XSLT stylesheet$cssstyle
= URL of CSS stylesheet for outputA "profile" is a set of rules which specifies:
A profile is a simple XML document containing:
my:elements
where the namespace prefix is associated with the XML Namespace Name http://www.ukoln.ac.uk/metadata/dcmeta/
.my:element
, each corresponding to a metadata element permitted by the profileEach my:element
element must have the following child elements:
my:prefix
element, the content of which is either "DC" or "DCTERMS";my:name
element, the content of which is the name of the metadata element as used following the prefix in the name
attribute of the (X)HTML meta
element; dcmeta
is permissive regarding the case of the names used in metadat instances. e.g. it accepts both "DC.title" and "DC.Title" as occurrences of the same metadata element. However it will display a warning where the case differs from the name specified in the profile.my:minoccurs
element, the content of which is an integer indicating the minimum number of occurrences of this element required in a metadata instance;my:maxoccurs
element, the content of which is an integer indicating the maximum number of occurrences of this element permitted in a metadata instance (or the string "unbounded", if an unlimited number of occurrences are permitted).Each my:element
element may have the following additional child elements:
my:schemes
element, which acts as a container element for one or more my:scheme
elements, representing permitted Encoding Schemes for values of this metadata element. my:fixedvalues
element, which acts as a container element for one or more my:fixedvalue
elements, representing a set of possible values for this metadata element, even where an Encoding Scheme is not specified.
<?xml version="1.0" encoding="UTF-8"?> <my:elements xmlns:my="http://www.ukoln.ac.uk/metadata/dcmeta/"> <my:element> <my:prefix>DC</my:prefix> <my:name>title</my:name> <my:minoccurs>0</my:minoccurs> <my:maxoccurs>unbounded</my:maxoccurs> </my:element> </my:elements> |
The DC.title element is optional and may be repeated an unlimited number of times. No encoding schemes are permitted, and there is no checking of the values of the DC.title element.
<?xml version="1.0" encoding="UTF-8"?> <my:elements xmlns:my="http://www.ukoln.ac.uk/metadata/dcmeta/"> <my:element> <my:prefix>DC</my:prefix> <my:name>subject</my:name> <my:minoccurs>0</my:minoccurs> <my:maxoccurs>unbounded</my:maxoccurs> <my:schemes> <my:scheme><my:schemename>[None]</my:schemename></my:scheme> <my:scheme><my:schemename>LCSH</my:schemename></my:scheme> <my:scheme><my:schemename>MESH</my:schemename></my:scheme> <my:scheme><my:schemename>DDC</my:schemename></my:scheme> <my:scheme><my:schemename>LCC</my:schemename></my:scheme> <my:scheme><my:schemename>UDC</my:schemename></my:scheme> </my:schemes> </my:element> </my:elements> |
The DC.subject element is optional and may be repeated an unlimited number of times. Five encoding schemes are permitted, but the "[None]" entry means that the use of an encoding scheme is not mandatory.
<?xml version="1.0" encoding="UTF-8"?> <my:elements xmlns:my="http://www.ukoln.ac.uk/metadata/dcmeta/"> <my:element> <my:prefix>DC</my:prefix> <my:name>subject</my:name> <my:minoccurs>1</my:minoccurs> <my:maxoccurs>unbounded</my:maxoccurs> <my:schemes> <my:scheme><my:schemename>LCSH</my:schemename></my:scheme> </my:schemes> </my:element> </my:elements> |
The DC.subject element is mandatory and may be repeated an unlimited number of times. Values must be associated with the LCSH encoding scheme.
<?xml version="1.0" encoding="UTF-8"?> <my:elements xmlns:my="http://www.ukoln.ac.uk/metadata/dcmeta/"> <my:element> <my:prefix>DC</my:prefix> <my:name>publisher</my:name> <my:minoccurs>1</my:minoccurs> <my:maxoccurs>1</my:maxoccurs> <my:schemes> <my:scheme><my:schemename>[None]</my:schemename></my:scheme> </my:schemes> <my:fixedvalues><my:fixedvalue>UKOLN</my:fixedvalue></my:fixedvalues> </my:element> </my:elements> |
The DC.publisher element is mandatory and may only occur once. No encoding scheme is valid, and only one value is permissible.
<?xml version="1.0" encoding="UTF-8"?> <my:elements xmlns:my="http://www.ukoln.ac.uk/metadata/dcmeta/"> <my:element> <my:prefix>DC</my:prefix> <my:name>type</my:name> <my:minoccurs>1</my:minoccurs> <my:maxoccurs>1</my:maxoccurs> <my:schemes> <my:scheme> <my:schemename>DCMIType</my:schemename> <my:schemevalues> <my:schemevalue>Collection <my:schemevalue>Dataset <my:schemevalue>Event <my:schemevalue>Image <my:schemevalue>Interactive Resource <my:schemevalue>Service <my:schemevalue>Software <my:schemevalue>Sound <my:schemevalue>Text <my:schemevalue>Physical Object </my:schemevalues> </my:scheme> </my:schemes> </my:element> </my:elements> |
The DC.type element is mandatory and may only occur once. Values must use the DCMIType encoding scheme and must be drawn from the enumerated list.