Re: [Xsltforms-support] Question Re Implementing Custom Types
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2023-10-06 06:26:25
|
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> Hello Tony, </div> <div class="default-style"> </div> <div class="default-style"> I would suspect a missing namespace declaration because there is no prefix for "DateTimeWithTimezoneDatatype". A minimal test form should be necessary to investigate. </div> <div class="default-style"> </div> <div class="default-style"> There is currently not full support for XML Schema but restrictions on simple types should work. </div> <div class="default-style"> </div> <div class="default-style"> XSLTForms 1.7 is the latest version. It is based on HTML custom elements. Styling is to be done accordingly so transition with previous releases, before 1.5, can be non intuitive. </div> <div class="default-style"> </div> <div class="default-style"> Thank you for your feedback! </div> <div class="default-style"> </div> <div class="default-style"> --Alain </div> <blockquote type="cite"> <div> Le 06/10/2023 06:45 CEST, ajb...@aj... a écrit : </div> <div> </div> <div> </div> <div class="WordSection1"> <p class="MsoNormal">Hello Alain and Company,</p> <p class="MsoNormal"> </p> <p class="MsoNormal">I am a new user of XSLTForms, exploring the framework, and am quite impressed, especially considering it’s a free product.</p> <p class="MsoNormal"> </p> <p class="MsoNormal">However, I would like confirmation that what I am seeing is indeed the case, or if I am missing something, regarding handling custom types.</p> <p class="MsoNormal"> </p> <p class="MsoNormal">In my model definition I reference a schema file, expecting to link up the types defined therein to my bind statements. The types I am trying to use are <em>simpleTypes</em>. Here is an example:</p> <p class="MsoNormal"> </p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"><xs:simpleType name="DateTimeWithTimezoneDatatype"><br> <xs:annotation><br> <xs:documentation>A string representing a point in time with a required timezone.</xs:documentation><br> </xs:annotation><br> <xs:restriction base="DateTimeDatatype"><br> <xs:pattern value="(((2000|2400|2800|(19|2[0-9](0[48]|[2468][048]|[13579][26])))-02-29)|(((19|2[0-9])[0-9]{2})-02-(0[1-9]|1[0-9]|2[0-8]))|(((19|2[0-9])[0-9]{2})-(0[13578]|10|12)-(0[1-9]|[12][0-9]|3[01]))|(((19|2[0-9])[0-9]{2})-(0[469]|11)-(0[1-9]|[12][0-9]|30)))T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]+)?(Z|(-((0[0-9]|1[0-2]):00|0[39]:30)|\+((0[0-9]|1[0-4]):00|(0[34569]|10):30|(0[58]|12):45)))"/><br> </xs:restriction></span></p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"></xs:simpleType></span></p> <p class="MsoNormal"><span style="color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"> </span></p> <p class="MsoNormal">And the bind trying to use it (the ‘o:’ namespace used in @ref is indeed confirmed correct):</p> <p class="MsoNormal"><span style="color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"> </span></p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"><xf:bind id="/published" ref="/o:published" type=" DateTimeWithTimezoneDatatype"/></span></p> <p class="MsoNormal"><span style="color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"> </span></p> <p class="MsoNormal"><span style="color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;">And finally, the input field:<br><br></span><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"><xf:input bind="/published" incremental="true" type-ref="</span> <span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;">DateTimeWithTimezoneDatatype"></span></p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"> <xf:label></span></p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"> <b>Published:</b></span></p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"> </xf:label></span></p> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Courier New'; color: #203864; mso-style-textfill-fill-color: #203864; mso-style-textfill-fill-alpha: 100.0%;"></xf:input></span></p> <p class="MsoNormal"> </p> <p class="MsoNormal"><span style="mso-ligatures: none;">I get no ostensible complaints from the xf processor, but no validation behavior either (i.e. entering invalid values provokes no response). </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">(Note that the slashes in the @id and @bind attributes seem to be permissible if non-standard.)</span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">Can the XSLTForms processor handle the schema type as defined above? It seems to acknowledge the type, but not operate using it.</span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">Or are users expected to create type-handling additions in xsltforms.js?</span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">I am unclear as to the situation in XSLTForms 1.7, which is the version I am using.</span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">Please advise, and thank you in advance!</span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">-Tony Bufort, </span></p> <p class="MsoNormal"><span style="mso-ligatures: none;">AJB Consulting</span></p> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <table class="MsoNormalTable" border="0" cellpadding="0"> <tbody> <tr> <td style="border: solid red 1.0pt; border-left: none; padding: .75pt 5.25pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-family: 'Arial',sans-serif;"><img id="Picture_x0020_1" style="width: 1.6354in; height: .875in;" src="cid:image001.png@01D9F797.15A6DE00" alt="ttp://www.ajbconsulting.us/images/outlook/AJB_Consulting_new_logo_OUTLOOK_SIGNATURE.png" width="157" height="84"></span></p> <p class="MsoNormal"><span style="font-family: Courier; mso-ligatures: none;"><a href="http://www.ajbconsulting.us/"><span style="color: blue;">www.ajbconsulting.us</span></a></span></p> </td> <td style="border: solid red 1.0pt; border-right: none; padding: .75pt .75pt .75pt 3.75pt;"> <p class="MsoNormal"><span style="font-size: 12.0pt; font-family: 'Arial',sans-serif; mso-ligatures: none;"> <strong>Anthony J. (Tony) Bufort</strong><br> </span><em><span style="font-family: 'Arial',sans-serif; mso-ligatures: none;">Owner / Sr. Developer</span></em></p> <table class="MsoNormalTable" border="0" cellpadding="0"> <tbody> <tr> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-size: 9.0pt;"><img id="Picture_x0020_2" style="width: .1666in; height: .1666in;" src="cid:image002.png@01D9F797.15A6DE00" alt="ttp://www.ajbconsulting.us/images/outlook/icons/email.png" width="16" height="16" border="0"></span></p> </td> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><strong><span style="font-size: 9.0pt; mso-ligatures: none;">EMAIL:</span></strong><span style="font-size: 9.0pt; mso-ligatures: none;"> <a><span style="color: blue;">ajb...@aj...</span></a></span></p> </td> </tr> <tr> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-size: 9.0pt;"><img id="Picture_x0020_3" style="width: .1666in; height: .1666in;" src="cid:image003.png@01D9F797.15A6DE00" alt="ttp://www.ajbconsulting.us/images/outlook/icons/phone.png" width="16" height="16" border="0"></span></p> </td> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><strong><span style="font-size: 9.0pt; mso-ligatures: none;">PHONE:</span></strong><span style="font-size: 9.0pt; mso-ligatures: none;"> (425) 221-4447</span></p> </td> </tr> <tr> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-size: 9.0pt;"><img id="Picture_x0020_4" style="width: .1666in; height: .1666in;" src="cid:image004.png@01D9F797.15A6DE00" alt="ttp://www.ajbconsulting.us/images/outlook/icons/skype.png" width="16" height="16" border="0"></span></p> </td> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><strong><span style="font-size: 9.0pt; mso-ligatures: none;">SKYPE:</span></strong><span style="font-size: 9.0pt; mso-ligatures: none;"> ajbufort</span></p> </td> </tr> <tr> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-size: 9.0pt;"><img id="Picture_x0020_5" style="width: .1666in; height: .1666in;" src="cid:image005.png@01D9F797.15A6DE00" alt="ttp://www.ajbconsulting.us/images/outlook/icons/linkedin.png" width="16" height="16" border="0"></span></p> </td> <td style="padding: .75pt .75pt .75pt .75pt;"> <p class="MsoNormal"><strong><span style="font-size: 9.0pt; mso-ligatures: none;">LINKEDIN:</span></strong><span style="font-size: 9.0pt; mso-ligatures: none;"> <a href="http://www.linkedin.com/in/anthonybufort"><span style="color: blue;">www.linkedin.com/in/anthonybufort</span></a></span></p> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <p class="MsoNormal"><span style="display: none; mso-ligatures: none;"> </span></p> <table class="MsoNormalTable" style="border: none; border-bottom: solid red 1.0pt;" border="1" cellpadding="0"> <tbody> <tr> <td style="border: none; padding: 3.0pt .75pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; mso-ligatures: none;"> <img id="Picture_x0020_6" style="width: .3958in; height: .2604in;" src="cid:image006.jpg@01D9F797.15A6DE00" alt="ttp://www.ajbconsulting.us/images/outlook/wa_state_seal_sm.jpg" width="38" height="25" border="0"></span></p> </td> <td style="border: none; padding: 3.0pt .75pt .75pt .75pt;"> <p class="MsoNormal"><span style="font-size: 9.0pt; font-family: 'Arial',sans-serif; mso-ligatures: none;"> A <strong><em>fully licensed, fully insured</em></strong> Washington state entity. </span></p> </td> </tr> </tbody> </table> <p class="MsoNormal"><span style="mso-ligatures: none;"> </span></p> <p class="MsoNormal"> </p> </div> _______________________________________________ Xsltforms-support mailing list Xsl...@li... https://lists.sourceforge.net/lists/listinfo/xsltforms-support </blockquote> </body> </html> |