Re: [Xsltforms-support] xsd:list
Brought to you by:
alain-couthures
|
From: Alain C. <ala...@ag...> - 2015-06-20 06:59:53
|
Hello Michel, I have now committed a new XSLTForms build which includes xsd:list fixes and support for xsd:include and fn:tokenize. Please find below the testcase you sent with some modifications: <html xmlns:xf ="http://www.w3.org/2002/xforms" xmlns:fn ="http://www.w3.org/2005/xpath-functions" xmlns="http://www.w3.org/1999/xhtml" xmlns:ev ="http://www.w3.org/2001/xml-events" xmlns:xs ="http://www.w3.org/2001/XMLSchema" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1 ="http://www.exemple.com/my_namespace" ns1:dummy="dummy"> <head> <title>simpleType list</title> <xf:model > <xf:instance> <data xmlns=""> <counts>1 6 2 33 91 250</counts> </data> </xf:instance> <xs:schema targetNamespace="http://www.exemple.com/my_namespace"> <xs:include schemaLocation="listOfInts.xsd"/> </xs:schema> <xf:bind ref="counts" type="ns1:listOfInts"/> </xf:model> </head> <body> <p>Testing simpleType list</p> <xf:input ref="counts"> <xf:label>Input counts:</xf:label> <xf:hint>list of integers separated by white space</xf:hint> </xf:input> <br/> <br/> <br/> <xf:output ref="counts"> <xf:label>Output counts:</xf:label> </xf:output> <br/> <br/> <p>Trying more...</p> <ul> <xf:repeat ref="tokenize(counts,'\s+')"> <li><xf:output ref="."/></li> </xf:repeat> </ul> </body> </html> It has been successfully tested at client-side with both Firefox (I added the required workaround "ns:dummy" for namespaces only used in values) , IE11 and Chrome. Thank you for your feedback! --Alain Le 18/06/2015 21:45, Alain Couthures a écrit : > Hello Michel, > > Obviously, the source code for xsd:list, inherited from AJAXForms, had > never been tested before... > > I have fixed it now and, before committing a new build on repositories > (Github and SF.net), I am wondering what you will need to manipulate > lists: currently, XSLTForms is XForms 1.1 compliant which means that > only XPath 1.0 is available (no sequence, no type,...). > > XSLTForms already includes some XForms 2.0 features and some XPath 2.0 > functions. I am now working at full XPath 3.1 support for XSLTForms 2.0! > > In the meantime, to add support for fn:tokenize(), for example, in > XSLTForms 1.0, I can use a trick which would return a nodeset instead > of a sequence. > > So, could you please tell me which functions you would need to process > lists? > > Thanks! > > --Alain > > Le 17/06/2015 23:49, Michel Kruglanski a écrit : >> Dear Alain, >> >> Please find an illustration in attachment. >> >> Best regards >> >> Michel K. >> >> On 17/06/2015 21:37, COUTHURES Alain wrote: >>> Hello again, >>> >>> This error sounds like an issue. Could you please send me a small >>> testcase so I can quickly locate this issue? >>> >>> Thanks in advance! >>> >>> Alain Couthures >>> >>> Le 17/06/2015 12:49, Michel Kruglanski a écrit : >>>> Hi, >>>> >>>> It seems that the handling of data types defined as list of values is >>>> not working properly inside XSLTFORMS. >>>> >>>> Including data type such as >>>> >>>> <xsd:simpleType><xsd:list itemType="xsd:integer"/></xsd:simpleType> >>>> >>>> is generating an error in xsltforms/xsltforms.js on a missing property >>>> "baseType" for the class XsltForms_listType. >>>> >>>> Could you confirm this shortcoming and suggest a workaround? >>>> >>>> Thank you in advance. >>>> >>>> Best regards >>>> >>>> Michel Kruglanski >>>> -- >>>> Belgian Institute for Space Aeronomy >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Xsltforms-support mailing list >>>> Xsl...@li... >>>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |