Skip to content

Commit

Permalink
Fix regex for loc, link-href for book ranges ubsicap#46
Browse files Browse the repository at this point in the history
  • Loading branch information
klassenjm committed Dec 18, 2020
1 parent 650cc91 commit a117517
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/elements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ Galatians 3
When :ref:`usx-element_ref` is used with a USX encoded text, each segment of a scripture reference should be wrapped in a :ref:`usx-element_ref` element. |br|
xsd:string
:@loc: A parsable (machine-readable) representation of the vernacular text for the scripture reference. Book names must be one of :ref:`bookCode <usx-vocab-bookCode>`. Chapter verse separator is always a colon (:). |br|
xsd:string of pattern ``[A-Z1-4]{3} ?[a-z0-9\-:]*``
xsd:string of pattern ``[A-Z1-4]{3}(-[A-Z1-4]{3})? ?[a-z0-9\-:]*``
:Valid in:
:Parents:

Expand Down
2 changes: 1 addition & 1 deletion docs/notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ An *additional* :ref:`link-href <usx-charstyle-attr_link-href>` :doc:`attribute
:@link-href: Citation form for the term in the glossary

:link-href: Unambiguously identifies the scripture target reference using a standard scripture reference format. *(default)* |br|
Book names must be one of :ref:`bookCode <usx-vocab-bookCode>`. Chapter verse separator is always a colon ``:``. A string of pattern: ``[A-Z1-4]{3} ?[a-z0-9\-,:]*`` |br| |br|
Book names must be one of :ref:`bookCode <usx-vocab-bookCode>`. Chapter verse separator is always a colon ``:``. A string of pattern: ``[A-Z1-4]{3}(-[A-Z1-4]{3})? ?[a-z0-9\-:]*`` |br| |br|
In some scenarios a target reference is written in a format which cannot be accurately parsed and identified. Providing the ``link-href`` attribute allows greater flexibility in the use of char@style :ref:`xt <usx-note_crossReference_charstyle_xt>`. |br| |br|
In this context, ``link-href`` should only target scripture references for the current text (i.e. references to other project texts or non-scripture URIs are not allowed)

Expand Down
2 changes: 1 addition & 1 deletion schema/usx.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ Figure =

Reference =
element ref {
attribute loc { xsd:string { pattern = "[A-Z1-4]{3} ?[a-z0-9\-:]*" } },
attribute loc { xsd:string { pattern = "[A-Z1-4]{3}(-[A-Z1-4]{3})? ?[a-z0-9\-:]*" } },
text?
}

Expand Down

0 comments on commit a117517

Please sign in to comment.