A CITE library for the JVM, version 0.96.0 > CTS URNs >

Extracting parts of CTS URNs

The CTS URN specification defines both syntax and semantics of a CTS URN. Because each component has a specified meaning, the cite library supports directly extracting individual parts.

Directly addressable parts of a CTS URN

  1. The identifier for its CTS namespace, which defines the meaning for all other components of the URN.
  2. The parts of the work component. Because the meaning of the work component is specific to a particular CTS namespace, the parts of the work component may be extracted either with the qualifying CTS namespace, or without the CTS namespace for use in contexts where the namespace is already defined. These parts are:
    1. the identifier for its text group
    2. the identifier for its work at a notional level
    3. the identifier for its specific version (edition or translation)
    4. the identifier for an individual exemplar of a version
  3. The parts of the passage reference component:
    1. the passage component as a whole
    2. the first and last nodes of a range
    3. any subreferences, and their index (explicit or implicit). See details in the following section.

Example: Different Work-level URNs

A URN can cite a work at the EXEMPLAR, VERSION, WORK, or GROUP level.

The URN urn:cts:greekLit:tlg0012.tlg001:2.75 cites at the work level.

The URN urn:cts:greekLit:tlg0012.tlg001.msA:2.75 cites at the version level.

The URN urn:cts:greekLit:tlg0012.tlg001.msA.lex:2.75 cites at the exemplar level.

The URN urn:cts:greekLit:tlg0012.tlg001.msA:2.75 cites the version msA level.

The URN urn:cts:greekLit:tlg0012.tlg001.msA: cites, without a passage-component, the version msA level.

Example: version-level URN citing a single node

Components of the URN urn:cts:greekLit:tlg0012.tlg001.msA:2.75.

  1. its CTS namespace is greekLit
  2. parts of the work component:
    1. its namespace-qualified text group identifier is greekLit:tlg0012, or without namespace is tlg0012
    2. its namespace-qualified work identifier is greekLit:tlg001, or without namespace is tlg001
    3. its namespace-qualified version identifier is greekLit:msA, or without namespace is msA
  3. the passage component:
    1. the entire passage component is 2.75

Example: exemplar-level URN

Components of the URN urn:cts:greekLit:tlg0012.tlg001.msA.lex:1.1.1.

  1. its CTS namespace is greekLit
  2. parts of the work component:
    1. its namespace-qualified text group identifier is greekLit:tlg0012, or without namespace is tlg0012
    2. its namespace-qualified work identifier is greekLit:tlg001, or without namespace is tlg001
    3. its namespace-qualified version identifier is greekLit:msA, or without namespace is msA
    4. its namespace-qualified exemplar identifier is greekLit:lex, or without namespace is lex
  3. the passage component:
    1. the entire passage component is 2.75

Example: citing a range

For the URN urn:cts:greekLit:tlg0012.tlg001.msA:1.1-2.75, the CTS namespace and parts of the work component are identical to the previous examples. Parts of the passage component:

  1. the passage component as a whole is 1.1-2.75
  2. the first node of the range is 1.1
  3. the last node of the range is 2.75

Subreferences

CTS URNs express references to units in a canonical citation system that is specific to individual texts. For specific versions or exemplars, the notation permits pointing to indexed substrings within the text content of the cited passage. Substrings are indexed beginning from 1 (not 0), and a substring reference with no explicit index is defined to mean that is has an implied index of 1.

The cite library's methods support working with subreferences as follows:

  1. extracting the entire passage component returns the literal string version of passage component as submitted to the CtsUrn constructor. If an index of 1 is left implicit, it is not supplied.

  2. extracting the substring returns the substring without index.

  3. extracting the index value returns an integer > 0, whether the index was expressed or implied

    For ranges, cite supports extracting substring and index values for either end of the range.

Example: subreference with implicit index

Subreference content of the URN urn:cts:greekLit:tlg0012.tlg001.msA:1.1@Μῆνιν.

  1. the passage component as a whole is 1.1@Μῆνιν
  2. the substring value is Μῆνιν
  3. the (implicit) index value 1.

Example: subreference with explicit index

The URN urn:cts:greekLit:tlg0012.tlg001.msA:1.1@Μῆνιν[1] is semantically equivalent to the previous example

  1. the passage component as a whole is 1.1@Μῆνιν[1]
  2. the substring value is Μῆνιν
  3. the (explicit) index value is 1.

Example: subreferences on a range

Ssubreference content of the URN urn:cts:greekLit:tlg0012.tlg001.msA:1.1@Μῆνιν[1]-1.2@οὐλομένην.

  1. the passage component as a whole is 1.1@Μῆνιν[1]-1.2@οὐλομένην
  2. the substring value for the first subreference is Μῆνιν, and for the second subreferences is οὐλομένην
  3. the (explict) index for the first subreference is 1, and for the second (implicit) subreference is 1