Xslt30Transformer Raw Result

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

Xslt30Transformer Raw Result

max toro q
I'm trying to return a sequence of nodes from a transformation invoked
using `Xslt30Transformer.ApplyTemplates(XdmValue)`, but I always get
back a document node, which doesn't work for me because the nodes may
belong to different documents and by creating a new document all
context is lost.

Is this a bug?
--
Max Toro

------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Xslt30Transformer Raw Result

Michael Kay
This XSLT 3.0 feature isn’t implemented in Saxon 9.6 - invoking a template as the entry point always wraps the result in a document node.

If you want a sequence of nodes as the result, you need to use a function as the entry point. This always returns the raw (unwrapped) result.

Michael Kay
Saxonica


> On 29 Sep 2015, at 19:09, Max Toro <[hidden email]> wrote:
>
> I'm trying to return a sequence of nodes from a transformation invoked
> using `Xslt30Transformer.ApplyTemplates(XdmValue)`, but I always get
> back a document node, which doesn't work for me because the nodes may
> belong to different documents and by creating a new document all
> context is lost.
>
> Is this a bug?
> --
> Max Toro
>
> ------------------------------------------------------------------------------
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Xslt30Transformer Raw Result

Michael Kay
Sorry, I’m not sure that response is correct. I need to check further.

Michael Kay
Saxonica

> On 29 Sep 2015, at 19:43, Michael Kay <[hidden email]> wrote:
>
> This XSLT 3.0 feature isn’t implemented in Saxon 9.6 - invoking a template as the entry point always wraps the result in a document node.
>
> If you want a sequence of nodes as the result, you need to use a function as the entry point. This always returns the raw (unwrapped) result.
>
> Michael Kay
> Saxonica
>
>
>> On 29 Sep 2015, at 19:09, Max Toro <[hidden email]> wrote:
>>
>> I'm trying to return a sequence of nodes from a transformation invoked
>> using `Xslt30Transformer.ApplyTemplates(XdmValue)`, but I always get
>> back a document node, which doesn't work for me because the nodes may
>> belong to different documents and by creating a new document all
>> context is lost.
>>
>> Is this a bug?
>> --
>> Max Toro
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help 
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Xslt30Transformer Raw Result

Michael Kay
My initial response was half right - the facility is half implemented. We created the API to work this way, but it wasn’t properly tested and some of the supporting code was missing.

I believe I’ve now got it working and it will be in the next 9.6 maintenance release.

The issue is logged at https://saxonica.plan.io/issues/2461

Thanks for bringing it to our attention.

Michael Kay
Saxonica


> On 29 Sep 2015, at 20:02, Michael Kay <[hidden email]> wrote:
>
> Sorry, I’m not sure that response is correct. I need to check further.
>
> Michael Kay
> Saxonica
>
>> On 29 Sep 2015, at 19:43, Michael Kay <[hidden email]> wrote:
>>
>> This XSLT 3.0 feature isn’t implemented in Saxon 9.6 - invoking a template as the entry point always wraps the result in a document node.
>>
>> If you want a sequence of nodes as the result, you need to use a function as the entry point. This always returns the raw (unwrapped) result.
>>
>> Michael Kay
>> Saxonica
>>
>>
>>> On 29 Sep 2015, at 19:09, Max Toro <[hidden email]> wrote:
>>>
>>> I'm trying to return a sequence of nodes from a transformation invoked
>>> using `Xslt30Transformer.ApplyTemplates(XdmValue)`, but I always get
>>> back a document node, which doesn't work for me because the nodes may
>>> belong to different documents and by creating a new document all
>>> context is lost.
>>>
>>> Is this a bug?
>>> --
>>> Max Toro
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help 
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help