Hi,
i have a problem with one of my older forms. I need to make sure, that some fieldentries must not have the same values! My form looks like this: <Synonyme> <Synonym>herren</Synonym> ... <Synonym>herren</Synonym> </Synonyme> What i used before was inside my XSD: <xs:unique name="SynGruppe"> <xs:selector xpath="Synonyme/Synonym"/> <xs:field xpath="."/> </xs:unique> But this seems not to work any more, because no errors are shown. Was there a bug? At the moment i'm just using Orbeon Forms 3.7.0beta1+.200901060316 What i tried now is to find an xforms:bind expression doing the same trick, but i'm kind of lost here. Any ideas or help would be appreciated. Thanks a lot, Marcus -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi ones again,
some more information for you: The following seems to work at the sandbox, so the validation-processor, using an xpl seems to work right, but integrating my XSD directly to the XForms does not work. So i think, I do nothing wrong :( Should it work the same way without doing the workaround with XPL? XML Schema Sandbox ------------------------------ XML: <form> <Synonymgruppe> <ID>3</ID> <Synonyme> <Synonym>herren</Synonym> <Synonym>herren</Synonym> </Synonyme> <Bemerkungen/> </Synonymgruppe> </form> XSD: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!--W3C Schema generated by XMLSpy v2006 sp1 U (http://www.altova.com)--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="form"> <xs:complexType> <xs:sequence> <xs:element name="Synonymgruppe" type="SynonymgruppeType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="SynonymgruppeType"> <xs:sequence> <xs:element name="ID" type="xs:integer"/> <xs:element name="Synonyme"> <xs:complexType> <xs:sequence> <xs:element ref="Synonym" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:unique name="SynGruppe"> <xs:selector xpath="./Synonym"/> <xs:field xpath="."/> </xs:unique> </xs:element> <xs:element ref="Bemerkungen"/> </xs:sequence> </xs:complexType> <xs:element name="Synonym" type="requiredNonEmptyString"> </xs:element> <xs:simpleType name="requiredNonEmptyString"> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:whiteSpace value="collapse"/> </xs:restriction> </xs:simpleType> <xs:element name="Bemerkungen"> <xs:complexType> <xs:sequence> <xs:element name="Bemerkung" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Zeile" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Output: The document is not valid according to the schema: 1. Error this element does not satisfy the uniqueness imposed by "SynGruppe" 2. Error The same key value is used ---------------------------------- But this error does not come up within XForms adding the XSD there. BUG? Thanks in advance, Marcus -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi,
anything new about the XML-Schema-Validation BUG? Why does this work in the sandbox, but not within normal XForms including the same schema? Regards, Marcus [hidden email] schrieb: > Hi ones again, > some more information for you: > > The following seems to work at the sandbox, so the validation-processor, using > an xpl seems to work right, but integrating my XSD directly to the XForms does > not work. So i think, I do nothing wrong :( Should it work the same way without > doing the workaround with XPL? > > XML Schema Sandbox > ------------------------------ > XML: > <form> > <Synonymgruppe> > <ID>3</ID> > <Synonyme> > <Synonym>herren</Synonym> > <Synonym>herren</Synonym> > </Synonyme> > <Bemerkungen/> > </Synonymgruppe> > </form> > > XSD: > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <!--W3C Schema generated by XMLSpy v2006 sp1 U (http://www.altova.com)--> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified"> > <xs:element name="form"> > <xs:complexType> > <xs:sequence> > <xs:element name="Synonymgruppe" > type="SynonymgruppeType"/> > </xs:sequence> > </xs:complexType> > </xs:element> > <xs:complexType name="SynonymgruppeType"> > <xs:sequence> > <xs:element name="ID" type="xs:integer"/> > <xs:element name="Synonyme"> > <xs:complexType> > <xs:sequence> > <xs:element ref="Synonym" > minOccurs="1" maxOccurs="unbounded"/> > </xs:sequence> > </xs:complexType> > <xs:unique name="SynGruppe"> > <xs:selector xpath="./Synonym"/> > <xs:field xpath="."/> > </xs:unique> > </xs:element> > <xs:element ref="Bemerkungen"/> > </xs:sequence> > </xs:complexType> > <xs:element name="Synonym" type="requiredNonEmptyString"> > </xs:element> > <xs:simpleType name="requiredNonEmptyString"> > <xs:restriction base="xs:string"> > <xs:minLength value="1"/> > <xs:whiteSpace value="collapse"/> > </xs:restriction> > </xs:simpleType> > <xs:element name="Bemerkungen"> > <xs:complexType> > <xs:sequence> > <xs:element name="Bemerkung" minOccurs="0" > maxOccurs="unbounded"> > <xs:complexType> > <xs:sequence> > <xs:element > name="Zeile" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > > Output: > The document is not valid according to the schema: > 1. Error this element does not satisfy the uniqueness imposed by "SynGruppe" > 2. Error The same key value is used > > ---------------------------------- > But this error does not come up within XForms adding the XSD there. > BUG? > Thanks in advance, > Marcus > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Marcus,
I see that the code does not check ids when performing lax validation which is the default. Try putting this on your instance: xxforms:validation="strict" -Erik On Jun 15, 2009, at 12:58 AM, Marcus wrote: > Hi, > anything new about the XML-Schema-Validation BUG? > Why does this work in the sandbox, but not within normal XForms > including the same schema? > Regards, Marcus > > > > [hidden email] schrieb: >> Hi ones again, some more information for you: >> >> The following seems to work at the sandbox, so the validation- >> processor, using >> an xpl seems to work right, but integrating my XSD directly to the >> XForms does >> not work. So i think, I do nothing wrong :( Should it work the same >> way without >> doing the workaround with XPL? >> >> XML Schema Sandbox >> ------------------------------ >> XML: >> <form> >> <Synonymgruppe> >> <ID>3</ID> >> <Synonyme> >> <Synonym>herren</Synonym> >> <Synonym>herren</Synonym> >> </Synonyme> >> <Bemerkungen/> >> </Synonymgruppe> >> </form> >> >> XSD: >> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >> <!--W3C Schema generated by XMLSpy v2006 sp1 U (http:// >> www.altova.com)--> >> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >> elementFormDefault="qualified"> >> <xs:element name="form"> >> <xs:complexType> >> <xs:sequence> >> <xs:element name="Synonymgruppe" >> type="SynonymgruppeType"/> >> </xs:sequence> >> </xs:complexType> >> </xs:element> >> <xs:complexType name="SynonymgruppeType"> >> <xs:sequence> >> <xs:element name="ID" type="xs:integer"/> >> <xs:element name="Synonyme"> >> <xs:complexType> >> <xs:sequence> >> <xs:element ref="Synonym" >> minOccurs="1" maxOccurs="unbounded"/> >> </xs:sequence> >> </xs:complexType> >> <xs:unique name="SynGruppe"> >> <xs:selector xpath="./Synonym"/> >> <xs:field xpath="."/> >> </xs:unique> >> </xs:element> >> <xs:element ref="Bemerkungen"/> >> </xs:sequence> >> </xs:complexType> >> <xs:element name="Synonym" type="requiredNonEmptyString"> >> </xs:element> >> <xs:simpleType name="requiredNonEmptyString"> >> <xs:restriction base="xs:string"> >> <xs:minLength value="1"/> >> <xs:whiteSpace value="collapse"/> >> </xs:restriction> >> </xs:simpleType> >> <xs:element name="Bemerkungen"> >> <xs:complexType> >> <xs:sequence> >> <xs:element name="Bemerkung" minOccurs="0" >> maxOccurs="unbounded"> >> <xs:complexType> >> <xs:sequence> >> <xs:element >> name="Zeile" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> >> </xs:sequence> >> </xs:complexType> >> </xs:element> >> </xs:sequence> >> </xs:complexType> >> </xs:element> >> </xs:schema> >> >> Output: >> The document is not valid according to the schema: >> 1. Error this element does not satisfy the uniqueness imposed by >> "SynGruppe" >> 2. Error The same key value is used >> >> ---------------------------------- >> But this error does not come up within XForms adding the XSD there. >> BUG? Thanks in advance, Marcus >> > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
that does the trick! Thanks a lot! But is this just a workaround or the way it should be? Regards, Marcus Erik Bruchez schrieb: > Marcus, > > I see that the code does not check ids when performing lax validation > which is the default. Try putting this on your instance: > > xxforms:validation="strict" > > -Erik > > On Jun 15, 2009, at 12:58 AM, Marcus wrote: > >> Hi, >> anything new about the XML-Schema-Validation BUG? >> Why does this work in the sandbox, but not within normal XForms >> including the same schema? >> Regards, Marcus >> >> >> >> [hidden email] schrieb: >>> Hi ones again, some more information for you: >>> >>> The following seems to work at the sandbox, so the >>> validation-processor, using >>> an xpl seems to work right, but integrating my XSD directly to the >>> XForms does >>> not work. So i think, I do nothing wrong :( Should it work the same >>> way without >>> doing the workaround with XPL? >>> >>> XML Schema Sandbox >>> ------------------------------ >>> XML: >>> <form> >>> <Synonymgruppe> >>> <ID>3</ID> >>> <Synonyme> >>> <Synonym>herren</Synonym> >>> <Synonym>herren</Synonym> >>> </Synonyme> >>> <Bemerkungen/> >>> </Synonymgruppe> >>> </form> >>> >>> XSD: >>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >>> <!--W3C Schema generated by XMLSpy v2006 sp1 U >>> (http://www.altova.com)--> >>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> elementFormDefault="qualified"> >>> <xs:element name="form"> >>> <xs:complexType> >>> <xs:sequence> >>> <xs:element name="Synonymgruppe" >>> type="SynonymgruppeType"/> >>> </xs:sequence> >>> </xs:complexType> >>> </xs:element> >>> <xs:complexType name="SynonymgruppeType"> >>> <xs:sequence> >>> <xs:element name="ID" type="xs:integer"/> >>> <xs:element name="Synonyme"> >>> <xs:complexType> >>> <xs:sequence> >>> <xs:element ref="Synonym" >>> minOccurs="1" maxOccurs="unbounded"/> >>> </xs:sequence> >>> </xs:complexType> >>> <xs:unique name="SynGruppe"> >>> <xs:selector xpath="./Synonym"/> >>> <xs:field xpath="."/> >>> </xs:unique> >>> </xs:element> >>> <xs:element ref="Bemerkungen"/> >>> </xs:sequence> >>> </xs:complexType> >>> <xs:element name="Synonym" type="requiredNonEmptyString"> >>> </xs:element> >>> <xs:simpleType name="requiredNonEmptyString"> >>> <xs:restriction base="xs:string"> >>> <xs:minLength value="1"/> >>> <xs:whiteSpace value="collapse"/> >>> </xs:restriction> >>> </xs:simpleType> >>> <xs:element name="Bemerkungen"> >>> <xs:complexType> >>> <xs:sequence> >>> <xs:element name="Bemerkung" minOccurs="0" >>> maxOccurs="unbounded"> >>> <xs:complexType> >>> <xs:sequence> >>> <xs:element >>> name="Zeile" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> >>> </xs:sequence> >>> </xs:complexType> >>> </xs:element> >>> </xs:sequence> >>> </xs:complexType> >>> </xs:element> >>> </xs:schema> >>> >>> Output: >>> The document is not valid according to the schema: >>> 1. Error this element does not satisfy the uniqueness imposed by >>> "SynGruppe" >>> 2. Error The same key value is used >>> >>> ---------------------------------- >>> But this error does not come up within XForms adding the XSD there. >>> BUG? Thanks in advance, Marcus >>> >> >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Good question!
I don't think XForms says anything about this. I am not 100% sure if constraint validation should take place or not. With strict validation, basically the entire document is validated. Then applying document-level validation (xs:unique, xs:key/xs:keyref) constraints certainly makes sense. With lax validation, it is not as clear, but XSLT 2.0 seems to hint that yes: http://www.w3.org/TR/xslt20/#validating-document-nodes With XSLT 2.0, which is our inspiration for schema validation, "document-level validation" takes place with "explicit result documents", and it seems that document-level validation does take place in that case whether validation is strict or lax. So I have added this RFE: http://forge.ow2.org/tracker/index.php?func=detail&aid=313912&group_id=168&atid=350207 -Erik On Jun 16, 2009, at 2:05 AM, Marcus wrote: > Hi Erik, > that does the trick! Thanks a lot! > But is this just a workaround or the way it should be? > > Regards, Marcus > > > > > Erik Bruchez schrieb: >> Marcus, >> >> I see that the code does not check ids when performing lax >> validation which is the default. Try putting this on your instance: >> >> xxforms:validation="strict" >> >> -Erik >> >> On Jun 15, 2009, at 12:58 AM, Marcus wrote: >> >>> Hi, >>> anything new about the XML-Schema-Validation BUG? >>> Why does this work in the sandbox, but not within normal XForms >>> including the same schema? >>> Regards, Marcus >>> >>> >>> >>> [hidden email] schrieb: >>>> Hi ones again, some more information for you: >>>> >>>> The following seems to work at the sandbox, so the validation- >>>> processor, using >>>> an xpl seems to work right, but integrating my XSD directly to >>>> the XForms does >>>> not work. So i think, I do nothing wrong :( Should it work the >>>> same way without >>>> doing the workaround with XPL? >>>> >>>> XML Schema Sandbox >>>> ------------------------------ >>>> XML: >>>> <form> >>>> <Synonymgruppe> >>>> <ID>3</ID> >>>> <Synonyme> >>>> <Synonym>herren</Synonym> >>>> <Synonym>herren</Synonym> >>>> </Synonyme> >>>> <Bemerkungen/> >>>> </Synonymgruppe> >>>> </form> >>>> >>>> XSD: >>>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> >>>> <!--W3C Schema generated by XMLSpy v2006 sp1 U (http://www.altova.com >>>> )--> >>>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> elementFormDefault="qualified"> >>>> <xs:element name="form"> >>>> <xs:complexType> >>>> <xs:sequence> >>>> <xs:element name="Synonymgruppe" >>>> type="SynonymgruppeType"/> >>>> </xs:sequence> >>>> </xs:complexType> >>>> </xs:element> >>>> <xs:complexType name="SynonymgruppeType"> >>>> <xs:sequence> >>>> <xs:element name="ID" type="xs:integer"/> >>>> <xs:element name="Synonyme"> >>>> <xs:complexType> >>>> <xs:sequence> >>>> <xs:element ref="Synonym" >>>> minOccurs="1" maxOccurs="unbounded"/> >>>> </xs:sequence> >>>> </xs:complexType> >>>> <xs:unique name="SynGruppe"> >>>> <xs:selector xpath="./Synonym"/> >>>> <xs:field xpath="."/> >>>> </xs:unique> >>>> </xs:element> >>>> <xs:element ref="Bemerkungen"/> >>>> </xs:sequence> >>>> </xs:complexType> >>>> <xs:element name="Synonym" type="requiredNonEmptyString"> >>>> </xs:element> >>>> <xs:simpleType name="requiredNonEmptyString"> >>>> <xs:restriction base="xs:string"> >>>> <xs:minLength value="1"/> >>>> <xs:whiteSpace value="collapse"/> >>>> </xs:restriction> >>>> </xs:simpleType> >>>> <xs:element name="Bemerkungen"> >>>> <xs:complexType> >>>> <xs:sequence> >>>> <xs:element name="Bemerkung" minOccurs="0" >>>> maxOccurs="unbounded"> >>>> <xs:complexType> >>>> <xs:sequence> >>>> <xs:element >>>> name="Zeile" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> >>>> </xs:sequence> >>>> </xs:complexType> >>>> </xs:element> >>>> </xs:sequence> >>>> </xs:complexType> >>>> </xs:element> >>>> </xs:schema> >>>> >>>> Output: >>>> The document is not valid according to the schema: >>>> 1. Error this element does not satisfy the uniqueness imposed by >>>> "SynGruppe" >>>> 2. Error The same key value is used >>>> >>>> ---------------------------------- >>>> But this error does not come up within XForms adding the XSD there. >>>> BUG? Thanks in advance, Marcus >>>> >>> >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |