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

Add support for xsd('auto-date') #114

Open
laurianvm opened this issue Aug 28, 2024 · 2 comments
Open

Add support for xsd('auto-date') #114

laurianvm opened this issue Aug 28, 2024 · 2 comments
Assignees

Comments

@laurianvm
Copy link
Contributor

laurianvm commented Aug 28, 2024

consider making the | xsd filter a bit smarter:
create xsd( "auto-date"), to only deliberate between optional accurancy date variants (datetime, date, month-year, year, …)

(copying from IMIS-1598)

@mpo-vliz
Copy link
Contributor

some upfront thoughts / while at it:

  • additional auto-number could also negotiate between int and float
  • auto-any could do over anything available

strategy to follow imho is trying to be as specific as possible and then drop down from there?

flow for auto-date:

  • type datetime
  • type date
  • string parseable to datetime
  • string parseable to date
  • string matching -?YYYY-MM for gyearmonth
  • string matching -?YYYY for gyear
  • int for gyear
  • error

flow for auto-number

  • type float / double
  • type int
  • string parseable as int
  • string parseable as float
  • error

flow for auto-any:

  • type boolean
  • type float/double
  • type int
  • type datetime
  • type date
  • string is validuri -> anyURI
  • string parseable to datetime
  • string parseable to date
  • string matching -?YYYY-MM for gyearmonth
  • string matching -?YYYY for gyear
  • string parseable as int
  • string parseable as float
  • string exactly true or false (ignoring case) for bool
  • string version of the content

generally getting a bit worried that this is stepping away of the more rigid fail-fast approach we had up to now
this might lead to undesired side-effects and silently ignored problems to be discovered late ...

marc-portier added a commit that referenced this issue Jan 13, 2025
@mpo-vliz
Copy link
Contributor

fix provided in #133
took the liberty to make some re-ordering of the fallback steps vs what I mentioned above...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants