Git Product home page Git Product logo

Comments (5)

amilan17 avatar amilan17 commented on July 30, 2024

@tomkralidis

from wcmp2.

tomkralidis avatar tomkralidis commented on July 30, 2024

Perhaps we can further qualify with:

  • no spaces
  • no accents
  • no colons (given they are URN separators)
  • none of the following: `~!@#$%^&*()=][{}|'";,.?/+

cc @josusky

from wcmp2.

josusky avatar josusky commented on July 30, 2024

This is too restrictive. The regular expression that you have provided is correct only for the "namespace identifier" NID part. But the NID is fixed in our case to wmo. The rest of the URN is "Namespace Specific String" (NSS) and its validation is more benevolent. Original description is in https://www.rfc-editor.org/rfc/rfc2141.html (section 2.2) and is slightly modified (extended) by newer RFC (https://www.rfc-editor.org/rfc/rfc8141). Example of a valid URN is:
urn:example:a123,z456?+abc

from wcmp2.

josusky avatar josusky commented on July 30, 2024

I am not deadly against a rule that is more strict than actual URN specification. I looked up the specification because I spotted the innocent dot (.) in Tom's list - that "lifted me off the chair" :-)
I can hardly imagine anyone putting ~ or ] into metadata ID but a dot (.) or slash (/) seem quite OK to me.

from wcmp2.

tomkralidis avatar tomkralidis commented on July 30, 2024

Having a slash (/) in the ID introduces URLs like the following in the GDC:

https://example.org/collections/foo/items/foo%2Fbar

While we can relax the regex set mentioned previously, the above would be error prone.

from wcmp2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.