saxon 9.5 examples, class Sequence

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

saxon 9.5 examples, class Sequence

twl8n
Hi,

I have managed to get an extension function example working for 9.5 HE, but the class Sequence has me flummoxed. I can't find the documentation, among other things, and I've spend half an hour searching for it. Where are the docs for 9.5 HE, especially Sequence and ExtensionFunctionCall.call()?

Any working code samples are welcome. I'll post my example to Github later today, I guess.

Thanks!
Tom
Reply | Threaded
Open this post in threaded view
|

Re: saxon 9.5 examples, class Sequence

twl8n

I figured it out, sort of. Sequence is an interface to XdmValue which is net.sf.saxon.s9api.XdmValue. I failed to correctly interpret the first sentence of the interface Sequence docs:

"This interface represents an XDM Value..."

It isn't even necessary to type cast, just make the assignment. For example:

                net.sf.saxon.om.Sequence seq  = null;
                try
                    {
                        XdmItem new_item = XdmItem.newAtomicValue("4242",
                                                                  ItemType.INTEGER);
                        seq = new_item.getUnderlyingValue();
                    }