Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid xref check is too strict #1127

Closed
balhoff opened this issue Jun 29, 2023 · 2 comments · Fixed by #1186
Closed

invalid xref check is too strict #1127

balhoff opened this issue Jun 29, 2023 · 2 comments · Fixed by #1186

Comments

@balhoff
Copy link
Contributor

balhoff commented Jun 29, 2023

The invalid xref check uses this regex: "^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$"

It should allow . in the prefix part: https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName

@matentzn
Copy link
Contributor

tbh the checks is also missing some cases.

  • ^[a-z|A-Z|_|\\-|0-9]*:(?!$)\\S*$ (OLD)
  • ^[a-z|A-Z][a-z|A-Z|_|\\-|0-9|\\.]*[a-z|A-Z|0-9]:(?!$)\\S*$ (Proposed new)

So basically:

  1. first character of prefix must be an upper or lower case alphabetical character.
  2. last character of prefix must be an upper or lower case alphabetical character or number.
  3. prefix may contain period anywhere in between first and last character

What do you think @balhoff?

@balhoff
Copy link
Contributor Author

balhoff commented Jan 22, 2024

Seems good to me.

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 a pull request may close this issue.

2 participants