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
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support
------------------------------------------------------------------------------
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<?xsltforms-options debug="yes"?>
<html xmlns:xf ="http://www.w3.org/2002/xforms"
xmlns:fn ="http://www.w3.org/2005/xpath-functions"
xmlns:html="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">
<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:simpleType name="listOfInts">
<xs:list itemType="xs:int"/>
</xs:simpleType>
</xs:schema>
<xf:bind nodeset="counts" type="ns1:listOfInts"/>
<!--
! Using the above bind, generates an error in the javascript
! "this.baseType is undefined"
!
! Either when the element xf:bind is removed,
! or when the type attribute of the element xf:bind is changed to xs:string,
! or when the element xs:list is replaced by a xs:restriction with the base attribute set to xs:string,
! the error doesn't appear.
!-->
</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 nodeset="counts">
<li><xf:output ref="."/></li>
</xf:repeat>
</ul>
<!--
! Searching for a workaround...
!
! xf:trigger
! xf:action ev:event="DOMActivate"
! xf:setvalue ref="counts" value="fn:tokenize(.,'\s+')"/>
! But tokenize(string,pattern) is not supported
!-->
</body>
</html>
------------------------------------------------------------------------------
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support