Project

Profile

Help

Using output method="adaptive" with 9.7 to output array or map does not work

Added by Martin Honnen over 8 years ago

I am using Saxon 9.7 EE and having trouble to output a map or an array using @xsl:output method="adaptive"@.

The sample XSLT stylesheets are, for a map



  



  



which gives the error

Error
  FOTY0013: Cannot write a function item to an XML tree
Cannot write a function item to an XML tree

for an array



  



  



which outputs nothing.


Replies (2)

RE: Using output method="adaptive" with 9.7 to output array or map does not work - Added by Martin Honnen over 8 years ago

It seems that @net.sf.saxon.Query@ is also having problems with outputting a @map@ or an @array@ using output method @adaptive@, when I run a simple program

xquery version "3.1";
[1, 2, 3, 4]

using @-qversion:3.1 !method=adaptive@ from the command line I get only an empty line as the output.

The same happens for a map

xquery version "3.1";
map { 'a': 1, 'b': 2 }

the output is an empty line. Method @!method=json@ produces the expected output however.

    (1-2/2)

    Please register to reply