Erik Bruchez wrote:
David,
I don't have an answer at this point, but maybe it's just that Saxon 8.1.1 broke something.
-Erik
Hi Erik,
That was my guess too. I have spotted some other minor differences BTW:
1 - I use this select1 in one of our forms:
<xforms:select1 ref="currentStatus/status">
<xsl:for-each select="doc('oxf:/xml/lookups.xml')/root/statusValues/status">
<xforms:item>
<xforms:label>
<xsl:value-of select="string"/>
</xforms:label>
<xforms:value>
<xsl:value-of select="code"/>
</xforms:value>
</xforms:item>
</xsl:for-each>
</xforms:select1>
In the xforms model I make this read only - so I am just using the select1 to provide the lookup from code to display string. This used to work fine but now when the form is submitted the currentStatus/status value becomes empty! I can get round this by just doing the lookup in xsl, but just thought you may be interested in the difference as it doesnt sound like its doing the right thing by loosing the read only value.
2 - I use several calculated fields for totals. All of the numbers I am adding up are integers but yet the sum now comes out as a decimal unless I explicitly cast it as an integer: this isnt too much of a problem either - I can just do an explicit cast in the calculate field. Here is an example of the model item property:
<xforms:bind nodeset="/form/document/pea/costs/estimatedCost"
calculate="sum(/form/document/pea/expenditureList/*/expenditureItem/value[. castable as xs:integer]))"/>
which is now:
<xforms:bind nodeset="/form/document/pea/costs/estimatedCost"
calculate="xs:integer(sum(/form/document/pea/expenditureList/*/expenditureItem/value[. castable as xs:integer])))"/>
I assume this is also to do with the new version of Saxon?
David Sinclair.
David Sinclair wrote:
Thanks Alex, I have that working now.
However, having got over that hurdle I now have another problem. We have the following code to get the user from a request:
<p:processor name="oxf:request">
<p:input name="config">
<config>
<include>/request/headers/header[name = 'authorization']/value</include>
</config>
</p:input>
<p:output name="data" id="request"/>
</p:processor>
<p:processor name="oxf:xslt-2.0">
<p:input name="data" href="#request"/>
<p:input name="config">
<username xsl:version="2.0" xmlns:base64="java:org.orbeon.oxf.util.Base64" xmlns:string="java:java.lang.String" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:variable name="base64-user-basic" as="xs:string" select="/request/headers/header/value"/>
<xsl:variable name="base64-user" as="xs:string" select="tokenize($base64-user-basic, ' ')[2]"/>
<xsl:variable name="user" as="xs:string" select="string:new(base64:decode($base64-user))"/>
<xsl:value-of select="tokenize($user, ':')[1]"/>
</username>
</p:input>
<p:output name="data" id="username"/>
</p:processor>
This code no longer works, the exception below being thrown. Type class org.orbeon.oxf.common.ValidationException
Message oxf:/common-xpl/get-user-info.xpl, line 0, column 0 : Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() : oxf:/common-xpl/get-user-info.xpl, line 0, column 0: Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new() Error at xsl:variable on line 39 of oxf:/common-xpl/get-user-info.xpl: XPath syntax error at char 39 on line 39 in {...w(base64:decode($base64-use...}: Cannot find a matching 1-argument function named {java:java.lang.String}new()
Line 39 is this one BTW:
<xsl:variable name="user" as="xs:string" select="string:new(base64:decode($base64-user))"/>
I am completely stumped as to why this might be happening...
David Sinclair.
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ orbeon-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/orbeon-user
