- From: Kia Dabirian <kia_dabirian@yahoo.com>
- Date: Tue, 20 Aug 2002 02:11:52 -0700 (PDT)
- To: www-forms@w3.org
According to the public draft (WD-xforms-20020118) most of the form controls can contain one caption element and one or more help, hint, alert, action or extension elements. What are the multiple help, hint and alert elements supposed to be used for? In 8.12.4 the draft says: Finally, an XForms processor can use content negotiation to obtain the appropriate XML resource bundle, e.g., based on the accept-language headers from the client, to serve up the user interface with messages localized to the client's locale. Dose this mean all the help, hint and alert elements are supposed to contain (or link to) the same thing but in different languages? And if so why can one not have multiple caption elements? In my personal application I have need for a meta tag that represents the text from the second image in 10.15 of the draft: "Please enter your password – it will not be visible as you type". Is there a way to define something like this in the definition? Maybe it can be a new element "description" or "header" or a new message type level="default". I also need a "footer" element. Right now I use the hint element for this. Should I change to an element in the extension element? I also am trying to find my way trough the "Processing Model". As I understand it at some times the "revalidate" event is fired on a single field (which can be a container field) or on the model element. The filed is thus checked for schema correctness and validity (isvalid attribute on bind). If the checks fail an "invalid" event is dispatched to the field which by default dispatches a "alert" event which displays the content of the alert meta tag if any or generates an automatic error message (Is all this correct?). Here I would like to have a mechanism to define what "alert texts" should be displayed on what errors. Here is an example: <!-- ... --> <model xmlns=".../xforms"> <schema xmlns=".../XMLSchema"> <schema> <element name="age"> <simpleType> <restriction base="positiveInteger"> <maxExclusive value="120"/> </restriction> </simpleType> </element> <!-- ... --> </schema> </schema> <instance> <data xmlns=""> <age/> <!-- ... --> </data> </iunstance> <xforms:bind id="a" ref="//age" xmlns:xforms=".../xforms" xmlns="" isvalid="number(//age) >= 21"/> <!-- ... --> </model> <!-- ... --> <input bind="a" xmlns=".../2002/01/xforms"> <caption>Age</age> <alert error="//xs:age//xs:restriction/@base" xmlns:xs=".../XMLSchema" >You must enter a number.</alert> <alert error="//xs:age//xs:maxExclusive" xmlns:xs=".../XMLSchema" >The number must be less than 120.</alert> <alert error="//bind[@id='a']/@isvalid" xmlns:xs=".../XMLSchema" >The number must be 21 or more.</alert> </input> <!-- ... --> As you can see the alert elements, through the "error" attribute, identify (if my xpath is correct) which constraint caused the error. Is there a way to define this behavior in the current definition? Kia Dabirian __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com
Received on Tuesday, 20 August 2002 05:11:54 UTC