Due to de problem of diferent content tipes atributes mixed in advanced search I've diecide to test the new creating EMC forms option for new release. and I've had and xml error when building the form that I can't manage becouse an xml validation guives 0 errors but alfresco not. I`ll put de issue here but probably is a better place. Beside the error asking to Alfresco engeneers the problem of advanced search is going to be solved in new release?. Maybe it will be posible to search content using forms?. My xml Schema is this:
<?xml version = "1.0" encoding = "UTF-8"?> <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema"> <xs:element name = "NumeroDocumento" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "42"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "NumeroExpediente" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "30"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "NIF" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "10"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "ApellidosNombre" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "125"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "CodigoTerritorial"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "10"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "Municipio" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "40"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "FechaEmision" type="xs:date"> </xs:element> <xs:element name = "Documento" use="required"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "40"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "Importe" type="xs:decimal" > <xs:simpleType> <xs:restriction base = "xs:decimal"> <xs:maxLength value = "12"></xs:maxLength> <xs:fractionDigits value = "2"> </xs:fractionDigits> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "NumIntentos"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "1"></xs:maxLength> <xs:mininclusive value="1"></xs:mininclusive> <xs:maxinclusive value="3"></xs:maxinclusive> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "Resultado"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "1"></xs:maxLength> <xs:mininclusive value="1"></xs:mininclusive> <xs:maxinclusive value="9"></xs:maxinclusive> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name = "FechaEstado" type="xs:date"> </xs:element> <xs:element name = "Notificador"> <xs:simpleType> <xs:restriction base = "xs:string"> <xs:maxLength value = "2"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:element> </xs:schema>
the error that gives is:
org.alfresco.web.forms.FormProcessor$ProcessingException: org.alfresco.web.forms.xforms.FormBuilderException: error parsing schema: at line 75 column 37: s4s-elt-must-match.1: The content of 'restriction' must match (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*)). A problem was found starting at: mininclusive.
When creating content from de add content icon or using advanced search does not appear de form selecction. Could someone of the Alfresco Team tell me something about my doubs? thanks in advance
First of all thanks Jan for your help. Now I have another issue when rendering the form is this:
org.alfresco.web.forms.FormProcessor$ProcessingException: org.alfresco.web.forms.xforms.FormBuilderException: Expected root form element to be a xf:group, not a xhtml:body. Ensure that NIF is a concrete type that has no extensions. Types with extensions are not supported for the root element of a form. I've change the xml Schema and is like this:
<?xml version = "1.0" encoding = "UTF-8"?> <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema"> <xs:element name = "NumeroDocumento" type="Alfa42" > </xs:element> <xs:simpleType name="Alfa42"> <xs:restriction base = "xs:string"> <xs:maxLength value = "42"></xs:maxLength> </xs:restriction> </xs:simpleType> <xs:element name = "NumeroExpediente" type="Alfa30"> </xs:element> <xs:simpleType name="Alfa30"> <xs:restriction base = "xs:string"> <xs:maxLength value = "30"></xs:maxLength> </xs:restriction> </xs:simpleType> <xs:element name = "NIF" type="Alfa10"> </xs:element> <xs:element name = "ApellidosNombre" type="Alfa125"> </xs:element> <xs:simpleType name="Alfa125"> <xs:restriction base = "xs:string"> <xs:maxLength value = "125"></xs:maxLength> </xs:restriction> </xs:simpleType> <xs:element name = "CodigoTerritorial" type="Alfa10"> </xs:element> <xs:simpleType name="Alfa10"> <xs:restriction base = "xs:string"> <xs:maxLength value = "10"></xs:maxLength> </xs:restriction> </xs:simpleType> <xs:element name = "Municipio" type="Alfa40"> </xs:element> <xs:simpleType name="Alfa40"> <xs:restriction base = "xs:string"> <xs:maxLength value = "40"></xs:maxLength> </xs:restriction> </xs:simpleType> <xs:element name = "FechaEmision" type="xs:date"> </xs:element> <xs:element name = "Documento" type="Alfa40"> </xs:element> <xs:element name = "Importe" type="TImporte"> </xs:element> <xs:simpleType name="TImporte"> <xs:restriction base = "xs:decimal"> <xs:totalDigits value = "12"></xs:totalDigits> <xs:fractionDigits value = "2"> </xs:fractionDigits> </xs:restriction> </xs:simpleType> <xs:element name = "NumIntentos" type="TNumIntentos"> </xs:element> <xs:simpleType name="TNumIntentos"> <xs:restriction base = "xs:decimal"> <xs:totalDigits value = "1"></xs:totalDigits> <xs:minInclusive value="1"></xs:minInclusive> <xs:maxInclusive value="3"></xs:maxInclusive> </xs:restriction> </xs:simpleType>
<xs:element name = "Resultado" type="TResultado"> </xs:element> <xs:simpleType name="TResultado"> <xs:restriction base = "xs:decimal"> <xs:totalDigits value = "1"></xs:totalDigits> <xs:minInclusive value="1"></xs:minInclusive> <xs:maxInclusive value="9"></xs:maxInclusive> </xs:restriction> </xs:simpleType> <xs:element name = "FechaEstado" type="xs:date"> </xs:element> <xs:element name = "Notificador" type="Alfa2"> </xs:element>
<xs:simpleType name="Alfa2"> <xs:restriction base = "xs:string"> <xs:maxLength value = "2"></xs:maxLength> </xs:restriction> </xs:simpleType> </xs:schema>
I will apreciate your orientatinos. thanks in advance.
Finally I made the form correctly but my surprise was that always gives an error on IE but not on Mozila when trying to introduce data. When selecting values on radio buttons or chekboxes. Should I use the last version of IE?. Most of our customers have elder versions of IE. Could someone tell me if its a bug?
All this bugs arised with 2.9 releases. It makes avalable ECM forms without web project, but becomes useless due to this bugs.
I tested various schema data types with various browsers (IE, Opera, Mozilla FF, Safari).
With IE does not work proper radiobuttons, Mozilla doesn't want add an XML elements with "+" button. datepicker doesn't function at all… and so on… Opera and all other is inoperateable.