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

Wrong variable use in Expansion handling of @index maps #290

Closed
kasei opened this issue Dec 30, 2019 · 3 comments
Closed

Wrong variable use in Expansion handling of @index maps #290

kasei opened this issue Dec 30, 2019 · 3 comments

Comments

@kasei
Copy link
Contributor

kasei commented Dec 30, 2019

Expansion algorithm step 13.8.3.7.2 says:

If container mapping includes @index, index key is not @index, item does not have an entry @index and expanded index is not @none, initialize index property values to the concatenation of expanded index with any existing values of index key in item. Add the key-value pair (expanded index-index property values) to item. If item is a value object, it MUST NOT contain any extra properties; an invalid value object error has been detected and processing is aborted.

Based on test tpi06, I don't believe the variables used here are correct. To get the expected output from tpi06, I think the text should read (in part):

If container mapping includes @index, index key is not @index, item does not have an entry @index and expanded index is not @none, initialize index property values to the concatenation of the value expansion of index (passing index key as active property) with any existing values of expanded index key in item. Add the key-value pair (expanded index key-index property values) to item.

This also requires defining expanded index key as the IRI Expansion of index key.

@gkellogg
Copy link
Member

Need to use similar wording for expand value elsewhere. "If the expanded index is not @none, then set the expanded index to the result of the Value Expansion algorithm, passing the active context, index key, and index as value."

@gkellogg
Copy link
Member

@kasei Updated text in #291. There was another issue where index key wasn't used properly.

Please acknowledge.

@kasei
Copy link
Contributor Author

kasei commented Dec 31, 2019

@gkellogg looks good, thanks!

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