From SYegnaram at cls-bank.com Wed Mar 15 00:54:56 2023 From: SYegnaram at cls-bank.com (Yegnaram, Shrikant) Date: Wed Mar 15 06:48:37 2023 Subject: [xsde-users] xs:date , xs:datetime validation Message-ID: Hi Team, We are using xsde-3.2.0-x86_64-linux-gnu release . Following is the XSD we are using for our test: Following options were used to generate the runtime files from the XSD xsde cxx-hybrid --generate-inline --generate-parser --generate-clone --generate-aggregate --generate-serializer datetimetest.xsd As part of our test, we used following XML. This XML does not fail the XSD validation, even though the tag value is invalid. 2012-01-31T04:12:12 2023-02-30 Same issue i.e parsing success was found for dates like below 2023-04-31 2023-02-29 Same issue is observed for xs:datetime fields as well. As per W3 website, W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes Constraint: Day-of-month Values The *day* value must be no more than 30 if *month* is one of 4, 6, 9, or 11, no more than 28 if *month* is 2 and *year* is not divisible by 4, or is divisible by 100 but not by 400, and no more than 29 if *month* is 2 and *year* is divisible by 400, or by 4 but not by 100. Given this constraint, expectation from the Codesynthesis XSD/e product is expected to validate the number of days in a date value. Please check the same and revert the findings to us. Thanks, Shrikant Yegnaram CLS Classification: Confidential Information This email was classified by Yegnaram, Shrikant on Wednesday, March 15, 2023 12:53:26 AM CLS is committed to protecting and safeguarding your personal data. Our privacy notice provides you with information about how we process and protect your personal data. We aim to ensure direct marketing is reasonable, proportionate and of relevance to you. However, if you no longer want to receive direct marketing from us please email dpo@cls-services.com. ************************************************************************************************************************************************************************ WARNING: This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of this e-mail transmission. If verification is required, please request a hard copy version. CLS is committed to protecting and safeguarding your personal data. Our privacy notice (https://www.cls-group.com/privacy) provides you with information about how we process and protect your personal data. We aim to ensure direct marketing is reasonable, proportionate and of relevance to you. However, if you no longer want to receive direct marketing from us please email dpo@cls-services.com From boris at codesynthesis.com Wed Mar 15 07:17:06 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Mar 15 07:09:28 2023 Subject: [xsde-users] xs:date , xs:datetime validation In-Reply-To: References: Message-ID: Yegnaram, Shrikant writes: > Following options were used to generate the runtime files from the XSD > > xsde cxx-hybrid --generate-inline > --generate-parser > --generate-clone > --generate-aggregate > --generate-serializer > datetimetest.xsd > > This XML does not fail the XSD validation, even though the tag > value is invalid. The validation of the built-in XML Schema types is implemented in the libxsde runtime library. Can you confirm that you have built it with validation support enabled? From SYegnaram at cls-bank.com Wed Mar 15 14:24:11 2023 From: SYegnaram at cls-bank.com (Yegnaram, Shrikant) Date: Thu Mar 16 07:30:03 2023 Subject: [EXT] Re: [xsde-users] xs:date , xs:datetime validation In-Reply-To: References: Message-ID: Hello Boris Following are the flags we used for libxsde compilation . Yes we have enabled parser/serializer validation XSDE_PLATFORM := posix XSDE_ARCH_WIDTH := 64 XSDE_BYTEORDER := l XSDE_ENCODING := utf8 XSDE_STL := y XSDE_STL_ITERATOR := y XSDE_IOSTREAM := y XSDE_EXCEPTIONS := y XSDE_LONGLONG := y XSDE_SNPRINTF := y XSDE_PARSER_VALIDATION := y XSDE_SERIALIZER_VALIDATION := y XSDE_REGEXP := y XSDE_REUSE_STYLE := tiein XSDE_CUSTOM_ALLOCATOR := n XSDE_DEFAULT_ALLOCATOR := n XSDE_CDR := n XSDE_XDR := n XSDE_POLYMORPHIC := n XSDE_PARSER_SMAP_BUCKETS := 53 XSDE_PARSER_IMAP_BUCKETS := 97 XSDE_SERIALIZER_SMAP_BUCKETS := 53 XSDE_SERIALIZER_SMAP_BUCKET_BUCKETS := 53 XSDE_SERIALIZER_IMAP_BUCKETS := 97 Thanks, Shrikant ________________________________ From: Boris Kolpackov Sent: Wednesday, March 15, 2023 7:17 AM To: Yegnaram, Shrikant Cc: xsde-users@codesynthesis.com ; Ramanathan, Murali ; Parthasarathy, Madhusoodan Subject: [EXT] Re: [xsde-users] xs:date , xs:datetime validation

Be careful with this message: it has been sent from an external email address.
Do not open attachments or click links from unknown senders or unexpected email.

Yegnaram, Shrikant writes: > Following options were used to generate the runtime files from the XSD > > xsde cxx-hybrid --generate-inline > --generate-parser > --generate-clone > --generate-aggregate > --generate-serializer > datetimetest.xsd > > This XML does not fail the XSD validation, even though the tag > value is invalid. The validation of the built-in XML Schema types is implemented in the libxsde runtime library. Can you confirm that you have built it with validation support enabled? CLS Classification: Confidential Information This email was classified by Yegnaram, Shrikant on Wednesday, March 15, 2023 2:22:23 PM CLS is committed to protecting and safeguarding your personal data. Our privacy notice provides you with information about how we process and protect your personal data. We aim to ensure direct marketing is reasonable, proportionate and of relevance to you. However, if you no longer want to receive direct marketing from us please email dpo@cls-services.com. ************************************************************************************************************************************************************************ WARNING: This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of this e-mail transmission. If verification is required, please request a hard copy version. CLS is committed to protecting and safeguarding your personal data. Our privacy notice (https://www.cls-group.com/privacy) provides you with information about how we process and protect your personal data. We aim to ensure direct marketing is reasonable, proportionate and of relevance to you. However, if you no longer want to receive direct marketing from us please email dpo@cls-services.com From boris at codesynthesis.com Mon Mar 20 08:45:31 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Mar 20 08:43:17 2023 Subject: [EXT] Re: [xsde-users] xs:date , xs:datetime validation In-Reply-To: References: Message-ID: Yegnaram, Shrikant writes: > Yes we have enabled parser/serializer validation Thanks for the confirmation. I dug a bit deeper into this and it appears that the constraint you have quoted is from the XML Schema 1.1 specification while XSD/e only aims to conform to XML Schema 1.0 (even more precisely, it only aims to conform for validation to a subset of it; see [1][2]). And looking at the XML Schema 1.0 specification, there is no such constraint (but there is a general statement to the effect that the date shall be valid). This is the reason why we don't have tighter validation for these types. However, the constraint in the XML Schema 1.1 is quite sensible and is not too expensive to implement (neither with regards to footprint nor performance). So I went ahead and implemented it (as well as a similar constraint for gMonthDay). You can find the patch here: https://git.codesynthesis.com/cgit/xsde/xsde/commit/?id=387d98b80d9f383c4c7708a42444472cb89dd42b I think it should apply cleanly to XSD/e 3.2.0 if you would like to give it a try (you will need to apply it and rebuilt the libxsde runtime). Alternatively, if you would like, I can apply it to 3.2.0 and make the affected files available. [1] https://codesynthesis.com/projects/xsde/documentation/cxx/parser/guide/#A [2] https://codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/#A From SYegnaram at cls-bank.com Tue Mar 28 15:08:56 2023 From: SYegnaram at cls-bank.com (Yegnaram, Shrikant) Date: Thu Mar 30 07:10:23 2023 Subject: [EXT] Re: Re: [xsde-users] xs:date , xs:datetime validation In-Reply-To: References: Message-ID: Hi Boris, Thanks for the explanation and the fixes provided. Can you explain more on what you mean by below : I think it should apply cleanly to XSD/e 3.2.0 if you would like to give it a try (you will need to apply it and rebuilt the libxsde runtime). Alternatively, if you would like, I can apply it to 3.2.0 and make the affected files available. First option would be for us to pick up the files from git and recompile libxsde runtime and test. Second option, are you saying, you would make a new XSD/e product release and package the updated files with the release? Thanks, Shrikant Yegnaram CLS Classification: Confidential Information This email was classified by Yegnaram, Shrikant on Tuesday, March 28, 2023 3:07:39 PM CLS is committed to protecting and safeguarding your personal data. Our privacy notice provides you with information about how we process and protect your personal data. We aim to ensure direct marketing is reasonable, proportionate and of relevance to you. However, if you no longer want to receive direct marketing from us please email dpo@cls-services.com. -----Original Message----- From: Boris Kolpackov Sent: Monday, March 20, 2023 8:46 AM To: Yegnaram, Shrikant Cc: xsde-users@codesynthesis.com; Ramanathan, Murali ; Parthasarathy, Madhusoodan Subject: [EXT] Re: Re: [xsde-users] xs:date , xs:datetime validation

Be careful with this message: it has been sent from an external email address.
Do not open attachments or click links from unknown senders or unexpected email.

Yegnaram, Shrikant > writes: > Yes we have enabled parser/serializer validation Thanks for the confirmation. I dug a bit deeper into this and it appears that the constraint you have quoted is from the XML Schema 1.1 specification while XSD/e only aims to conform to XML Schema 1.0 (even more precisely, it only aims to conform for validation to a subset of it; see [1][2]). And looking at the XML Schema 1.0 specification, there is no such constraint (but there is a general statement to the effect that the date shall be valid). This is the reason why we don't have tighter validation for these types. However, the constraint in the XML Schema 1.1 is quite sensible and is not too expensive to implement (neither with regards to footprint nor performance). So I went ahead and implemented it (as well as a similar constraint for gMonthDay). You can find the patch here: https://git.codesynthesis.com/cgit/xsde/xsde/commit/?id=387d98b80d9f383c4c7708a42444472cb89dd42b I think it should apply cleanly to XSD/e 3.2.0 if you would like to give it a try (you will need to apply it and rebuilt the libxsde runtime). Alternatively, if you would like, I can apply it to 3.2.0 and make the affected files available. [1] https://codesynthesis.com/projects/xsde/documentation/cxx/parser/guide/#A [2] https://codesynthesis.com/projects/xsde/documentation/cxx/serializer/guide/#A ************************************************************************************************************************************************************************ WARNING: This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of this e-mail transmission. If verification is required, please request a hard copy version. CLS is committed to protecting and safeguarding your personal data. Our privacy notice (https://www.cls-group.com/privacy) provides you with information about how we process and protect your personal data. We aim to ensure direct marketing is reasonable, proportionate and of relevance to you. However, if you no longer want to receive direct marketing from us please email dpo@cls-services.com From boris at codesynthesis.com Fri Mar 31 05:38:51 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Mar 31 05:31:03 2023 Subject: [EXT] Re: Re: [xsde-users] xs:date , xs:datetime validation In-Reply-To: References: Message-ID: Yegnaram, Shrikant writes: > First option would be for us to pick up the files from git and recompile > libxsde runtime and test. No, the first option is to download the .patch file (there is a link on the git web interface to it) and apply it using the patch utility to the XSD/e 3.2.0 source code. Copying the files from git may not work since there could be other, incompatible changes. > Second option, are you saying, you would make a new XSD/e product > release and package the updated files with the release? No, the second option is for me to do the first option and provide the patched files to you. Here they are: https://codesynthesis.com/~boris/tmp/xsde/xsde-3.2.0-libxsde-date-time.tar.gz