sylvain 2003/10/24 07:13:50
Modified: src/blocks/woody/java/org/apache/cocoon/woody/formmodel AbstractWidgetDefinition.java AbstractWidgetDefinitionBuilder.java Action.java ActionDefinitionBuilder.java AggregateField.java AggregateFieldDefinitionBuilder.java BooleanField.java BooleanFieldDefinitionBuilder.java Field.java FieldDefinitionBuilder.java FormDefinitionBuilder.java MultiValueField.java MultiValueFieldDefinitionBuilder.java Output.java OutputDefinitionBuilder.java RepeaterActionDefinitionBuilder.java RepeaterDefinitionBuilder.java src/blocks/woody/samples/resources woody-field-styling.xsl woody-page-styling.xsl Log: Adding support for <wd:hint> and <wd:help> Revision Changes Path 1.2 +48 -10 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractWidgetDefinition.java Index: AbstractWidgetDefinition.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractWidgetDefinition.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractWidgetDefinition.java 22 Apr 2003 12:04:19 -0000 1.1 +++ AbstractWidgetDefinition.java 24 Oct 2003 14:13:49 -0000 1.2 @@ -50,16 +50,21 @@ */ package org.apache.cocoon.woody.formmodel; +import java.util.Iterator; +import java.util.Map; + import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; import org.apache.cocoon.components.sax.XMLByteStreamInterpreter; +import org.apache.cocoon.woody.Constants; /** * Provides functionality that is common across many WidgetDefinition implementations. */ public abstract class AbstractWidgetDefinition implements WidgetDefinition { private String id; - private Object label; +// private Object label; + private Map displayData; public String getId() { return id; @@ -69,20 +74,53 @@ this.id = id; } + public void generateLabel(ContentHandler contentHandler) throws SAXException { + generateDisplayData("label", contentHandler); + } + /** - * Sets the label for this widget. The label must be a SAX fragment generated - * with Cocoon's XMLByteStreamCompiler. This approach allows to have - * mixed content in labels. + * Sets the various display data for this widget. This includes the label, hint and help. + * They're all SAX fragments generated with Cocoon's XMLByteStreamCompiler. This approach + * allows to have mixed content in these data. + * + * @param displayData an association of {name, sax fragment} */ - public void setLabel(Object label) { - this.label = label; + public void setDisplayData(Map displayData) { + this.displayData = displayData; } - - public void generateLabel(ContentHandler contentHandler) throws SAXException { - if (label != null) { + + public void generateDisplayData(String name, ContentHandler contentHandler) throws SAXException { + Object data = this.displayData.get(name); + if (data != null) { XMLByteStreamInterpreter interpreter = new XMLByteStreamInterpreter(); interpreter.setContentHandler(contentHandler); - interpreter.deserialize(label); + interpreter.deserialize(data); + + } else if (!this.displayData.containsKey(name)) { + throw new IllegalArgumentException("Unknown display data name '" + name + "'"); + } + } + + public void generateDisplayData(ContentHandler contentHandler) throws SAXException { + XMLByteStreamInterpreter interpreter = new XMLByteStreamInterpreter(); + + // Output all non-null display data + Iterator iter = this.displayData.entrySet().iterator(); + while (iter.hasNext()) { + Map.Entry entry = (Map.Entry)iter.next(); + if (entry.getValue() != null) { + String name = (String)entry.getKey(); + + // Enclose the data into a "wi:{name}" element + contentHandler.startElement(Constants.WI_NS, name, Constants.WI_PREFIX_COLON + name, Constants.EMPTY_ATTRS); + + interpreter.setContentHandler(contentHandler); + interpreter.deserialize(entry.getValue()); + interpreter.recycle(); + + contentHandler.endElement(Constants.WI_NS, name, Constants.WI_PREFIX_COLON + name); + } } + } } 1.6 +20 -8 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractWidgetDefinitionBuilder.java Index: AbstractWidgetDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractWidgetDefinitionBuilder.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- AbstractWidgetDefinitionBuilder.java 24 Sep 2003 20:47:06 -0000 1.5 +++ AbstractWidgetDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.6 @@ -52,7 +52,9 @@ import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -94,14 +96,6 @@ widgetDefinition.setId(id); } - protected void setLabel(Element widgetElement, AbstractWidgetDefinition widgetDefinition) { - Element labelElement = DomHelper.getChildElement(widgetElement, Constants.WD_NS, "label"); - if (labelElement != null) { - Object label = DomHelper.compileElementContent(labelElement); - widgetDefinition.setLabel(label); - } - } - protected WidgetDefinition buildAnotherWidgetDefinition(Element widgetDefinition) throws Exception { String widgetName = widgetDefinition.getLocalName(); WidgetDefinitionBuilder builder = null; @@ -128,6 +122,24 @@ } return result == null ? Collections.EMPTY_LIST : result; + } + + protected void setDisplayData(Element widgetElement, AbstractWidgetDefinition widgetDefinition) throws Exception { + final String[] names = {"label", "help", "hint"}; + Map displayData = new HashMap(names.length); + for (int i = 0; i < names.length; i++) { + Object data = null; + Element dataElement = DomHelper.getChildElement(widgetElement, Constants.WD_NS, names[i]); + if (dataElement != null) { + data = DomHelper.compileElementContent(dataElement); + } + + // Note: we put also null values in the may in order to test their existence + // (see AbstractWidgetDefinition.generateDisplayData) + displayData.put(names[i], data); + } + + widgetDefinition.setDisplayData(displayData); } public void dispose() { 1.3 +2 -3 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Action.java Index: Action.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Action.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Action.java 24 Sep 2003 20:47:06 -0000 1.2 +++ Action.java 24 Oct 2003 14:13:49 -0000 1.3 @@ -118,9 +118,8 @@ AttributesImpl buttonAttrs = new AttributesImpl(); buttonAttrs.addCDATAAttribute("id", getFullyQualifiedId()); contentHandler.startElement(Constants.WI_NS, ACTION_EL, Constants.WI_PREFIX_COLON + ACTION_EL, buttonAttrs); - contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS); - generateLabel(contentHandler); - contentHandler.endElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL); + // generate label, help, hint, etc. + definition.generateDisplayData(contentHandler); contentHandler.endElement(Constants.WI_NS, ACTION_EL, Constants.WI_PREFIX_COLON + ACTION_EL); } 1.4 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/ActionDefinitionBuilder.java Index: ActionDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/ActionDefinitionBuilder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ActionDefinitionBuilder.java 8 Oct 2003 09:13:05 -0000 1.3 +++ ActionDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.4 @@ -63,7 +63,7 @@ public WidgetDefinition buildWidgetDefinition(Element widgetElement) throws Exception { ActionDefinition actionDefinition = createDefinition(); setId(widgetElement, actionDefinition); - setLabel(widgetElement, actionDefinition); + setDisplayData(widgetElement, actionDefinition); String actionCommand = DomHelper.getAttribute(widgetElement, "action-command"); actionDefinition.setActionCommand(actionCommand); 1.8 +2 -4 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateField.java Index: AggregateField.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateField.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- AggregateField.java 25 Sep 2003 17:37:30 -0000 1.7 +++ AggregateField.java 24 Oct 2003 14:13:49 -0000 1.8 @@ -254,10 +254,8 @@ contentHandler.endElement(Constants.WI_NS, VALIDATION_MSG_EL, Constants.WI_PREFIX_COLON + VALIDATION_MSG_EL); } - // the label - contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS); - definition.generateLabel(contentHandler); - contentHandler.endElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL); + // generate label, help, hint, etc. + definition.generateDisplayData(contentHandler); contentHandler.endElement(Constants.WI_NS, AGGREGATEFIELD_EL, Constants.WI_PREFIX_COLON + AGGREGATEFIELD_EL); } 1.3 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateFieldDefinitionBuilder.java Index: AggregateFieldDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateFieldDefinitionBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AggregateFieldDefinitionBuilder.java 16 Jul 2003 13:59:41 -0000 1.2 +++ AggregateFieldDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.3 @@ -68,7 +68,7 @@ public WidgetDefinition buildWidgetDefinition(Element widgetElement) throws Exception { AggregateFieldDefinition definition = new AggregateFieldDefinition(); setId(widgetElement, definition); - setLabel(widgetElement, definition); + setDisplayData(widgetElement, definition); // make childfields Element childrenElement = DomHelper.getChildElement(widgetElement, Constants.WD_NS, "children", true); 1.5 +2 -3 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/BooleanField.java Index: BooleanField.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/BooleanField.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- BooleanField.java 24 Sep 2003 20:47:06 -0000 1.4 +++ BooleanField.java 24 Oct 2003 14:13:49 -0000 1.5 @@ -118,9 +118,8 @@ contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length()); contentHandler.endElement(Constants.WI_NS, VALUE_EL, Constants.WI_PREFIX_COLON + VALUE_EL); - contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS); - definition.generateLabel(contentHandler); - contentHandler.endElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL); + // generate label, help, hint, etc. + definition.generateDisplayData(contentHandler); contentHandler.endElement(Constants.WI_NS, BOOLEAN_FIELD_EL, Constants.WI_PREFIX_COLON + BOOLEAN_FIELD_EL); } 1.4 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/BooleanFieldDefinitionBuilder.java Index: BooleanFieldDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/BooleanFieldDefinitionBuilder.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BooleanFieldDefinitionBuilder.java 8 Oct 2003 09:13:05 -0000 1.3 +++ BooleanFieldDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.4 @@ -62,7 +62,7 @@ public WidgetDefinition buildWidgetDefinition(Element widgetElement) throws Exception { BooleanFieldDefinition definition = new BooleanFieldDefinition(); setId(widgetElement, definition); - setLabel(widgetElement, definition); + setDisplayData(widgetElement, definition); Iterator iter = buildEventListeners(widgetElement, "on-value-changed", ValueChangedListener.class).iterator(); while (iter.hasNext()) { 1.13 +3 -5 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Field.java Index: Field.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Field.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Field.java 8 Oct 2003 10:03:19 -0000 1.12 +++ Field.java 24 Oct 2003 14:13:49 -0000 1.13 @@ -283,10 +283,8 @@ contentHandler.endElement(Constants.WI_NS, VALIDATION_MSG_EL, Constants.WI_PREFIX_COLON + VALIDATION_MSG_EL); } - // the label - contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS); - definition.generateLabel(contentHandler); - contentHandler.endElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL); + // generate label, help, hint, etc. + definition.generateDisplayData(contentHandler); // the selection list, if any if (selectionList != null) { 1.5 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/FieldDefinitionBuilder.java Index: FieldDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/FieldDefinitionBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- FieldDefinitionBuilder.java 8 Oct 2003 09:13:05 -0000 1.4 +++ FieldDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.5 @@ -81,7 +81,7 @@ fieldDefinition.addValueChangedListener((ValueChangedListener)iter.next()); } - setLabel(widgetElement, fieldDefinition); + setDisplayData(widgetElement, fieldDefinition); boolean required = DomHelper.getAttributeAsBoolean(widgetElement, "required", false); fieldDefinition.setRequired(required); 1.3 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/FormDefinitionBuilder.java Index: FormDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/FormDefinitionBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- FormDefinitionBuilder.java 16 Jul 2003 13:59:45 -0000 1.2 +++ FormDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.3 @@ -63,7 +63,7 @@ FormDefinition formDefinition = new FormDefinition(); formDefinition.setId(""); - setLabel(formElement, formDefinition); + setDisplayData(formElement, formDefinition); // all child elements of the form element, that are in woody's namespace, are supposed // to be widgets 1.7 +2 -4 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueField.java Index: MultiValueField.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueField.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- MultiValueField.java 24 Sep 2003 20:47:06 -0000 1.6 +++ MultiValueField.java 24 Oct 2003 14:13:49 -0000 1.7 @@ -159,10 +159,8 @@ } contentHandler.endElement(Constants.WI_NS, VALUES_EL, Constants.WI_PREFIX_COLON + VALUES_EL); - // the label - contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS); - definition.generateLabel(contentHandler); - contentHandler.endElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL); + // generate label, help, hint, etc. + definition.generateDisplayData(contentHandler); // the selection list (a MultiValueField has per definition always a SelectionList) definition.getSelectionList().generateSaxFragment(contentHandler, locale); 1.5 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueFieldDefinitionBuilder.java Index: MultiValueFieldDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueFieldDefinitionBuilder.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MultiValueFieldDefinitionBuilder.java 8 Oct 2003 09:13:05 -0000 1.4 +++ MultiValueFieldDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.5 @@ -66,7 +66,7 @@ MultiValueFieldDefinition definition = new MultiValueFieldDefinition(); setId(widgetElement, definition); - setLabel(widgetElement, definition); + setDisplayData(widgetElement, definition); Element datatypeElement = DomHelper.getChildElement(widgetElement, Constants.WD_NS, "datatype"); if (datatypeElement == null) 1.2 +2 -4 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Output.java Index: Output.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Output.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Output.java 12 Aug 2003 12:54:45 -0000 1.1 +++ Output.java 24 Oct 2003 14:13:49 -0000 1.2 @@ -53,10 +53,8 @@ contentHandler.endElement(Constants.WI_NS, VALUE_EL, Constants.WI_PREFIX_COLON + VALUE_EL); } - // the label - contentHandler.startElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL, Constants.EMPTY_ATTRS); - definition.generateLabel(contentHandler); - contentHandler.endElement(Constants.WI_NS, LABEL_EL, Constants.WI_PREFIX_COLON + LABEL_EL); + // generate label, help, hint, etc. + definition.generateDisplayData(contentHandler); contentHandler.endElement(Constants.WI_NS, OUTPUT_EL, Constants.WI_PREFIX_COLON + OUTPUT_EL); } 1.2 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/OutputDefinitionBuilder.java Index: OutputDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/OutputDefinitionBuilder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- OutputDefinitionBuilder.java 12 Aug 2003 12:54:45 -0000 1.1 +++ OutputDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.2 @@ -20,7 +20,7 @@ Datatype datatype = datatypeManager.createDatatype(datatypeElement, false); definition.setDatatype(datatype); - setLabel(widgetElement, definition); + setDisplayData(widgetElement, definition); return definition; } 1.3 +2 -2 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/RepeaterActionDefinitionBuilder.java Index: RepeaterActionDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/RepeaterActionDefinitionBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RepeaterActionDefinitionBuilder.java 8 Oct 2003 09:13:05 -0000 1.2 +++ RepeaterActionDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.3 @@ -79,7 +79,7 @@ String actionCommand = DomHelper.getAttribute(widgetElement, "action-command"); RepeaterActionDefinition definition = createDefinition(widgetElement, actionCommand); setId(widgetElement, definition); - setLabel(widgetElement, definition); + setDisplayData(widgetElement, definition); definition.setActionCommand(actionCommand); 1.3 +1 -1 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/RepeaterDefinitionBuilder.java Index: RepeaterDefinitionBuilder.java =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/RepeaterDefinitionBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RepeaterDefinitionBuilder.java 16 Jul 2003 13:59:45 -0000 1.2 +++ RepeaterDefinitionBuilder.java 24 Oct 2003 14:13:49 -0000 1.3 @@ -62,7 +62,7 @@ public WidgetDefinition buildWidgetDefinition(Element widgetElement) throws Exception { RepeaterDefinition repeaterDefinition = new RepeaterDefinition(); setId(widgetElement, repeaterDefinition); - setLabel(widgetElement, repeaterDefinition); + setDisplayData(widgetElement, repeaterDefinition); // the children of the repeater element are widget configuration elements Element[] widgetElements = DomHelper.getChildElements(widgetElement, Constants.WD_NS); 1.4 +8 -8 cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl Index: woody-field-styling.xsl =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- woody-field-styling.xsl 15 Oct 2003 13:08:47 -0000 1.3 +++ woody-field-styling.xsl 24 Oct 2003 14:13:50 -0000 1.4 @@ -58,7 +58,7 @@ Generic wi:field : produce an <input> --> <xsl:template match="wi:field"> - <input name="[EMAIL PROTECTED]" value="{wi:value}" title="{wi:help}"> + <input name="[EMAIL PROTECTED]" value="{wi:value}" title="{wi:hint}"> <xsl:if test="wi:styling"> <xsl:copy-of select="wi:styling/@*"/> </xsl:if> @@ -94,7 +94,7 @@ <xsl:choose> <!-- radio buttons --> <xsl:when test="$liststyle='radio'"> - <span title="{wi:help}"> + <span title="{wi:hint}"> <xsl:variable name="vertical" select="string(wi:styling/@list-orientation) != 'horizontal'"/> <xsl:variable name="id" select="@id"/> <xsl:for-each select="wi:selection-list/wi:item"> @@ -113,7 +113,7 @@ </xsl:when> <!-- dropdown or listbox --> <xsl:otherwise> - <select title="{wi:help}" name="[EMAIL PROTECTED]"> + <select title="{wi:hint}" name="[EMAIL PROTECTED]"> <xsl:if test="wi:styling/@submit-on-change='true'"> <xsl:attribute name="onchange">woody_submitForm(this)</xsl:attribute> </xsl:if> @@ -147,7 +147,7 @@ wi:field with @type 'textarea' --> <xsl:template match="wi:field[wi:[EMAIL PROTECTED]'textarea']]"> - <textarea name="[EMAIL PROTECTED]" title="{wi:help}"> + <textarea name="[EMAIL PROTECTED]" title="{wi:hint}"> <xsl:if test="wi:styling/@submit-on-change='true'"> <xsl:attribute name="onchange">woody_submitForm(this)</xsl:attribute> </xsl:if> @@ -196,7 +196,7 @@ wi:booleanfield : produce a checkbox --> <xsl:template match="wi:booleanfield"> - <input type="checkbox" value="true" name="[EMAIL PROTECTED]" title="{wi:help}"> + <input type="checkbox" value="true" name="[EMAIL PROTECTED]" title="{wi:hint}"> <xsl:if test="wi:styling/@submit-on-change='true'"> <xsl:attribute name="onchange">woody_submitForm(this)</xsl:attribute> </xsl:if> @@ -211,7 +211,7 @@ wi:action --> <xsl:template match="wi:action"> - <input type="submit" name="[EMAIL PROTECTED]" title="{wi:help}"> + <input type="submit" name="[EMAIL PROTECTED]" title="{wi:hint}"> <xsl:attribute name="value"><xsl:value-of select="wi:label/node()"/></xsl:attribute> </input> </xsl:template> @@ -238,7 +238,7 @@ <xsl:variable name="values" select="wi:values/wi:value/text()"/> <xsl:variable name="liststyle" select="wi:styling/@list-type"/> - <span title="{wi:help}"> + <span title="{wi:hint}"> <xsl:choose> <!-- checkbox --> <xsl:when test="$liststyle = 'checkbox'"> @@ -365,7 +365,7 @@ </xsl:template> <xsl:template match="wi:aggregatefield"> - <input name="[EMAIL PROTECTED]" value="{wi:value}" title="{wi:help}"> + <input name="[EMAIL PROTECTED]" value="{wi:value}" title="{wi:hint}"> <xsl:if test="wi:styling/@submit-on-change='true'"> <xsl:attribute name="onchange">woody_submitForm(this)</xsl:attribute> </xsl:if> 1.2 +1 -1 cocoon-2.1/src/blocks/woody/samples/resources/woody-page-styling.xsl Index: woody-page-styling.xsl =================================================================== RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-page-styling.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- woody-page-styling.xsl 24 Sep 2003 20:47:08 -0000 1.1 +++ woody-page-styling.xsl 24 Oct 2003 14:13:50 -0000 1.2 @@ -207,7 +207,7 @@ --> <xsl:template match="wi:*" mode="group-columns-content"> <tr> - <td valign="top"><xsl:copy-of select="wi:label/node()"/></td> + <td valign="top"><span title="{wi:hint}"><xsl:copy-of select="wi:label/node()"/></span></td> <td><xsl:apply-templates select="."/></td> </tr> </xsl:template>