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

About definition of local type records #458

Closed
leonhsl opened this issue Dec 2, 2019 · 4 comments
Closed

About definition of local type records #458

leonhsl opened this issue Dec 2, 2019 · 4 comments

Comments

@leonhsl
Copy link
Contributor

leonhsl commented Dec 2, 2019

By reading https://w3c.github.io/web-nfc/#dfn-local-type, I think we should make clear that local type records supported by our web nfc API are just some TNF-1 (well-known type) records, they have specific meanings to their containing records.

But, https://w3c.github.io/web-nfc/#mapping-local-type-to-ndef says they could be written as TNF-4 records, which I do not think is appropriate. TNF-4 records have their own regulations on type names, also they are not expected by the nfc forum spec to act as embedded records.

If record's recordType is a standard local type to smart poster or a handover record, then set ndefRecord's TNF field to 1 (well-known type record), otherwise set ndefRecord's TNF field to 4 (external type record).

I think we should remove such "smartness". Let me know your concerns here.

@leonhsl
Copy link
Contributor Author

leonhsl commented Dec 2, 2019

I mean, simply, if an embedded record's NDEFRecordInit#recordType is abc, then we should write it as a TNF-1 record, NOT a TNF-4 record.

If Web Devs really want this embedded record to be an TNF-4 record, they just need to provide xyz.com:abc as NDEFRecordInit#recordType.

@zolkis
Copy link
Contributor

zolkis commented Dec 2, 2019

That is right: mapping local type to NDEF is wrong. I will fix it now.

@zolkis
Copy link
Contributor

zolkis commented Dec 2, 2019

@leonhsl could you please check the commit above?
I had to make other changes, too, for instance icon records were not correctly handled.

@leonhsl
Copy link
Contributor Author

leonhsl commented Dec 3, 2019

I added several comments in the commit, and I think @beaufortfrancois might also want to take a look there, especially from Web Devs' point of view.

@zolkis zolkis closed this as completed in e7f47e2 Dec 11, 2019
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

No branches or pull requests

2 participants