Skip to content

Add anchor-resource-constraints xslt - #5

Merged
streino merged 3 commits into
mainfrom
feat/anchor-resource-constraints
Nov 2, 2024
Merged

Add anchor-resource-constraints xslt#5
streino merged 3 commits into
mainfrom
feat/anchor-resource-constraints

Conversation

@streino

@streino streino commented Oct 8, 2024

Copy link
Copy Markdown
Contributor

fix ecolabdata/ecospheres#354

Lorsque qu'un gmd:otherConstraints/gco:CharacterString match dans une des tables de mapping, le gco:CharacterString est converti en gmx:Anchor pointant vers l'entrée mappée.

Heuristique de match (code) :

  • Le texte de gco:CharacterString est normalisé (lowecase + ascii folding + trim + normalisation des espaces dans le texte, code).
  • Si le texte normalisé matche => done
  • Sinon, le texte normalisé est séparé en [texte non url] + [url] et chaque partie est matchée indépendament. La séparation est naive : on split sur "http", donc [texte non url] est forcément avant [url].

Tables de mapping (code):

@streino
streino requested a review from alhyss October 8, 2024 20:21
Comment thread xslts/anchor-resource-constraints.xsl
Comment thread xslts/anchor-resource-constraints.xsl
Comment thread xslts/anchor-resource-constraints.xsl
@streino
streino force-pushed the feat/anchor-resource-constraints branch from e64250c to 3f5c4a6 Compare November 2, 2024 15:58
@streino
streino merged commit 24b5db1 into main Nov 2, 2024
@streino
streino deleted the feat/anchor-resource-constraints branch November 2, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XSLT formalisation des licences

3 participants