Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline: XPath error in demo form with "Copy data (with warning)" #6671

Open
ebruchez opened this issue Dec 11, 2024 · 1 comment
Open

Offline: XPath error in demo form with "Copy data (with warning)" #6671

ebruchez opened this issue Dec 11, 2024 · 1 comment

Comments

@ebruchez
Copy link
Collaborator

  • load /fr/orbeon/builder/edit/4da83f8626b0e8f3f29ae554780c060312e04d02
  • Test Offline
  • change "value 2-3" to something else
  • getting error
An empty sequence is not allowed as the value in 'cast as' expression

The only place we use this is in buttons-bar.xsl:

<xf:var name="highlight-primary-opt"   as="xs:boolean?" value="fr:component-param-value('highlight-primary')  [. = ('true', 'false')] cast as xs:boolean?"/>
<xf:var name="inverse-opt"             as="xs:boolean?" value="fr:component-param-value('inverse')            [. = ('true', 'false')] cast as xs:boolean?"/>

Although it could also be in dropdown-date.xbl.

if ($r castable as xs:integer) then
    xs:integer($r) cast as xs:integer
...

However, if I change all of these, I still get the error!

In any case, this error seems incorrect, and this works on the JVM. Probably a bug in https://github.com/orbeon/saxon-xpath.

@ebruchez
Copy link
Collaborator Author

Possible next steps:

  • try cast as expressions in saxon-xpath tests
  • add debug to figure out which expression fails

@ebruchez ebruchez moved this to To do in Orbeon Forms 2024.1 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

1 participant