[xsd-users] How to get rid of "P0Y" as default zero duration value

Cihan-Kaya.Guenduez Cihan-Kaya.Guenduez at l3harris.com
Wed May 27 09:28:53 EDT 2020


Dear Sir or Madam,

is there any possibility to get around the default definition of the zero xs:duration value "P0Y" (zero years)?
For example the definition of xs:dayTimeDuration uses a restriction pattern:
<xs:simpleType name="dayTimeDuration">
    <xs:restriction base="xs:duration">
        <xs:pattern id="dayTimeDuration.pattern" value="[^YM]*(T.*)?"/>
    </xs:restriction>
</xs:simpleType>

Using the generated serialization functions (cxx/tree/serialization into output stream), a zero dayTimDuration always yield in "P0Y" and violates the restriction pattern.



I look forward to hearing from you soon.

Yours faithfully,
Cihan-Kaya Gündüz

  

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient and may contain material that is proprietary, confidential, privileged or otherwise legally protected or restricted under applicable government laws. Any review, disclosure, distributing or other use without expressed permission of the sender is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies without reading, printing, or saving.



More information about the xsd-users mailing list