Hi,
In my XML I have xsi:type attribute is there. But, I am not able to encode that.
Can anybody help me in this?
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
so, xsi:type =>
uri is "http://www.w3.org/2001/XMLSchema-instance"
localName is type
This is how I am filling my qname.
Thanks,
SK
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your approach of constructing the qname for xsi:type is correct.
Looking at the issue I realized that the encoding of xsi:type attributes is not implemented yet. It is just the parsing of xsi:type that is available in exip.
The reason is because the EXI data type for the value of xsi:type is QNAME indicating the type that will be used for the element.
Currently, there is no errorCode qnameData(EXIStream* strm, QName qname); in EXISerializer.h
It will be added as feature request.
Regards,
Rumen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have run the clokwork on EXIP code. I got couple of warnings in that. Few of them I fixed like NULL check, memery free kind of, Once I finish all those changes, I'll share the changes.
If you don't mind, may I know when'll you release the code with this feature?
Thanks,
SK
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am still not ready with the code re-factoring. I need to finish that before I can fix the xsi:type issue.
The code in the repository barely compiles now - it needs a lot more work to get to the point where it was before in terms of features.
Regards,
Rumen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
function next week and let you know when you can do some testing on the xsi:type use case.
It will be very helpful to have your feedback even before the release - that will speedup the process.
Best regards,
Rumen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The latest code in the SVN repo has the xsi:type feature implemented. You can check it out and test if it works for your use case.
For some reason the link to the repo is messed-up in the Code section - I have to contact the SF guys for that - use this instead: https://exip.svn.sourceforge.net/svnroot/exip
Note that it is only tested for schema-less encoding - you can have a look at the unit test in trunk/tests/check_xsi_type.c for more information on the usage.
Any additional use-cases (such as schema strict and non-strict mode) added to check_xsi_type.c will be highly appreciated especially if you find issues.
Regards,
Rumen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You're right, I forgot to add the handler for the decoding part. I was wondering if a should reuse the string handler for the xsi:type value but now I added qname handler. You can update your code - the assertion should also be fixed now.
The only thing left is the issue with xsi:type when Preserve.lexicalValues is true but that is to be solved later.
Regards,
Rumen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I modified check_xsi_type.c to test xsi:type in schema informed mode.
The encoding and parsing return no error, but the xsi:type attribute is not present in the parsing.
(note that in schemaless mode, same code, the xsi:type attribute is present)
Note : I use svn release 276
Last edit: Denis Froschauer 2013-05-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
In my XML I have xsi:type attribute is there. But, I am not able to encode that.
Can anybody help me in this?
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
so, xsi:type =>
uri is "http://www.w3.org/2001/XMLSchema-instance"
localName is type
This is how I am filling my qname.
Thanks,
SK
Hi Kumar,
Your approach of constructing the qname for xsi:type is correct.
Looking at the issue I realized that the encoding of xsi:type attributes is not implemented yet. It is just the parsing of xsi:type that is available in exip.
The reason is because the EXI data type for the value of xsi:type is QNAME indicating the type that will be used for the element.
Currently, there is no errorCode qnameData(EXIStream* strm, QName qname); in EXISerializer.h
It will be added as feature request.
Regards,
Rumen
Thanks Rumen for the response.
I have run the clokwork on EXIP code. I got couple of warnings in that. Few of them I fixed like NULL check, memery free kind of, Once I finish all those changes, I'll share the changes.
If you don't mind, may I know when'll you release the code with this feature?
Thanks,
SK
I am working on very big changes to the source code that will make the footprint of the code a lot smaller and also require a lot less memory.
Unfortunately I am working on exip just 10% of my time now as I have a lot of other things to do.
Expected time for the next release is February 2013.
Regards,
Rumen
Hi Rumen,
Wish you a happy new year.
If you worked on xsi:type. Can you please share the patch? then I'll try to test. If I see any issues I'll try to figure it out.
Once everything is stable, then you can release.
Right now, I am blocking with xsi:type.
Thanks,
SK
Happy new year!
I am still not ready with the code re-factoring. I need to finish that before I can fix the xsi:type issue.
The code in the repository barely compiles now - it needs a lot more work to get to the point where it was before in terms of features.
Regards,
Rumen
Hi Rumen, I would also be interested in testing a fix for xsi:type whenever you have it available.
Regards,
Chris
Hello Chris, Kumar,
I am almost ready with the refactoring - there are still several unit tests that fail and few more thing to get fixed, but I plan to put the
function next week and let you know when you can do some testing on the xsi:type use case.
It will be very helpful to have your feedback even before the release - that will speedup the process.
Best regards,
Rumen
Hi Rumen,
Good to know that the status of xsi:type.
I am ready with my test cases for xsi:type. I am waiting for your code release.
Once you released the code, then I'll start my testing and update you.
Thanks,
SK
Hi,
The latest code in the SVN repo has the xsi:type feature implemented. You can check it out and test if it works for your use case.
For some reason the link to the repo is messed-up in the Code section - I have to contact the SF guys for that - use this instead:
https://exip.svn.sourceforge.net/svnroot/exip
Note that it is only tested for schema-less encoding - you can have a look at the unit test in trunk/tests/check_xsi_type.c for more information on the usage.
Any additional use-cases (such as schema strict and non-strict mode) added to check_xsi_type.c will be highly appreciated especially if you find issues.
Regards,
Rumen
Hi Rumen,
I have tested my code with new library. Encoding is working fine it seems.
I made one change as below.
../../src/grammarGen/src/genUtils.c:219: addProductionsToARule: Assertion `FALSE' failed.
I have commented that line, then encoding is working.
I guess, you didn't add decoding part of xsi:type.
I didn't see any code related to qname decoding.
Correct me If I am wrong.
I try to do few more test cases. If i find any issues, I'll update you.
If possible, can you share me the xsi:type decoding part.
Thanks,
SK
Hi,
You're right, I forgot to add the handler for the decoding part. I was wondering if a should reuse the string handler for the xsi:type value but now I added qname handler. You can update your code - the assertion should also be fixed now.
The only thing left is the issue with xsi:type when Preserve.lexicalValues is true but that is to be solved later.
Regards,
Rumen
Hi everybody,
Has someone written an example of using xsi:type in schema-informed mode ?
Regards
Denis
I modified check_xsi_type.c to test xsi:type in schema informed mode.
The encoding and parsing return no error, but the xsi:type attribute is not present in the parsing.
(note that in schemaless mode, same code, the xsi:type attribute is present)
Note : I use svn release 276
Last edit: Denis Froschauer 2013-05-26
Update : save behavior with release 287
Hi Denis,
Can you commit the new test case (best if it is a separate and not replacing the old one for schemaless) so I can have a look?
Best regards,
Rumen
Done : r288
Regards
Denis
Thanks!
The test case is integrated and the bug fixed in trunk.
It was just that the AT callback handler was not called in that particular case
Best,
Rumen
Well done ! Trunk r289 corrects the issue.
Denis