Movatterモバイル変換


[0]ホーム

URL:


               Rough wind, that moanest loud                 Grief too sad for song;               Wild wind, when sullen cloud                 Knells all the night long;               Sad storm, whose tears are vain,               Bare woods, whose branches strain,               Deep caves and dreary main, -                 Wail, for the world's wrong!
5. Encoding Recommendations HTML allows more flexibility in principle and in practice than is recommended here for encoding metadata. Limited flexibility encourages easy development of software for extracting and processing metadata. At this early evolutionary stage of internet metadata, easy prototyping and experimentation hastens the development of useful standards.Kunze Informational [Page 4] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Adherence is therefore recommended to the tagging style exemplified in this document as regards prefix and element name capitalization, double-quoting (") of attribute values, and not starting more than one META tag on a line. There is much room for flexibility, but choosing a style and sticking with it will likely make metadata manipulation and editing easier. The following META tags adhere to the recommendations and carry identical metadata in three different styles: Use of these recommendations is known to result in metadata that may be harvested, indexed, and manipulated by popular, freely available software packages such as [SWISH-E], [freeWAIS-sf2.0], [GLIMPSE], [HARVEST], and [ISEARCH], among others. These conventions also work with the metadata processing scripts appearing in the appendix, as well as with most of the [DCPROJECTS] applications referenced from the [DCHOME] site. Software support for the LINK tag and qualifier conventions (see the next section) is not currently widespread. Ordering of metadata elements is not preserved in general. Writers of software for metadata indexing and display should try to preserve relative ordering among META tagged elements having the same name (e.g., among multiple authors), however, metadata providers and searchers have no guarantee that ordering will be preserved in metadata that passes through unknown systems.6. Dublin Core in Real Descriptions In actual resource description it is often necessary to qualify Dublin Core elements to add nuances of meaning. While neither the general principles nor the specific semantics of DC qualifiers are within scope of this document, everyday uses of the qualifier syntax are illustrated to lend realism to later examples. Without further explanation, the three ways in which the optional qualifier syntax is currently (subject to change) used to supplement the META tag may be summarized as follows:Kunze Informational [Page 5] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Accordingly, a posthumous work in Spanish might be described with Note that the qualifier syntax and label suffixes (which follow an element name and a period) used in examples in this document merely reflect current trends in the HTML encoding of qualifiers. Use of this syntax and these suffixes is neither a standard nor a recommendation.7. Encoding Dublin Core Elements This section consists of very simple Dublin Core encoding examples, arranged by element. Title (name given to the resource) -----Kunze Informational [Page 6] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Creator (entity that created the content) ------- Subject (topic or keyword) -------Kunze Informational [Page 7] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Description (account, summary, or abstract of the content) ----------- Publisher (entity that made the resource available) --------- Contributor (other entity that made a contribution) -----------Kunze Informational [Page 8] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Date (of an event in the life of the resource; [WTN8601] recommended) ---- Type (nature, genre, or category; [DCT1] recommended) ----Kunze Informational [Page 9] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Format (physical or digital data format, plus optional dimensions) ------Kunze Informational [Page 10] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Identifier (of the resource) ---------- Source (reference to the resource's origin) ------ Language (of the content of the resource; [RFC1766] recommended) --------Kunze Informational [Page 11] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Relation (reference to a related resource) -------- Coverage (extent or scope of the content) --------Kunze Informational [Page 12] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Rights (text or identifier of a rights management statement) ------8. Security Considerations The syntax rules for encoding Dublin Core metadata in HTML that are documented here pose no direct risk to computers and networks. People can use these rules to encode metadata that is inaccurate or even deliberately misleading (creating mischief in the form of "index spam"), however, this reflects a general pattern of HTML META tag abuse that is not limited to the encoding of metadata from the Dublin Core set. Even traditional metadata encoding schemes (e.g., [MARC]) are not immune to inaccuracy, although they are generally followed in environments where production quality greatly exceeds that of the average Web site. Systems that process metadata encoded with META tags need to consider issues related to its accuracy and validity as part of their design and implementation, and users of such systems need to consider the design and implementation assumptions. Various approaches may be relevant for certain applications, such as adding statements of metadata provenance, signing of metadata with digital signatures, and automating certain aspects of metadata creation; but these are far outside the scope of this document and the underlying META tag syntax that it describes.Kunze Informational [Page 13] RFC 2731 Encoding Dublin Core Metadata in HTML December 19999. Appendix -- Perl Scripts that Manipulate HTML Encoded Metadata This section contains two simple programs that work with versions 4 and 5 of the Perl [PERL] scripting language interpreter. They may be taken and freely adapted for local organizational needs, research proposals, venture capital bids, etc. A variety of applications are within easy reach of implementors that choose to build on these scripts. Script 1: Metadata Format Conversion ------------------------------------- Here is a simple Perl script that correctly recognizes every example of metadata encoding in this document. It shows how a modest scripting effort can produce a utility that converts metadata from one format to another. Minor changes are sufficient to support a number of output formats.#!/depot/bin/perl## This simple perl script extracts metadata embedded in an HTML file# and outputs it in an alternate format. Issues warning about missing# element name or value.## Handles mixed case tags and attribute values, one per line or spanning# several lines. Also handles a quoted string spanning multiple lines.# No error checking. Does not tolerate more than one ") { next if (! //i) { while (<>) { $meta .= $_; last if (/>/); } } $name = $meta =~ /name\s*=\s*"([^"]*)"/i ? $1 : "MISSING ELEMENT NAME"; $content = $meta =~ /content\s*=\s*"([^"]*)"/i ? $1 : "MISSING ELEMENT VALUE"; ($scheme) = $meta =~ /scheme\s*=\s*"([^"]*)"/i; ($lang) = $meta =~ /lang\s*=\s*"([^"]*)"/i; if ($lang || $scheme) { $mod = " ($lang"; if (! $scheme)Kunze Informational [Page 14] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 { $mod .= ")"; } elsif (! $lang) { $mod .= "$scheme)" } else { $mod .= ", $scheme)"; } } else { $mod = ""; } print " @|$name$mod; $content\n";}print "@)urc;\n";# ---- end of Perl script ---- When the conversion script is run on the metadata file example from the LINK tag section (section 4), it produces the following output. @(urc; @|DC.Title; A Dirge @|DC.Creator; Shelley, Percy Bysshe @|DC.Type; poem @|DC.Date; 1820 @|DC.Format; text/html @|DC.Language; en @)urc; Script 2: Automated Metadata Creation -------------------------------------- The creation and maintenance of high-quality metadata can be extremely expensive without automation to assist in processes such as supplying pre-set or computed defaults, validating syntax, verifying value ranges, spell checking, etc. Considerable relief could be had from a script that reduced an individual provider's metadata burden to just the title of each document. Below is such a script. It lets the provider of an HTML document abbreviate an entire embedded resource description using a single HTML comment statement that looks like Our script processes this statement specially as a kind of "metadata block" declaration with attached title. The general form is Kunze Informational [Page 15] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 This statement works much like a "Web server-side include" in that the script replaces it with a fully-specified block of metadata and triggers other replacements. Once installed, the script can output HTML files suitable for integration into one's production Web server procedures. The individual provider keeps a separate "template" file of infrequently changing pre-set values for metadata elements. If the provider's needs are simple enough, the only element values besides the title that differ from one document to the next may be generated automatically. Using the script, values may be referenced as variables from within the template or within the document. Our variable references have the form "(--mbVARNAME)", and here is what they look like inside a template: (--mbtitle) The above template represents the metadata block that will describe the document once the variable references are replaced with real values. By the conventions of our script, the following variables will be replaced in both the template and in the document: (--mbfilesize) size of the final output file (--mbtitle) title of the document (--mblanguage) language of the document (--mbbaseURL) beginning part of document identifier (--mbfilename) last part (minus .html) of identifier (--mbfilemodtime) last modification date of the documentKunze Informational [Page 16] RFC 2731 Encoding Dublin Core Metadata in HTML December 1999 Here's an example HTML file to run the script on.

From: Acting Shift Supervisor To: Plant Control Personnel RE: (--mbtitle) Date: (--mbfilemodtime)

Pursuant to directive DOH:10.2001/405aec of article B-2022, subsection 48.2.4.4.1c regarding staff morale and employee productivity standards, the current allocation of doughnut acquisition funds shall be increased effective immediately. Note that because replacement occurs throughout the document, the provider need only enter the title once instead of twice (normally the title must be entered once in the HTML head and again in the HTML body). After running the script, the above file is transformed into this: Nutritional Allocation Increase

From: Acting Shift Supervisor To: Plant Control Personnel RE: Nutritional Allocation Increase Date: 1999-03-08

Pursuant to directive DOH:10.2001/405aec of article B-2022, subsection 48.2.4.4.1c regarding staff morale and employee productivity standards, the current allocation of doughnut acquisition funds shall be increased effective immediately.


[8]ページ先頭

©2009-2026 Movatter.jp