0) { echo("

Erroneous USIN

"); } else { echo("

USIN Analyzer at USIN.org

"); } echo("

USIN Structural Analysis

\n"); echo("

USIN protostring under analysis:" . "$USIN_proto

\n"); if ($junksize == strlen($USIN_proto)) { echo("

Junk

This is junk. " . "No prefix of this string represents a valid USIN.

\n"); } else { if ($junksize > 0) { echo("

Well-Formed Prefix

"); if ($junksize * 2 > strlen($USIN_proto)) echo("

This is mostly junk.\n"); else echo("

This USIN contains junk at the end.\n"); echo("The longest prefix that is a well-formed USIN:\n"); echo("" . substr($USIN_proto, 0, strlen($USIN_proto)-$junksize) . "

"); } echo("

USIN Type

\n"); echo("

This USIN parses as"); if ($map['attributes']) foreach ($map['attributes'] as $att) echo(" an attribute of"); if ($map['item_extensions']) echo(" an item within a collection or publication.

\n"); else if ($map['collection_label']) echo(" a particular collection or publication.

\n"); else echo(" a publication domain.

\n"); echo("

Domain

\n"); echo("

The principal domain is " . $map['principal_domain'] . ".\n"); $ext_text = ''; if (!$map['domain_extensions']) echo("There are no domain extensions.

\n"); else { foreach ($map['domain_extensions'] as $ext) { $ext_text .= "
  • $ext
  • \n"; } echo("This domain is qualified by the following extensions.

    \n" . "\n"); } if ($map['collection_label']) { echo("

    Collection Label

    \n"); echo("

    The collection label is " . $map['collection_label'] . ".

    \n"); if ($map['item_extensions']) { echo("

    Item Extensions

    \n"); echo("

    Within the collection, the particular item of interest is\n" . "specified through the following item extensions.

    \n

    \n"); } } if ($map['attributes']) { echo("

    Attributes

    \n"); echo("

    The USIN is qualified by the following\n" . " attribute specifiers.

    \n

    \n"); } } } # # If this script was invoked with a QUERY_STRING, analyze that. if (strlen($usin) != 0) { report_USIN_structure($usin); } # If the script was invoked by a POST method setting $USIN_proto, # analyze that. elseif ($USIN_by_POST) { report_USIN_structure($USIN_by_POST); } ?>

    USIN Syntax Analyzer

    Enter a USIN protostring for analysis.

    A USIN may be broken over multiple lines using the USIN hyphenation convention: hyphens followed by whitespace (blanks and newlines) may be inserted before any operator within a USIN.