This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29709 - [XSLT30]Some xsl:merge examples use variables not defined in the samples, probably as earlier versions bound merge groups or keys to variables
Summary: [XSLT30]Some xsl:merge examples use variables not defined in the samples, pro...
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-27 17:22 UTC by Martin Honnen
Modified: 2016-10-06 18:42 UTC (History)
0 users

See Also:


Attachments

Description Martin Honnen 2016-06-27 17:22:02 UTC
Section https://www.w3.org/TR/xslt-30/#merge-examples has an example with code

  <record ID="{$merge-key}">

although that variable is not defined in the example. I suppose the example has not been (completely) corrected since earlier versions of the spec where merge groups and keys were accessible as variables.

In the current spec I think 

  <record ID="{$merge-key}">

should be

  <record ID="{current-merge-key()}">


And in https://www.w3.org/TR/xslt-30/#merge-action there is an example using an undefined variable 
  
  <xsl:copy-of select="$master"/>

which should be

  <xsl:copy-of select="current-merge-group('master')"/>

to use the proper way to access a merge group by name in line with the current spec.
Comment 1 Michael Kay 2016-06-30 20:59:46 UTC
Thanks for pointing these out (and you are quite correct about the history).

I have fixed them.