Project

Profile

Help

Saxon-EE 9.7.0.20: seeing error message XQDY0025

Added by Charles Sun over 6 years ago

We have upgraded Saxon-EE from 9.6 to 9.7.0.20. Then while performing XSLT transform, we started bumping into this fatal error:

Error on line 206 column 49 of table.xsl:
  XQDY0025: Cannot create an element having two attributes with the same name: @width
  at xsl:call-template name="adjust-column-widths"

Do I understand correctly that "XQDY0025" is an XQuery error and isn't supposed to occur during an XSLT transform?

We are using a customized flavor of DocBook5 and XSLT2.0. I tried running the XSLT transform with the same DocBook and XSLT files in oXygen 19.0 (which uses Saxon-EE 9.7.0.15), but haven't seen an error.

Any help is much appreciated.


Replies (9)

Please register to reply

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Michael Kay over 6 years ago

Yes, this shouldn't normally happen during XSLT processing (duplicate attributes cause an error in XQuery, but on XSLT the last one wins).

I'm not entirely surprised that it should happen, however, because the mechanism by which the Saxon innards discover what host language the source code was written in are rather tenuous at times. So I would be very grateful if you could supply a repro (that is, code I can run to reproduce the problem.)

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Charles Sun over 6 years ago

Thanks Michael for your prompt reply.

If you perform a XML-HTML transformation on the attached DocBook5 file (Test_ug_book.xml), using

  • DocBook XSLT2.0 release 2.0.19
  • Saxon-EE 9.7.0.15

the error should be reproducible.

Please let me know if you need some more details. Thanks.

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Michael Kay over 6 years ago

What docbook stylesheet should I be using as the entry point, and are any particular parameter settings needed?

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Charles Sun over 6 years ago

This stylesheet should be used as the entry point: docbook/xslt/base/html/final-pass.xsl

I don't think we need any particular parameter settings.

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Charles Sun over 6 years ago

Just in case my previous Test_ug_book.xml doesn't parse against the correct schema - please use this one instead: Test_ug_book_updated.xml

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Michael Kay over 6 years ago

I've reproduced this and logged it as a bug here:

https://saxonica.plan.io/issues/3460

It's fixed on the 9.8 branch, and it only occurs with bytecode enabled. So there are two actions you could take to avoid it: move to 9.8, or run with --generateByteCode:off

I'll commit a patch on the 9.7 branch but that branch is now pretty stable so maintenance releases aren't very frequent (basically, they're triggered by someone hitting a problem with no workaround).

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Charles Sun over 6 years ago

Thanks Michael! I turned off generateByteCode on my end and it resolved the problem.

Would you have an ETA about when the 9.7 branch with your patch will be released? I understand that maintenance releases on the 9.7 branch aren't very frequent; nevertheless, if the ETA is available it would still be really helpful. Thanks.

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Michael Kay over 6 years ago

Sorry, I can't give you an estimated date. It's probably a couple of months away: the frequency declines as the release matures, unless someone finds something that's a show-stopper.

RE: Saxon-EE 9.7.0.20: seeing error message XQDY0025 - Added by Charles Sun over 6 years ago

That is good to know, thanks Michael. We'll be on the lookout for the new 9.7 patch then.

    (1-9/9)

    Please register to reply