On 01.07.2004 21:42, Colin Paul Adams wrote:
<fd:field id="start-time"> <fd:label>Start time</fd:label> <fd:datatype base="date"> <fd:convertor datatype="date" variant="time" type="formatting"/> </fd:datatype> </fd:field>
With a binding of:
<fb:value id="start-time" path="@time" > <fd:convertor datatype="date" variant="time" type="formatting"/> </fb:value>
The processing chain is picking up the date dataype somewhere, and adding an <fi:styling type="date"/> (I think) element. Can someone tell me where this is done?
The datatype implementation does it. Here the datatype is date, so:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/typeimpl/DateType.java?rev=1.2&view=markup
which extends AbstractDatatype, from where the implementation of this method is taken:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatype.java?annotate=1.5#99
generateSAXFragment()
The calendar sample stylesheet is then putting in a date-picker popup, which in this case is far from appropriate.
That's correct, the variant would in this case also interesting.
As far as I can see, there is no fi:styling option corresponding to datatype="date" variant="time" (please tell me I'm wrong!).
AFAIK that's correct too.
I guess I can add fi:styling elements to my template, to override this behaviour. Simply adding a class and tailoring the CSS file should be sufficient for presentation.
Yes, it should work. I hope fi:styling information in template overrides the one from the form model.
I'm not sure how to go about validation though.
You should provide a pattern, the rest is (or should be?) like normal date.
Is the full syntax of fi:styling documented somewhere? I can find limited documentation at:
http://cocoon.apache.org/2.1/userdocs/forms/xslt.html#fi%3Astyling+options
but it is far from exhaustive. I think perhaps it depends entirely on the stylesheets used to interpret it?
Exactly. You can write everything into your template, most of it is just copied to the output.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
