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

What is the difference between {#reference} and {reference} URI template? #870

Closed
jakubklimek opened this issue Aug 5, 2020 · 2 comments

Comments

@jakubklimek
Copy link

In the Metadata Vocabulary for Tabular Data Example 11, there is a reference with a hash inside the curly braces {#_name}. I did not find what this syntax means and if/how it is different from {_name}?

The same syntax appears also here and here in Example 27 but nowhere else.

Is this an error?

@gkellogg
Copy link
Member

gkellogg commented Aug 5, 2020

These are defined by the URI Template spec (RFC6570), as they are URI Template Properties. In this case {#_name} uses Fragment Expansion, which sets the fragment of the URI by expanding the _name variable.

The propertyUrl property might be defined as "{#_name}", meaning that it resolves as a fragment identifier relative to the URL of the source of the table. For example, accessing it from a column with the column name GID would look like:

EXAMPLE 11: expanded propertyUrl using {#_name}
"http://example.org/example.csv#GID"

The use of {_name} uses Simple String Expansion.

@jakubklimek
Copy link
Author

I see, thanks for the explanation. I read through RFC6570 and it is clear now.

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