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

Distinct #388

Merged
merged 5 commits into from
Oct 20, 2020
Merged

Distinct #388

merged 5 commits into from
Oct 20, 2020

Conversation

darakhbharat
Copy link
Contributor

Hi Weiwu,

All three issues are resolved and tested on multiple tokenscript xml files and found working with XSD 1.1.

If you review and verify can be merged into master, but not sure if there could be conflicts as this branch is 6 commit behind master.

I have my local Java setup for validating XSD 1.1.
As mentioned earlier XMLSECTOOL supports XSD 1.1 (used in validate.sh make file) but I am not able to install it on my machine. I have XMLLINT which does not support XSD 1.1. So I came up with Java(Xerces) set up.

It might be easier for any one of the colleague to check this out and enable XSD 1.1 and test these changes before merging. It might work already as well but need to give it a try.

If in any case we are unable to use XSD 1.1 we can still comment below two lines from tokenscript.xsd and merge the changes. As other changes are XSD 1 compliant and resolve the issue no. 3 from - #378

  1. distinct attribute is not allowed for attributes in , only if it is directly in (the global element ).
<assert test="count(ts:attribute[string(@distinct) = 'true']) le 1"/>
<assert test="if(not(ts:origins)) then count(ts:attribute[string(@distinct) = 'true']) = 1 else true()"/> 

Weiwu Zhang and others added 3 commits August 7, 2020 19:31
…t is directly in <token> (the global element <token>). The changes are XSD 1.0 compatible
… attribute distinct with value true. 2. TokenScript that did not define <origins> under <token>, require at least one of the <attribute> has distinct.
@SmartLayer
Copy link

Thanks a lot! Notice that Tokenscript.xsd has changed since you forked it. Can you take a look if you can resolve the conflict yourself? I'm happy to help in case you have problem with that. I quickly checked and it seems the conflicts are simple.

I'll check this again tomorrow morning.

@darakhbharat
Copy link
Contributor Author

darakhbharat commented Sep 17, 2020 via email

@darakhbharat
Copy link
Contributor Author

Thanks a lot! Notice that Tokenscript.xsd has changed since you forked it. Can you take a look if you can resolve the conflict yourself? I'm happy to help in case you have problem with that. I quickly checked and it seems the conflicts are simple.

I'll check this again tomorrow morning.

I have resolved the conflicts and now it is ready for merging after your review. Basic testing is done after resolving conflicts and works fine as explained in main comment - #388

@SmartLayer
Copy link

Thank you so much @darakhbharat. The reason I didn't merge this one in despite you have tested the schema is that I found some other changes are needed (attribute mapping as an origin of attribute) in order to fully support distinct so I am adding these in as well.

@darakhbharat
Copy link
Contributor Author

darakhbharat commented Sep 29, 2020 via email

@SmartLayer SmartLayer merged commit bc0020b into master Oct 20, 2020
SmartLayer pushed a commit that referenced this pull request Oct 22, 2020
as we couldn't get the validator to work with the new <assert> statement
documented here
#395
@bitcoinwarrior1 bitcoinwarrior1 deleted the distinct branch December 3, 2020 02:06
SmartLayer pushed a commit that referenced this pull request Jun 30, 2023
SmartLayer pushed a commit that referenced this pull request Jun 30, 2023
as we couldn't get the validator to work with the new <assert> statement
documented here
#395
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 this pull request may close these issues.

None yet

2 participants