src/elements/Reference.js
function Reference(value, parameters) {
    abstractions.Element.call(this, utilities.types.REFERENCE, parameters);
    try {
        if (value.constructor.name !== 'URL') value = new URL(value.replace(/\$tag:#/, '$tag:%23'));
    } catch (exception) {
        throw new utilities.Exception({
            $module: '/bali/elements/Reference',
            $procedure: '$Reference',
            $exception: '$invalidParameter',
            $parameter: '"' + value + '"',
            $text: '"An invalid reference value was passed to the constructor."'
        }, exception);
    }

    // since this element is immutable the value must be read-only
    this.getValue = function() { return value; };

    return this;
}
function Reference(value, parameters) {
    abstractions.Element.call(this, utilities.types.REFERENCE, parameters);
    try {
        if (value.constructor.name !== 'URL') value = new URL(value.replace(/\$tag:#/, '$tag:%23'));
    } catch (exception) {
        throw new utilities.Exception({
            $module: '/bali/elements/Reference',
            $procedure: '$Reference',
            $exception: '$invalidParameter',
            $parameter: '"' + value + '"',
            $text: '"An invalid reference value was passed to the constructor."'
        }, exception);
    }

    // since this element is immutable the value must be read-only
    this.getValue = function() { return value; };

    return this;
}
function Reference ( value , parameters ) { abstractions . Element . call ( this , utilities . types . REFERENCE , parameters ) ; try { if ( value . constructor . name !== 'URL' ) value = new URL ( value . replace ( / \$tag:# / , '$tag:%23' ) ) ; } catch ( exception ) { throw new utilities . Exception ( { $module : '/bali/elements/Reference' , $procedure : '$Reference' , $exception : '$invalidParameter' , $parameter : '"' + value + '"' , $text : '"An invalid reference value was passed to the constructor."' } , exception ) ; } // since this element is immutable the value must be read-only this . getValue = function ( ) { return value ; } ; return this ; }
PUBLIC CONSTRUCTOR 
This constructor creates a new reference element using the specified value.

@param {String|URL} value The value of the reference.
@param {Parameters} parameters Optional parameters used to parameterize this element.
@returns {Reference} The new reference element.
PUBLIC CONSTRUCTOR This constructor creates a new reference element using the specified value .