xsl:result-document/@href OK in Saxon 9.6, error in 9.7?

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

xsl:result-document/@href OK in Saxon 9.6, error in 9.7?

Sewell, David R. (drs2n)
I have a transform that has worked through several versions of Saxon but is now
throwing an error in 9.7. The offending(?) XSLT element is

       <xsl:result-document href="{concat(@xml:id, '.xml')}">
         <xsl:copy-of select="."/>
       </xsl:result-document>

Wrapped in a for-each, in Saxon 9.6 it writes to output files as expected. In
9.7 I get:

Error in xsl:result-document/@href on line 9 column 61 of
ConsolidatedIndex-to-FGEA-03.xsl:
   Invalid relative URI syntax: URI is not absolute

Has something changed in the spec that I should know about? The error occurs
whether I select 2.0 or 3.0 for the stylesheet @version.

David

--
David Sewell
Manager of Digital Initiatives
The University of Virginia Press
Email: [hidden email]   Tel: +1 434 924 9973
Web: http://www.upress.virginia.edu/rotunda

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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
|  
Report Content as Inappropriate

Re: xsl:result-document/@href OK in Saxon 9.6, error in 9.7?

Michael Kay
Is this Java or .NET?

I'm having problems locating an error message that matches this. Did you quote it exactly as output? Is there any custom URI resolver or OutputURIResolver involved?

And what is the value of @xml:id?

How did you run the transformation and what is the base Output URI?

Michael Kay
Saxonica

> On 1 Aug 2017, at 14:56, David Sewell <[hidden email]> wrote:
>
> I have a transform that has worked through several versions of Saxon but is now throwing an error in 9.7. The offending(?) XSLT element is
>
>      <xsl:result-document href="{concat(@xml:id, '.xml')}">
>        <xsl:copy-of select="."/>
>      </xsl:result-document>
>
> Wrapped in a for-each, in Saxon 9.6 it writes to output files as expected. In 9.7 I get:
>
> Error in xsl:result-document/@href on line 9 column 61 of ConsolidatedIndex-to-FGEA-03.xsl:
>  Invalid relative URI syntax: URI is not absolute
>
> Has something changed in the spec that I should know about? The error occurs whether I select 2.0 or 3.0 for the stylesheet @version.
>
> David
>
> --
> David Sewell
> Manager of Digital Initiatives
> The University of Virginia Press
> Email: [hidden email]   Tel: +1 434 924 9973
> Web: http://www.upress.virginia.edu/rotunda
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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
|  
Report Content as Inappropriate

Re: xsl:result-document/@href OK in Saxon 9.6, error in 9.7?

Sewell, David R. (drs2n)
I've been investigating a bit more and I think my problem is connected to the
fact that I'm chaining transforms using saxon:next-in-chain. Rather than take up
more time on the list, I'll send code and data to Saxonica support.

David

On Tue, 1 Aug 2017, Michael Kay wrote:

> Is this Java or .NET?
>
> I'm having problems locating an error message that matches this. Did you quote it exactly as output? Is there any custom URI resolver or OutputURIResolver involved?
>
> And what is the value of @xml:id?
>
> How did you run the transformation and what is the base Output URI?
>
> Michael Kay
> Saxonica
>
>> On 1 Aug 2017, at 14:56, David Sewell <[hidden email]> wrote:
>>
>> I have a transform that has worked through several versions of Saxon but is now throwing an error in 9.7. The offending(?) XSLT element is
>>
>>      <xsl:result-document href="{concat(@xml:id, '.xml')}">
>>        <xsl:copy-of select="."/>
>>      </xsl:result-document>
>>
>> Wrapped in a for-each, in Saxon 9.6 it writes to output files as expected. In 9.7 I get:
>>
>> Error in xsl:result-document/@href on line 9 column 61 of ConsolidatedIndex-to-FGEA-03.xsl:
>>  Invalid relative URI syntax: URI is not absolute
>>
>> Has something changed in the spec that I should know about? The error occurs whether I select 2.0 or 3.0 for the stylesheet @version.
>>
>> David
>>
>> --
>> David Sewell
>> Manager of Digital Initiatives
>> The University of Virginia Press
>> Email: [hidden email]   Tel: +1 434 924 9973
>> Web: http://www.upress.virginia.edu/rotunda
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>

--
David Sewell
Manager of Digital Initiatives
The University of Virginia Press
Email: [hidden email]   Tel: +1 434 924 9973
Web: http://www.upress.virginia.edu/rotunda

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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
|  
Report Content as Inappropriate

Re: xsl:result-document/@href OK in Saxon 9.6, error in 9.7?

Eliot Kimber-2
The issue is most likely that there is no base URI for containing node, so the resulting effective result URI is not absolute, which it would otherwise be.

One way (perhaps the only way or the best way) to solve this is to set xml:base on the root of the output produced by an earlier stage. That ensures that there’s a base URI without having to worry about the outside-XSLT details.

I use this same technique when doing multi-phase processing within a single XSLT transform.

Cheers,

E.

--
Eliot Kimber
http://contrext.com
 


On 8/1/17, 12:10 PM, "David Sewell" <[hidden email]> wrote:

    I've been investigating a bit more and I think my problem is connected to the
    fact that I'm chaining transforms using saxon:next-in-chain. Rather than take up
    more time on the list, I'll send code and data to Saxonica support.
   
    David
   
    On Tue, 1 Aug 2017, Michael Kay wrote:
   
    > Is this Java or .NET?
    >
    > I'm having problems locating an error message that matches this. Did you quote it exactly as output? Is there any custom URI resolver or OutputURIResolver involved?
    >
    > And what is the value of @xml:id?
    >
    > How did you run the transformation and what is the base Output URI?
    >
    > Michael Kay
    > Saxonica
    >
    >> On 1 Aug 2017, at 14:56, David Sewell <[hidden email]> wrote:
    >>
    >> I have a transform that has worked through several versions of Saxon but is now throwing an error in 9.7. The offending(?) XSLT element is
    >>
    >>      <xsl:result-document href="{concat(@xml:id, '.xml')}">
    >>        <xsl:copy-of select="."/>
    >>      </xsl:result-document>
    >>
    >> Wrapped in a for-each, in Saxon 9.6 it writes to output files as expected. In 9.7 I get:
    >>
    >> Error in xsl:result-document/@href on line 9 column 61 of ConsolidatedIndex-to-FGEA-03.xsl:
    >>  Invalid relative URI syntax: URI is not absolute
    >>
    >> Has something changed in the spec that I should know about? The error occurs whether I select 2.0 or 3.0 for the stylesheet @version.
    >>
    >> David
    >>
    >> --
    >> David Sewell
    >> Manager of Digital Initiatives
    >> The University of Virginia Press
    >> Email: [hidden email]   Tel: +1 434 924 9973
    >> Web: http://www.upress.virginia.edu/rotunda
    >>
    >> ------------------------------------------------------------------------------
    >> Check out the vibrant tech community on one of the world's most
    >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
    >> _______________________________________________
    >> saxon-help mailing list archived at http://saxon.markmail.org/
    >> [hidden email]
    >> https://lists.sourceforge.net/lists/listinfo/saxon-help
    >
    >
    > ------------------------------------------------------------------------------
    > Check out the vibrant tech community on one of the world's most
    > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
    > _______________________________________________
    > saxon-help mailing list archived at http://saxon.markmail.org/
    > [hidden email]
    > https://lists.sourceforge.net/lists/listinfo/saxon-help
    >
   
    --
    David Sewell
    Manager of Digital Initiatives
    The University of Virginia Press
    Email: [hidden email]   Tel: +1 434 924 9973
    Web: http://www.upress.virginia.edu/rotunda
   
    ------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
    _______________________________________________
    saxon-help mailing list archived at http://saxon.markmail.org/
    [hidden email]
    https://lists.sourceforge.net/lists/listinfo/saxon-help 
   
   



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Loading...