mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
localizing xforms codebase. adding javascript hash for string used from js.
multibyte fixes appearance hints for textareas (full = rich text editor, minimal = plain text) using xs:string for xforms:textarea using xs:normalizedString for xforms:input IMPORTANT: you will need to recreate all forms in the web project after i check this in. and for any of your own forms, you need to use xs:normalizedString as the type for textfields. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5028 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1488,3 +1488,11 @@ validation_regex={0} is invalid.
|
|||||||
validation_regex_not_match={0} is invalid.
|
validation_regex_not_match={0} is invalid.
|
||||||
validation_numeric_range={0} must be between {1} and {2}.
|
validation_numeric_range={0} must be between {1} and {2}.
|
||||||
validation_invalid_character=is an invalid character.
|
validation_invalid_character=is an invalid character.
|
||||||
|
validation_provide_values_for_required_fields=Please provide values for all required fields
|
||||||
|
|
||||||
|
# XForms ui
|
||||||
|
idle=Idle
|
||||||
|
loading=Loading
|
||||||
|
|
||||||
|
# File Picker
|
||||||
|
go_up=Go up
|
||||||
|
@@ -555,7 +555,9 @@ public class Schema2XForms
|
|||||||
final ResourceBundle resourceBundle)
|
final ResourceBundle resourceBundle)
|
||||||
{
|
{
|
||||||
if (annotation == null)
|
if (annotation == null)
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
// write annotation to empty doc
|
// write annotation to empty doc
|
||||||
final Document doc = XMLUtil.newDocument();
|
final Document doc = XMLUtil.newDocument();
|
||||||
annotation.writeAnnotation(doc, XSAnnotation.W3C_DOM_DOCUMENT);
|
annotation.writeAnnotation(doc, XSAnnotation.W3C_DOM_DOCUMENT);
|
||||||
@@ -664,7 +666,9 @@ public class Schema2XForms
|
|||||||
//remove "@" in nodeset
|
//remove "@" in nodeset
|
||||||
String name = nodeset.substring(1);
|
String name = nodeset.substring(1);
|
||||||
if (name.equals(attributeName))
|
if (name.equals(attributeName))
|
||||||
|
{
|
||||||
bindId = bind.getAttributeNS(null, "id");
|
bindId = bind.getAttributeNS(null, "id");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -715,7 +719,6 @@ public class Schema2XForms
|
|||||||
? null
|
? null
|
||||||
: currentAttributeUse.getConstraintValue());
|
: currentAttributeUse.getConstraintValue());
|
||||||
defaultInstanceElement.setAttributeNS(this.targetNamespace,
|
defaultInstanceElement.setAttributeNS(this.targetNamespace,
|
||||||
// XXXarielb - i probably need the prefix here i.e. "alf:" + attributeName
|
|
||||||
attributeName,
|
attributeName,
|
||||||
defaultValue);
|
defaultValue);
|
||||||
}
|
}
|
||||||
@@ -1013,13 +1016,17 @@ public class Schema2XForms
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
final SchemaUtil.Occurance o = SchemaUtil.getOccurance(elementDecl);
|
||||||
//create the bind in case it is a repeat
|
//create the bind in case it is a repeat
|
||||||
LOGGER.debug("Adding empty bind for control " + controlType +
|
LOGGER.debug("Adding empty bind for control " + controlType +
|
||||||
" type " + typeName +
|
" type " + typeName +
|
||||||
" nodeset " + pathToRoot);
|
" nodeset " + pathToRoot +
|
||||||
|
" occurs " + o);
|
||||||
|
|
||||||
// create the <xforms:bind> element and add it to the model.
|
// create the <xforms:bind> element and add it to the model.
|
||||||
final Element bindElement = this.createBind(xformsDocument, pathToRoot);
|
final Element bindElement =
|
||||||
|
this.createBind(xformsDocument,
|
||||||
|
pathToRoot + (o.isRepeated() ? "[position() != last()]" : ""));
|
||||||
final String bindId = bindElement.getAttributeNS(null, "id");
|
final String bindId = bindElement.getAttributeNS(null, "id");
|
||||||
|
|
||||||
modelSection.appendChild(bindElement);
|
modelSection.appendChild(bindElement);
|
||||||
@@ -1027,7 +1034,7 @@ public class Schema2XForms
|
|||||||
schema,
|
schema,
|
||||||
controlType,
|
controlType,
|
||||||
null,
|
null,
|
||||||
SchemaUtil.getOccurance(elementDecl));
|
o);
|
||||||
}
|
}
|
||||||
return this.addComplexType(xformsDocument,
|
return this.addComplexType(xformsDocument,
|
||||||
modelSection,
|
modelSection,
|
||||||
@@ -1443,7 +1450,7 @@ public class Schema2XForms
|
|||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
{
|
{
|
||||||
LOGGER.debug("AddRepeatIfNecessary for multiple element for type " +
|
LOGGER.debug("AddRepeatIfNecessary for multiple element for type " +
|
||||||
controlType.getName() + ", maxOccurs=" + o.maximum);
|
controlType.getName() + ", maxOccurs = " + o.maximum);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Element repeatSection =
|
final Element repeatSection =
|
||||||
@@ -1688,8 +1695,10 @@ public class Schema2XForms
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
formControl = this.createControlForAtomicType(xformsDocument,
|
formControl = this.createControlForAtomicType(xformsDocument,
|
||||||
|
(XSSimpleTypeDefinition)controlType,
|
||||||
|
owner,
|
||||||
caption,
|
caption,
|
||||||
(XSSimpleTypeDefinition)controlType);
|
resourceBundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
formControl.setAttributeNS(NamespaceConstants.XFORMS_NS,
|
formControl.setAttributeNS(NamespaceConstants.XFORMS_NS,
|
||||||
@@ -1850,19 +1859,22 @@ public class Schema2XForms
|
|||||||
final ResourceBundle resourceBundle)
|
final ResourceBundle resourceBundle)
|
||||||
{
|
{
|
||||||
// add a group node and recurse
|
// add a group node and recurse
|
||||||
final Element groupElement =
|
final Element result =
|
||||||
xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
||||||
NamespaceConstants.XFORMS_PREFIX + ":group");
|
NamespaceConstants.XFORMS_PREFIX + ":group");
|
||||||
this.setXFormsId(groupElement);
|
this.setXFormsId(result);
|
||||||
groupElement.setAttributeNS(NamespaceConstants.XFORMS_NS,
|
final String appearance = this.extractPropertyFromAnnotation(NamespaceService.ALFRESCO_URI,
|
||||||
NamespaceConstants.XFORMS_PREFIX + ":appearance",
|
"appearance",
|
||||||
"full");
|
this.getAnnotation(owner),
|
||||||
|
resourceBundle);
|
||||||
|
result.setAttributeNS(NamespaceConstants.XFORMS_NS,
|
||||||
|
NamespaceConstants.XFORMS_PREFIX + ":appearance",
|
||||||
|
appearance == null || appearance.length() == 0 ? "full" : appearance);
|
||||||
|
|
||||||
//groupElement = (Element) formSection.appendChild(groupElement);
|
formSection.appendChild(result);
|
||||||
formSection.appendChild(groupElement);
|
result.appendChild(this.createLabel(xformsDocument,
|
||||||
groupElement.appendChild(this.createLabel(xformsDocument,
|
this.createCaption(owner, resourceBundle)));
|
||||||
this.createCaption(owner, resourceBundle)));
|
return result;
|
||||||
return groupElement;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String createCaption(final String text,
|
public String createCaption(final String text,
|
||||||
@@ -2003,10 +2015,9 @@ public class Schema2XForms
|
|||||||
final Element control = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
final Element control = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
||||||
NamespaceConstants.XFORMS_PREFIX + ":textarea");
|
NamespaceConstants.XFORMS_PREFIX + ":textarea");
|
||||||
this.setXFormsId(control);
|
this.setXFormsId(control);
|
||||||
// control.setAttributeNS(Schema2XForms.CHIBA_NS,
|
control.setAttributeNS(NamespaceConstants.XFORMS_NS,
|
||||||
// Schema2XForms.CHIBA_PREFIX + "height",
|
NamespaceConstants.XFORMS_PREFIX + ":appearance",
|
||||||
// "3");
|
"compact");
|
||||||
|
|
||||||
control.appendChild(this.createLabel(xformsDocument, caption));
|
control.appendChild(this.createLabel(xformsDocument, caption));
|
||||||
return control;
|
return control;
|
||||||
}
|
}
|
||||||
@@ -2025,25 +2036,33 @@ public class Schema2XForms
|
|||||||
* @param controlType The XML Schema type for which the form control is to be created.
|
* @param controlType The XML Schema type for which the form control is to be created.
|
||||||
* @return The element for the form control.
|
* @return The element for the form control.
|
||||||
*/
|
*/
|
||||||
public Element createControlForAtomicType(Document xformsDocument,
|
public Element createControlForAtomicType(final Document xformsDocument,
|
||||||
String caption,
|
final XSSimpleTypeDefinition controlType,
|
||||||
XSSimpleTypeDefinition controlType)
|
final XSObject owner,
|
||||||
|
final String caption,
|
||||||
|
final ResourceBundle resourceBundle)
|
||||||
{
|
{
|
||||||
LOGGER.debug("creating a control for atomic type {name: " + controlType.getName() +
|
if (LOGGER.isDebugEnabled())
|
||||||
", numeric: " + controlType.getNumeric() +
|
{
|
||||||
", bounded: " + controlType.getBounded() +
|
LOGGER.debug("creating a control for atomic type {name: " + controlType.getName() +
|
||||||
", finite: " + controlType.getFinite() +
|
", numeric: " + controlType.getNumeric() +
|
||||||
", ordered: " + controlType.getOrdered() +
|
", bounded: " + controlType.getBounded() +
|
||||||
", final: " + controlType.getFinal() +
|
", finite: " + controlType.getFinite() +
|
||||||
", minInc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MININCLUSIVE) +
|
", ordered: " + controlType.getOrdered() +
|
||||||
", maxInc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MAXINCLUSIVE) +
|
", final: " + controlType.getFinal() +
|
||||||
", minExc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MINEXCLUSIVE) +
|
", minInc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MININCLUSIVE) +
|
||||||
", maxExc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MAXEXCLUSIVE) +
|
", maxInc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MAXINCLUSIVE) +
|
||||||
", fractionDigits: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_FRACTIONDIGITS) +
|
", minExc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MINEXCLUSIVE) +
|
||||||
", builtInTypeName: " + SchemaUtil.getBuiltInTypeName(controlType) +
|
", maxExc: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_MAXEXCLUSIVE) +
|
||||||
", builtInType: " + SchemaUtil.getBuiltInType(controlType) +
|
", fractionDigits: " + controlType.getLexicalFacetValue(XSSimpleTypeDefinition.FACET_FRACTIONDIGITS) +
|
||||||
"}");
|
", builtInTypeName: " + SchemaUtil.getBuiltInTypeName(controlType) +
|
||||||
|
", builtInType: " + SchemaUtil.getBuiltInType(controlType) +
|
||||||
|
"}");
|
||||||
|
}
|
||||||
|
String appearance = this.extractPropertyFromAnnotation(NamespaceService.ALFRESCO_URI,
|
||||||
|
"appearance",
|
||||||
|
this.getAnnotation(owner),
|
||||||
|
resourceBundle);
|
||||||
Element result = null;
|
Element result = null;
|
||||||
if ("boolean".equals(controlType.getName()))
|
if ("boolean".equals(controlType.getName()))
|
||||||
{
|
{
|
||||||
@@ -2056,6 +2075,15 @@ public class Schema2XForms
|
|||||||
result.appendChild(item);
|
result.appendChild(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ("string".equals(controlType.getName()))
|
||||||
|
{
|
||||||
|
result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
||||||
|
NamespaceConstants.XFORMS_PREFIX + ":textarea");
|
||||||
|
if (appearance == null || appearance.length() == 0)
|
||||||
|
{
|
||||||
|
appearance = "compact";
|
||||||
|
}
|
||||||
|
}
|
||||||
else if ("anyURI".equals(controlType.getName()))
|
else if ("anyURI".equals(controlType.getName()))
|
||||||
{
|
{
|
||||||
result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
||||||
@@ -2100,10 +2128,21 @@ public class Schema2XForms
|
|||||||
{
|
{
|
||||||
result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
result = xformsDocument.createElementNS(NamespaceConstants.XFORMS_NS,
|
||||||
NamespaceConstants.XFORMS_PREFIX + ":input");
|
NamespaceConstants.XFORMS_PREFIX + ":input");
|
||||||
|
if ((appearance == null || appearance.length() == 0) &&
|
||||||
|
SchemaUtil.getBuiltInType(controlType) == XSConstants.NORMALIZEDSTRING_DT)
|
||||||
|
{
|
||||||
|
appearance = "full";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.setXFormsId(result);
|
this.setXFormsId(result);
|
||||||
result.appendChild(this.createLabel(xformsDocument, caption));
|
result.appendChild(this.createLabel(xformsDocument, caption));
|
||||||
|
|
||||||
|
if (appearance != null && appearance.length() != 0)
|
||||||
|
{
|
||||||
|
result.setAttributeNS(NamespaceConstants.XFORMS_NS,
|
||||||
|
NamespaceConstants.XFORMS_PREFIX + ":appearance",
|
||||||
|
appearance);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.alfresco.web.forms.xforms;
|
package org.alfresco.web.forms.xforms;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
import org.alfresco.web.app.Application;
|
||||||
import org.alfresco.web.app.servlet.FacesHelper;
|
import org.alfresco.web.app.servlet.FacesHelper;
|
||||||
import org.chiba.xml.ns.NamespaceConstants;
|
import org.chiba.xml.ns.NamespaceConstants;
|
||||||
import org.chiba.xml.xforms.exception.XFormsException;
|
import org.chiba.xml.xforms.exception.XFormsException;
|
||||||
@@ -46,7 +48,7 @@ public class XFormsProcessor
|
|||||||
{ "alfresco", NamespaceService.ALFRESCO_URI, NamespaceService.ALFRESCO_PREFIX }
|
{ "alfresco", NamespaceService.ALFRESCO_URI, NamespaceService.ALFRESCO_PREFIX }
|
||||||
};
|
};
|
||||||
|
|
||||||
private final String[] JS_SCRIPTS =
|
private final static String[] JS_SCRIPTS =
|
||||||
{
|
{
|
||||||
"/scripts/tiny_mce/" + (LOGGER.isDebugEnabled()
|
"/scripts/tiny_mce/" + (LOGGER.isDebugEnabled()
|
||||||
? "tiny_mce_src.js"
|
? "tiny_mce_src.js"
|
||||||
@@ -59,6 +61,18 @@ public class XFormsProcessor
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private final static String[] BUNDLE_KEYS =
|
||||||
|
{
|
||||||
|
"validation_provide_values_for_required_fields",
|
||||||
|
"idle",
|
||||||
|
"loading",
|
||||||
|
"add_content",
|
||||||
|
"go_up",
|
||||||
|
"cancel",
|
||||||
|
"upload",
|
||||||
|
"path"
|
||||||
|
};
|
||||||
|
|
||||||
public XFormsProcessor()
|
public XFormsProcessor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -139,6 +153,17 @@ public class XFormsProcessor
|
|||||||
append(ns[0].toUpperCase()).
|
append(ns[0].toUpperCase()).
|
||||||
append("_PREFIX = '").append(ns[2]).append("';\n");
|
append("_PREFIX = '").append(ns[2]).append("';\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance());
|
||||||
|
js.append("alfresco_xforms_constants.resources = {\n");
|
||||||
|
for (String k : BUNDLE_KEYS)
|
||||||
|
{
|
||||||
|
js.append(k).
|
||||||
|
append(": '").
|
||||||
|
append(bundle.getString(k)).
|
||||||
|
append("'").
|
||||||
|
append(k.equals(BUNDLE_KEYS[BUNDLE_KEYS.length - 1]) ? "\n}" : ",\n");
|
||||||
|
}
|
||||||
e.appendChild(result.createTextNode(js.toString()));
|
e.appendChild(result.createTextNode(js.toString()));
|
||||||
|
|
||||||
div.appendChild(e);
|
div.appendChild(e);
|
||||||
|
@@ -25,8 +25,8 @@ Describes a press release and related assets.
|
|||||||
<xs:element name="company_footer">
|
<xs:element name="company_footer">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="name" type="xs:string"/>
|
<xs:element name="name" type="xs:normalizedString"/>
|
||||||
<xs:element name="body" type="xs:anyType" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
@@ -26,7 +26,7 @@ Describes a press release and related assets.
|
|||||||
<xs:include schemaLocation="/media/releases/get_company_footer_choices_simple_type.jsp"/>
|
<xs:include schemaLocation="/media/releases/get_company_footer_choices_simple_type.jsp"/>
|
||||||
|
|
||||||
<xs:simpleType name="category">
|
<xs:simpleType name="category">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="Product"/>
|
<xs:enumeration value="Product"/>
|
||||||
<xs:enumeration value="Partnership"/>
|
<xs:enumeration value="Partnership"/>
|
||||||
<xs:enumeration value="Company"/>
|
<xs:enumeration value="Company"/>
|
||||||
@@ -39,13 +39,13 @@ Describes a press release and related assets.
|
|||||||
<xs:element name="press_release">
|
<xs:element name="press_release">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="title" type="xs:string"/>
|
<xs:element name="title" type="xs:normalizedString"/>
|
||||||
<xs:element name="abstract" type="xs:string"/>
|
<xs:element name="abstract" type="xs:normalizedString"/>
|
||||||
<xs:element name="location" type="xs:string"/>
|
<xs:element name="location" type="xs:normalizedString"/>
|
||||||
<xs:element name="body" type="xs:anyType" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
<xs:element name="include_company_footer" type="pr:company_footer_choices" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="include_company_footer" type="pr:company_footer_choices" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
<xs:element name="include_media_contacts" type="xs:boolean" default="true"/>
|
<xs:element name="include_media_contacts" type="xs:boolean" default="true"/>
|
||||||
<xs:element name="keywords" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="keywords" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xs:element name="category" type="pr:category" default="Company"/>
|
<xs:element name="category" type="pr:category" default="Company"/>
|
||||||
<xs:element name="launch_date" type="xs:date"/>
|
<xs:element name="launch_date" type="xs:date"/>
|
||||||
<xs:element name="expiration_date" type="xs:date"/>
|
<xs:element name="expiration_date" type="xs:date"/>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:simpleType name="attribute-choices" >
|
<xs:simpleType name="attribute-choices" >
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="string1"/>
|
<xs:enumeration value="string1"/>
|
||||||
<xs:enumeration value="string2"/>
|
<xs:enumeration value="string2"/>
|
||||||
<xs:enumeration value="string3-is-the-default"/>
|
<xs:enumeration value="string3-is-the-default"/>
|
||||||
@@ -16,31 +16,31 @@
|
|||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="element_string_no_default"
|
<xs:element name="element_string_no_default"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
minOccurs="1"
|
minOccurs="1"
|
||||||
maxOccurs="1"/>
|
maxOccurs="1"/>
|
||||||
<xs:element name="element_string_with_default"
|
<xs:element name="element_string_with_default"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
minOccurs="1"
|
minOccurs="1"
|
||||||
maxOccurs="1"
|
maxOccurs="1"
|
||||||
default="default string value"/>
|
default="default string value"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute name="required_string_no_default"
|
<xs:attribute name="required_string_no_default"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
use="required"/>
|
use="required"/>
|
||||||
<xs:attribute name="optional_string_no_default"
|
<xs:attribute name="optional_string_no_default"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
use="optional"/>
|
use="optional"/>
|
||||||
<xs:attribute name="required_string_with_default"
|
<xs:attribute name="required_string_with_default"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
use="required"
|
use="required"
|
||||||
default="default string value"/>
|
default="default string value"/>
|
||||||
<xs:attribute name="optional_string_with_default"
|
<xs:attribute name="optional_string_with_default"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
use="optional"
|
use="optional"
|
||||||
default="default string value"/>
|
default="default string value"/>
|
||||||
<xs:attribute name="fixed_string"
|
<xs:attribute name="fixed_string"
|
||||||
type="xs:string"
|
type="xs:normalizedString"
|
||||||
use="optional"
|
use="optional"
|
||||||
fixed="fixed string value"/>
|
fixed="fixed string value"/>
|
||||||
<xs:attribute name="required_choices_no_default"
|
<xs:attribute name="required_choices_no_default"
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:simpleType name="five_string_values">
|
<xs:simpleType name="five_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one"/>
|
<xs:enumeration value="one"/>
|
||||||
<xs:enumeration value="two"/>
|
<xs:enumeration value="two"/>
|
||||||
<xs:enumeration value="three"/>
|
<xs:enumeration value="three"/>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ten_string_values">
|
<xs:simpleType name="ten_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one"/>
|
<xs:enumeration value="one"/>
|
||||||
<xs:enumeration value="two"/>
|
<xs:enumeration value="two"/>
|
||||||
<xs:enumeration value="three"/>
|
<xs:enumeration value="three"/>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<xs:element name="default-values">
|
<xs:element name="default-values">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string" default="default string value"/>
|
<xs:element name="string" type="xs:normalizedString" default="default string value"/>
|
||||||
<xs:element name="integer" type="xs:integer" default="3"/>
|
<xs:element name="integer" type="xs:integer" default="3"/>
|
||||||
<xs:element name="date" type="xs:date" default="1978-08-08"/>
|
<xs:element name="date" type="xs:date" default="1978-08-08"/>
|
||||||
<xs:element name="radio" type="five_string_values" default="three"/>
|
<xs:element name="radio" type="five_string_values" default="three"/>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:simpleContent>
|
<xs:simpleContent>
|
||||||
<xs:extension base="xs:base64Binary">
|
<xs:extension base="xs:base64Binary">
|
||||||
<xs:attribute name="referenced_element_attribute" type="xs:string" use="required"/>
|
<xs:attribute name="referenced_element_attribute" type="xs:normalizedString" use="required"/>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:simpleContent>
|
</xs:simpleContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<xs:complexType name="complex_type_1">
|
<xs:complexType name="complex_type_1">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string_in_ct" type="xs:string"/>
|
<xs:element name="string_in_ct" type="xs:normalizedString"/>
|
||||||
<xs:element ref="mynsprefix:referenced_element"/>
|
<xs:element ref="mynsprefix:referenced_element"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<xs:element name="element-ref-test">
|
<xs:element name="element-ref-test">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string"/>
|
<xs:element name="string" type="xs:normalizedString"/>
|
||||||
<xs:element name="complex_type_1" type="mynsprefix:complex_type_1"/>
|
<xs:element name="complex_type_1" type="mynsprefix:complex_type_1"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
targetNamespace="http://mine.org/mynsuri">
|
targetNamespace="http://mine.org/mynsuri">
|
||||||
|
|
||||||
<xs:simpleType name="yes_or_no">
|
<xs:simpleType name="yes_or_no">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="yes"/>
|
<xs:enumeration value="yes"/>
|
||||||
<xs:enumeration value="no"/>
|
<xs:enumeration value="no"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
attributeFormDefault="qualified"
|
attributeFormDefault="qualified"
|
||||||
targetNamespace="http://other.org/othernsuri">
|
targetNamespace="http://other.org/othernsuri">
|
||||||
<xs:simpleType name="type1">
|
<xs:simpleType name="type1">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:minLength value="5"/>
|
<xs:minLength value="5"/>
|
||||||
<xs:maxLength value="5"/>
|
<xs:maxLength value="5"/>
|
||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
|
@@ -5,19 +5,19 @@
|
|||||||
targetNamespace="http://www.alfresco.org/alf">
|
targetNamespace="http://www.alfresco.org/alf">
|
||||||
<xs:complexType name="multi">
|
<xs:complexType name="multi">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="multi1" type="xs:string"/>
|
<xs:element name="multi1" type="xs:normalizedString"/>
|
||||||
<xs:element name="multi2" type="xs:string"/>
|
<xs:element name="multi2" type="xs:normalizedString"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="xml-namespaces-test">
|
<xs:element name="xml-namespaces-test">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string_with_default" type="xs:string" default="default string value"/>
|
<xs:element name="string_with_default" type="xs:normalizedString" default="default string value"/>
|
||||||
<xs:element name="string_no_default" type="xs:string"/>
|
<xs:element name="string_no_default" type="xs:normalizedString"/>
|
||||||
<xs:element name="multi" type="alf:multi" minOccurs="2" maxOccurs="3"/>
|
<xs:element name="multi" type="alf:multi" minOccurs="2" maxOccurs="3"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute name="string_attribute_with_default" type="xs:string" default="default string value"/>
|
<xs:attribute name="string_attribute_with_default" type="xs:normalizedString" default="default string value"/>
|
||||||
<xs:attribute name="string_attribute_no_default" type="xs:string"/>
|
<xs:attribute name="string_attribute_no_default" type="xs:normalizedString"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
</xs:schema>
|
</xs:schema>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<xs:element name="simple">
|
<xs:element name="simple">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string" default="default string value"/>
|
<xs:element name="string" type="xs:normalizedString" default="default string value"/>
|
||||||
<xs:element name="uri" type="xs:anyURI" default="/index.jsp"/>
|
<xs:element name="uri" type="xs:anyURI" default="/index.jsp"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
@@ -3,14 +3,14 @@
|
|||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:complexType name="multi-input">
|
<xs:complexType name="multi-input">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string"/>
|
<xs:element name="string" type="xs:normalizedString"/>
|
||||||
<xs:element name="int" type="xs:int"/>
|
<xs:element name="int" type="xs:int"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="repeat-multi-simple">
|
<xs:element name="repeat-multi-simple">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="zero-to-inf-single" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="zero-to-inf-single" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xs:element name="zero-to-inf-multi" type="multi-input" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="zero-to-inf-multi" type="multi-input" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:simpleType name="five_string_values">
|
<xs:simpleType name="five_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one"/>
|
<xs:enumeration value="one"/>
|
||||||
<xs:enumeration value="two"/>
|
<xs:enumeration value="two"/>
|
||||||
<xs:enumeration value="three"/>
|
<xs:enumeration value="three"/>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ten_string_values">
|
<xs:simpleType name="ten_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one"/>
|
<xs:enumeration value="one"/>
|
||||||
<xs:enumeration value="two"/>
|
<xs:enumeration value="two"/>
|
||||||
<xs:enumeration value="three"/>
|
<xs:enumeration value="three"/>
|
||||||
@@ -26,14 +26,14 @@
|
|||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:complexType name="multi-input">
|
<xs:complexType name="multi-input">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string"/>
|
<xs:element name="string" type="xs:normalizedString"/>
|
||||||
<xs:element name="any" type="xs:anyType"/>
|
<xs:element name="any" type="xs:anyType"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="repeat-components">
|
<xs:element name="repeat-components">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="zero-to-one" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
<xs:element name="zero-to-one" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-one" type="xs:anyType" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="one-to-one" type="xs:anyType" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-inf" type="xs:date" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="one-to-inf" type="xs:date" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
<xs:element name="zero-to-inf" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="zero-to-inf" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
@@ -3,20 +3,20 @@
|
|||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:complexType name="multi-input">
|
<xs:complexType name="multi-input">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string"/>
|
<xs:element name="string" type="xs:normalizedString"/>
|
||||||
<xs:element name="int" type="xs:int"/>
|
<xs:element name="int" type="xs:int"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="repeat-constraints">
|
<xs:element name="repeat-constraints">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="zero-to-one" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
<xs:element name="zero-to-one" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-one" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="one-to-one" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-inf" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="one-to-inf" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
<xs:element name="zero-to-inf" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="zero-to-inf" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xs:element name="one-to-five" type="xs:string" minOccurs="1" maxOccurs="5"/>
|
<xs:element name="one-to-five" type="xs:normalizedString" minOccurs="1" maxOccurs="5"/>
|
||||||
<xs:element name="three-to-five" type="xs:string" minOccurs="3" maxOccurs="5"/>
|
<xs:element name="three-to-five" type="xs:normalizedString" minOccurs="3" maxOccurs="5"/>
|
||||||
<xs:element name="zero-to-five" type="xs:string" minOccurs="0" maxOccurs="5"/>
|
<xs:element name="zero-to-five" type="xs:normalizedString" minOccurs="0" maxOccurs="5"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
@@ -3,15 +3,15 @@
|
|||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:complexType name="repeat-simple">
|
<xs:complexType name="repeat-simple">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="one-to-one" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="one-to-one" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-inf" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="one-to-inf" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
<xs:element name="repeat-nested">
|
<xs:element name="repeat-nested">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="repeat-simple" type="repeat-simple" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="repeat-simple" type="repeat-simple" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
<xs:element name="not-repeated" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="not-repeated" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<xs:element name="repeat-simple">
|
<xs:element name="repeat-simple">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="zero-to-one" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
<xs:element name="zero-to-one" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-one" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="one-to-one" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="one-to-inf" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="one-to-inf" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
<xs:element name="zero-to-inf" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
<xs:element name="zero-to-inf" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
xmlns:alf="http://www.alfresco.org"
|
xmlns:alf="http://www.alfresco.org"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:simpleType name="five_string_values">
|
<xs:simpleType name="five_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one">
|
<xs:enumeration value="one">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>
|
<xs:appinfo>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</xs:restriction>
|
</xs:restriction>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="ten_string_values">
|
<xs:simpleType name="ten_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one"/>
|
<xs:enumeration value="one"/>
|
||||||
<xs:enumeration value="two"/>
|
<xs:enumeration value="two"/>
|
||||||
<xs:enumeration value="three"/>
|
<xs:enumeration value="three"/>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<xs:element name="text_components">
|
<xs:element name="text_components">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="required_textfield" type="xs:string" minOccurs="1" maxOccurs="1">
|
<xs:element name="required_textfield" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>
|
<xs:appinfo>
|
||||||
<alf:label>${components-test.required_textfield.label}</alf:label>
|
<alf:label>${components-test.required_textfield.label}</alf:label>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</xs:appinfo>
|
</xs:appinfo>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="optional_textfield" type="xs:string" minOccurs="0" maxOccurs="1">
|
<xs:element name="optional_textfield" type="xs:normalizedString" minOccurs="0" maxOccurs="1">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
<xs:appinfo>
|
<xs:appinfo>
|
||||||
<alf:label>${components-test.optional_textfield.label}</alf:label>
|
<alf:label>${components-test.optional_textfield.label}</alf:label>
|
||||||
@@ -85,8 +85,28 @@
|
|||||||
</xs:appinfo>
|
</xs:appinfo>
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
<xs:element name="prefilled_textfield" type="xs:string" minOccurs="0" maxOccurs="1" default="i am the default value"/>
|
<xs:element name="prefilled_textfield" type="xs:normalizedString" minOccurs="0" maxOccurs="1" default="i am the default value"/>
|
||||||
<xs:element name="textarea" type="xs:anyType"/>
|
<xs:element name="plain_textarea" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:appinfo>
|
||||||
|
<alf:appearance>minimal</alf:appearance>
|
||||||
|
</xs:appinfo>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="plain_text_with_toggle" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:appinfo>
|
||||||
|
<alf:appearance>compact</alf:appearance>
|
||||||
|
</xs:appinfo>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="rich_text_editor" type="xs:string">
|
||||||
|
<xs:annotation>
|
||||||
|
<xs:appinfo>
|
||||||
|
<alf:appearance>full</alf:appearance>
|
||||||
|
</xs:appinfo>
|
||||||
|
</xs:annotation>
|
||||||
|
</xs:element>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
@@ -158,7 +178,7 @@
|
|||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="file" type="xs:anyURI"/>
|
<xs:element name="file" type="xs:anyURI"/>
|
||||||
<xs:element name="repeat" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
|
<xs:element name="repeat" type="xs:normalizedString" minOccurs="1" maxOccurs="unbounded"/>
|
||||||
<xs:element name="checkbox_default_true" type="xs:boolean" default="true"/>
|
<xs:element name="checkbox_default_true" type="xs:boolean" default="true"/>
|
||||||
<xs:element name="checkbox_default_false" type="xs:boolean" default="false"/>
|
<xs:element name="checkbox_default_false" type="xs:boolean" default="false"/>
|
||||||
<xs:element name="checkbox_no_default" type="xs:boolean"/>
|
<xs:element name="checkbox_no_default" type="xs:boolean"/>
|
||||||
|
@@ -5,18 +5,18 @@
|
|||||||
|
|
||||||
<xs:complexType name="complex-type">
|
<xs:complexType name="complex-type">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="fixed_string_element" type="xs:string" minOccurs="1" maxOccurs="1" fixed="fixed value"/>
|
<xs:element name="fixed_string_element" type="xs:normalizedString" minOccurs="1" maxOccurs="1" fixed="fixed value"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute name="required_string_attribute" type="xs:string" use="required"/>
|
<xs:attribute name="required_string_attribute" type="xs:normalizedString" use="required"/>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|
||||||
<xs:complexType name="inheritence-type">
|
<xs:complexType name="inheritence-type">
|
||||||
<xs:complexContent>
|
<xs:complexContent>
|
||||||
<xs:extension base="complex-type">
|
<xs:extension base="complex-type">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="additional_required_string_element" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="additional_required_string_element" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
<xs:attribute name="additional_fixed_string_attribute" type="xs:string" use="required" fixed="additional fixed value"/>
|
<xs:attribute name="additional_fixed_string_attribute" type="xs:normalizedString" use="required" fixed="additional fixed value"/>
|
||||||
</xs:extension>
|
</xs:extension>
|
||||||
</xs:complexContent>
|
</xs:complexContent>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
xmlns:alf="http://www.alfresco.org"
|
xmlns:alf="http://www.alfresco.org"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:simpleType name="four_presidents">
|
<xs:simpleType name="four_presidents">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="washington"/>
|
<xs:enumeration value="washington"/>
|
||||||
<xs:enumeration value="jefferson"/>
|
<xs:enumeration value="jefferson"/>
|
||||||
<xs:enumeration value="lincoln"/>
|
<xs:enumeration value="lincoln"/>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<xs:list itemType="four_presidents"/>
|
<xs:list itemType="four_presidents"/>
|
||||||
</xs:simpleType>
|
</xs:simpleType>
|
||||||
<xs:simpleType name="thirteen_colonies">
|
<xs:simpleType name="thirteen_colonies">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="massachusetts"/>
|
<xs:enumeration value="massachusetts"/>
|
||||||
<xs:enumeration value="NH">
|
<xs:enumeration value="NH">
|
||||||
<xs:annotation>
|
<xs:annotation>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
xmlns:alf="http://www.alfresco.org"
|
xmlns:alf="http://www.alfresco.org"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:simpleType name="ten_string_values">
|
<xs:simpleType name="ten_string_values">
|
||||||
<xs:restriction base="xs:string">
|
<xs:restriction base="xs:normalizedString">
|
||||||
<xs:enumeration value="one"/>
|
<xs:enumeration value="one"/>
|
||||||
<xs:enumeration value="two"/>
|
<xs:enumeration value="two"/>
|
||||||
<xs:enumeration value="three"/>
|
<xs:enumeration value="three"/>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<xs:element name="simple">
|
<xs:element name="simple">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string" type="xs:string" default="default string value"/>
|
<xs:element name="string" type="xs:normalizedString" default="default string value"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<xs:element name="upload-simple">
|
<xs:element name="upload-simple">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="string_with_default" type="xs:string" default="default value"/>
|
<xs:element name="string_with_default" type="xs:normalizedString" default="default value"/>
|
||||||
<xs:element name="file_from_element" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="file_from_element" type="xs:anyURI" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="file_from_element_with_default" type="xs:anyURI" default="/index.jsp"/>
|
<xs:element name="file_from_element_with_default" type="xs:anyURI" default="/index.jsp"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
|
@@ -609,7 +609,7 @@ dojo.declare("alfresco.xforms.TextField",
|
|||||||
this.widget.setAttribute("type", "text");
|
this.widget.setAttribute("type", "text");
|
||||||
this.widget.setAttribute("id", this.id + "-widget");
|
this.widget.setAttribute("id", this.id + "-widget");
|
||||||
this.widget.setAttribute("value", initial_value);
|
this.widget.setAttribute("value", initial_value);
|
||||||
if (this.xform.getBinding(this.xformsNode).getType() == "string")
|
if (this.getAppearance() == "full")
|
||||||
{
|
{
|
||||||
this.widget.style.width = "100%";
|
this.widget.style.width = "100%";
|
||||||
}
|
}
|
||||||
@@ -745,8 +745,64 @@ dojo.declare("alfresco.xforms.NumericalRange",
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/** The textfield widget which handle xforms widget xf:textarea. */
|
/** The text area widget handles xforms widget xf:textarea with appearance minimal */
|
||||||
dojo.declare("alfresco.xforms.TextArea",
|
dojo.declare("alfresco.xforms.PlainTextEditor",
|
||||||
|
alfresco.xforms.Widget,
|
||||||
|
function(xform, xformsNode)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
{
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// overridden methods
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
render: function(attach_point)
|
||||||
|
{
|
||||||
|
attach_point.appendChild(this.domNode);
|
||||||
|
dojo.html.prependClass(this.domNode, "xformsTextArea");
|
||||||
|
var initialValue = this.getInitialValue() || "";
|
||||||
|
this.widget = document.createElement("textarea");
|
||||||
|
this.domNode.appendChild(this.widget);
|
||||||
|
this.widget.setAttribute("id", this.id + "-widget");
|
||||||
|
this.widget.setAttribute("value", initialValue);
|
||||||
|
if (this.isReadonly())
|
||||||
|
{
|
||||||
|
this.widget.setAttribute("readonly", this.isReadonly());
|
||||||
|
}
|
||||||
|
this.widget.style.width = "100%";
|
||||||
|
this.widget.style.height = "100%";
|
||||||
|
dojo.event.connect(this.widget, "onchange", this, this._textarea_changeHandler);
|
||||||
|
},
|
||||||
|
|
||||||
|
setValue: function(value, forceCommit)
|
||||||
|
{
|
||||||
|
if (!this.widget)
|
||||||
|
{
|
||||||
|
this.setInitialValue(value, forceCommit);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alfresco.xform.PlainTextEditor.superclass.setValue.call(this, value, forceCommit);
|
||||||
|
this.widget.value = value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getValue: function()
|
||||||
|
{
|
||||||
|
return this.widget.value;
|
||||||
|
},
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// DOM event handlers
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
_textarea_changeHandler: function(event)
|
||||||
|
{
|
||||||
|
this._commitValueChange();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/** The textfield widget which handle xforms widget xf:textarea. with appearance full or compact */
|
||||||
|
dojo.declare("alfresco.xforms.RichTextEditor",
|
||||||
alfresco.xforms.Widget,
|
alfresco.xforms.Widget,
|
||||||
function(xform, xformsNode)
|
function(xform, xformsNode)
|
||||||
{
|
{
|
||||||
@@ -823,7 +879,7 @@ dojo.declare("alfresco.xforms.TextArea",
|
|||||||
|
|
||||||
setReadonly: function(readonly)
|
setReadonly: function(readonly)
|
||||||
{
|
{
|
||||||
alfresco.xforms.TextArea.superclass.setReadonly.call(this, readonly);
|
alfresco.xforms.RichTextEditor.superclass.setReadonly.call(this, readonly);
|
||||||
var mce = tinyMCE.getInstanceById(this.id);
|
var mce = tinyMCE.getInstanceById(this.id);
|
||||||
if (readonly && mce)
|
if (readonly && mce)
|
||||||
{
|
{
|
||||||
@@ -837,7 +893,7 @@ dojo.declare("alfresco.xforms.TextArea",
|
|||||||
|
|
||||||
_destroy: function()
|
_destroy: function()
|
||||||
{
|
{
|
||||||
alfresco.xforms.TextArea.superclass._destroy.call(this);
|
alfresco.xforms.RichTextEditor.superclass._destroy.call(this);
|
||||||
if (!this.isReadonly())
|
if (!this.isReadonly())
|
||||||
{
|
{
|
||||||
dojo.debug("removing mce control " + this.id);
|
dojo.debug("removing mce control " + this.id);
|
||||||
@@ -3146,7 +3202,9 @@ dojo.declare("alfresco.xforms.XForm",
|
|||||||
case alfresco_xforms_constants.XFORMS_PREFIX + ":repeat":
|
case alfresco_xforms_constants.XFORMS_PREFIX + ":repeat":
|
||||||
return new alfresco.xforms.Repeat(this, xformsNode);
|
return new alfresco.xforms.Repeat(this, xformsNode);
|
||||||
case alfresco_xforms_constants.XFORMS_PREFIX + ":textarea":
|
case alfresco_xforms_constants.XFORMS_PREFIX + ":textarea":
|
||||||
return new alfresco.xforms.TextArea(this, xformsNode);
|
return (new alfresco.xforms.Widget(this, xformsNode).getAppearance() == "minimal"
|
||||||
|
? new alfresco.xforms.PlainTextEditor(this, xformsNode)
|
||||||
|
: new alfresco.xforms.RichTextEditor(this, xformsNode));
|
||||||
case alfresco_xforms_constants.XFORMS_PREFIX + ":upload":
|
case alfresco_xforms_constants.XFORMS_PREFIX + ":upload":
|
||||||
return new alfresco.xforms.FilePicker(this, xformsNode);
|
return new alfresco.xforms.FilePicker(this, xformsNode);
|
||||||
case alfresco_xforms_constants.XFORMS_PREFIX + ":range":
|
case alfresco_xforms_constants.XFORMS_PREFIX + ":range":
|
||||||
@@ -3579,7 +3637,7 @@ dojo.declare("alfresco.xforms.XForm",
|
|||||||
{
|
{
|
||||||
this.submitWidget = null;
|
this.submitWidget = null;
|
||||||
var invalid = this.rootWidget.getWidgetsInvalidForSubmit();
|
var invalid = this.rootWidget.getWidgetsInvalidForSubmit();
|
||||||
_show_error(document.createTextNode("Please provide values for all required fields."));
|
_show_error(document.createTextNode(alfresco_xforms_constants.resources["validation_provide_values_for_required_fields"]));
|
||||||
var error_list = document.createElement("ul");
|
var error_list = document.createElement("ul");
|
||||||
for (var j = 0; j < invalid.length; j++)
|
for (var j = 0; j < invalid.length; j++)
|
||||||
{
|
{
|
||||||
@@ -3703,10 +3761,11 @@ AjaxHelper._updateLoaderDisplay = function()
|
|||||||
{
|
{
|
||||||
var ajaxLoader = AjaxHelper._getLoaderElement();
|
var ajaxLoader = AjaxHelper._getLoaderElement();
|
||||||
ajaxLoader.innerHTML = (AjaxHelper._requests.length == 0
|
ajaxLoader.innerHTML = (AjaxHelper._requests.length == 0
|
||||||
? "Idle"
|
? alfresco_xforms_constants.resources["idle"]
|
||||||
: "Loading" + (AjaxHelper._requests.length > 1
|
: (alfresco_xforms_constants.resources["loading"] +
|
||||||
? " (" + AjaxHelper._requests.length + ")"
|
(AjaxHelper._requests.length > 1
|
||||||
: "..."));
|
? " (" + AjaxHelper._requests.length + ")"
|
||||||
|
: "...")));
|
||||||
dojo.debug(ajaxLoader.innerHTML);
|
dojo.debug(ajaxLoader.innerHTML);
|
||||||
if (/* djConfig.isDebug && */ AjaxHelper._requests.length != 0)
|
if (/* djConfig.isDebug && */ AjaxHelper._requests.length != 0)
|
||||||
{
|
{
|
||||||
@@ -4182,7 +4241,8 @@ _showPicker: function(data)
|
|||||||
addContentImage.align = "absmiddle";
|
addContentImage.align = "absmiddle";
|
||||||
addContentImage.setAttribute("src", alfresco_xforms_constants.WEBAPP_CONTEXT + "/images/icons/add.gif");
|
addContentImage.setAttribute("src", alfresco_xforms_constants.WEBAPP_CONTEXT + "/images/icons/add.gif");
|
||||||
addContentLink.appendChild(addContentImage);
|
addContentLink.appendChild(addContentImage);
|
||||||
addContentLink.appendChild(d.createTextNode("Add Content"));
|
|
||||||
|
addContentLink.appendChild(d.createTextNode(alfresco_xforms_constants.resources["add_content"]));
|
||||||
|
|
||||||
var navigateToParentLink = d.createElement("a");
|
var navigateToParentLink = d.createElement("a");
|
||||||
headerRightDiv.appendChild(navigateToParentLink);
|
headerRightDiv.appendChild(navigateToParentLink);
|
||||||
@@ -4211,7 +4271,7 @@ _showPicker: function(data)
|
|||||||
navigateToParentNodeImage.align = "absmiddle";
|
navigateToParentNodeImage.align = "absmiddle";
|
||||||
navigateToParentNodeImage.setAttribute("src", alfresco_xforms_constants.WEBAPP_CONTEXT + "/images/icons/up.gif");
|
navigateToParentNodeImage.setAttribute("src", alfresco_xforms_constants.WEBAPP_CONTEXT + "/images/icons/up.gif");
|
||||||
navigateToParentLink.appendChild(navigateToParentNodeImage);
|
navigateToParentLink.appendChild(navigateToParentNodeImage);
|
||||||
navigateToParentLink.appendChild(d.createTextNode("Go up"));
|
navigateToParentLink.appendChild(d.createTextNode(alfresco_xforms_constants.resources["go_up"]));
|
||||||
|
|
||||||
headerRightDiv.style.position = "absolute";
|
headerRightDiv.style.position = "absolute";
|
||||||
headerRightDiv.style.height = headerDiv.style.height;
|
headerRightDiv.style.height = headerDiv.style.height;
|
||||||
@@ -4232,7 +4292,8 @@ _showPicker: function(data)
|
|||||||
var cancelButton = d.createElement("input");
|
var cancelButton = d.createElement("input");
|
||||||
cancelButton.type = "button";
|
cancelButton.type = "button";
|
||||||
cancelButton.filePickerWidget = this;
|
cancelButton.filePickerWidget = this;
|
||||||
cancelButton.value = "Cancel";
|
|
||||||
|
cancelButton.value = alfresco_xforms_constants.resources["cancel"];
|
||||||
footerDiv.appendChild(cancelButton);
|
footerDiv.appendChild(cancelButton);
|
||||||
|
|
||||||
cancelButton.style.margin = ((.5 * footerDiv.offsetHeight) -
|
cancelButton.style.margin = ((.5 * footerDiv.offsetHeight) -
|
||||||
@@ -4396,7 +4457,7 @@ _showAddContent: function(currentPath)
|
|||||||
dojo.dom.removeChildren(w.addContentDiv);
|
dojo.dom.removeChildren(w.addContentDiv);
|
||||||
|
|
||||||
var fileName = event.target.value.replace(/.*[\/\\]([^\/\\]+)/, "$1");
|
var fileName = event.target.value.replace(/.*[\/\\]([^\/\\]+)/, "$1");
|
||||||
w.addContentDiv.appendChild(d.createTextNode("Upload: " + fileName));
|
w.addContentDiv.appendChild(d.createTextNode(alfresco_xforms_constants.resources["upload"] + ": " + fileName));
|
||||||
var img = d.createElement("img");
|
var img = d.createElement("img");
|
||||||
img.setAttribute("src", alfresco_xforms_constants.WEBAPP_CONTEXT +
|
img.setAttribute("src", alfresco_xforms_constants.WEBAPP_CONTEXT +
|
||||||
"/images/icons/process_animation.gif");
|
"/images/icons/process_animation.gif");
|
||||||
@@ -4506,7 +4567,8 @@ _openParentPathMenu: function(target, path)
|
|||||||
var pathTextDiv = d.createElement("div");
|
var pathTextDiv = d.createElement("div");
|
||||||
pathTextDiv.style.fontWeight = "bold";
|
pathTextDiv.style.fontWeight = "bold";
|
||||||
pathTextDiv.style.paddingLeft = "5px";
|
pathTextDiv.style.paddingLeft = "5px";
|
||||||
pathTextDiv.appendChild(d.createTextNode("Path"));
|
|
||||||
|
pathTextDiv.appendChild(d.createTextNode(alfresco_xforms_constants.resources["path"]));
|
||||||
this.parentPathMenu.appendChild(pathTextDiv);
|
this.parentPathMenu.appendChild(pathTextDiv);
|
||||||
var currentPathNodes = [];
|
var currentPathNodes = [];
|
||||||
for (var i = 0; i < parentNodes.length; i++)
|
for (var i = 0; i < parentNodes.length; i++)
|
||||||
|
Reference in New Issue
Block a user