parse_dc_aliases_column

Function parse_dc_aliases_column 

Source
pub fn parse_dc_aliases_column(
    raw: &str,
    file_path: &str,
    line_no: usize,
    report: &mut ValidationReport,
) -> (Vec<String>, Vec<String>, Vec<String>, Option<String>)
Expand description

Parses the composite Aliases/cross-reference/decomposition/syntax column and validates all spacing, delimiter, and formatting conventions in a single pass.

Ensures:

  • No leading or trailing whitespace in the cell.
  • Every comma is followed by exactly one space (no missing space, no multiple spaces).
  • No whitespace before a comma.
  • No empty elements or misplaced commas (leading/trailing/consecutive commas).
  • Decompositions (<tag>...):
    • No whitespace inside the tag brackets (e.g. < approx>, <approx >).
    • No whitespace immediately following the closing > (e.g. <approx> 0 has extra space before 0).
    • Tokens in decomposition payload are separated by single spaces.
  • Cross-references (>...):
    • No whitespace immediately following > (e.g. > 32 has extra space before 32).
  • Plain aliases and syntax declarations:
    • No multiple consecutive spaces.