Hi my XML document and XSLT are not working to produce good HTML... what is going on?
This is basically XML file and I have validated this with the XML Schema but
when I use XSLT file to convert it into HTML file it just generates Courses Catalogue heading
with one paragraph of whole bunch of text.
What kinds of problem Do I have here?
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Generate HTML output -->
<xsl:output method="html"/>
<!-- The root template is defined here -->
<xsl:template match="/">
<html>
<head>
<title>Courses Catalogue</title>
</head>
<body>
<h2>Courses catalogue</h2>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="course">
<p>
<xsl:apply-templates select="code" />
<xsl:apply-templates select="title" />
<xsl:apply-templates select="year" />
<xsl:apply-templates select="science" />
<xsl:apply-templates select="area" />
<xsl:apply-templates select="subject" />
<xsl:apply-templates select="updated" />
<xsl:apply-templates select="unit" />
<xsl:apply-templates select="description" />
<xsl:apply-templates select="outcomes" />
<xsl:apply-templates select="incompatibility" />
</p>
</xsl:template>
<xsl:template match="code">
Course Code: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="title">
Course Title: <span style="color:#000">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="year">
Student Year: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="science">
Science Group: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="area">
Area: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="subject">
Course Subject: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="updated">
Page was updated in: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="unit">
Unit: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="description">
Course Description: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="outcomes">
Course Outcomes: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
< xsl:template match="incompatibility">
Incompatible courses: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
</xsl:stylesheet>
AND MY XML FILE
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
href="courses.xsl"?>
<!--catalogue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="catalogue.xsd"-->
<catalogue xmlns="file://"
xmlns:xsi="http:/e"
xsi:schemaLocation="file://">
<course>
<code>COMP3410</code>
<title> Information Technology in Electronic Commerce </title>
<year>later year</year>
<science>C</science>
<area> Research School of Computer Science </area>
<subject> Computer Science </subject>
<updated>2012-03-13T13:12:00</updated>
<unit>6</unit>
Thanks
Your problem is that all of the elements are in the file://Volumes/u1234567/Assignment namespace, but in your XSLT your templates are matching on elements without a namespace.
If you look closely at the <catalogue> you will see a namespace declaration without a prefix. <catalogue xmlns="file://Volumes/u1234567/Assignment" All of the descendant elements inherit that namespace.
Define that namespace with a prefix in your XSLT and then change the places where you refer to those elements to use that namespace prefix:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="file://Volumes/u1234567/Assignment">
<!-- Generate HTML output -->
<xsl:output method="html"/>
<!-- The root template is defined here -->
<xsl:template match="/">
<html>
<head>
<title>Courses Catalogue</title>
</head>
<body>
<h2>Courses catalogue</h2>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="a:course">
<p>
<xsl:apply-templates select="a:code" />
<xsl:apply-templates select="a:title" />
<xsl:apply-templates select="a:year" />
<xsl:apply-templates select="a:science" />
<xsl:apply-templates select="a:area" />
<xsl:apply-templates select="a:subject" />
<xsl:apply-templates select="a:updated" />
<xsl:apply-templates select="a:unit" />
<xsl:apply-templates select="a:description" />
<xsl:apply-templates select="a:outcomes" />
<xsl:apply-templates select="a:incompatibility" />
</p>
</xsl:template>
<xsl:template match="a:code">
Course Code:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:title">
Course Title:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:year">
Student Year: <span style="color:#C66">
<xsl:value-of select="." /> </span>
<br />
</xsl:template>
<xsl:template match="a:science">
Science Group:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:area">
Area:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:subject">
Course Subject:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:updated">
Page was updated in:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:unit">
Unit:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:description">
Course Description:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:outcomes">
Course Outcomes:
<xsl:value-of select="." />
<br />
</xsl:template>
<xsl:template match="a:incompatibility">
Incompatible courses:
<xsl:value-of select="." />
<br />
</xsl:template>
</xsl:stylesheet>
Related
Here is the Sample XML which I am using
XML.xml
<root>
<main>
<docum year="2022" month="2022.01">1</docum>
<docum year="2021" month="2021.12">2</docum>
<docum year="2020" month="2020.11">3</docum>
<docum year="2020" month="2020.12">4</docum>
<docum year="2022" month="2022.12">5</docum>
</main>
</root>
Need a navigator HTML which is toc.htm and 1.htm, 2.htm, 3.htm
toc.htm
<div>
<div>2022_2022.01</div>
<div>2022_2022.12</div>
<div>2022_2020.11</div>
</div>
1.htm
<div>
<h1>2022</h1>
<h2>2022.01</h2>
1
</div>
<div>
<h1>2022</h1>
<h2>2022.12</h2>
5
</div>
2.htm
<div>
<h1>2021</h1>
<h2>2021.12</h2>
2
</div>
3.htm
<div>
<h1>2020</h1>
<h2>2020.11</h2>
3
</div>
<div>
<h1>2020</h1>
<h2>2020.11</h2>
4
</div>
this is my XSL which I am trying but not sure about how we get parent div attributes value in the apply template in the current group().
XSL.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:template match="root">
<xsl:apply-templates select="main" mode="toc" />
<xsl:apply-templates select="main" mode="chapter" />
</xsl:template>
<xsl:template match="root/main" mode="toc">
<xsl:result-document href="toc.htm" method="html">
<html>
<body>
<xsl:for-each select="docum">
<xsl:element name="div">
<xsl:attribute name="class"></xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="#year" />
</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="lower-case(concat('id_', generate-id(), '.htm'))" />
</xsl:attribute>
<xsl:value-of select="#year" /> _<xsl:value-of select="#month" />
</xsl:element>
</xsl:element>
</xsl:for-each>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template match="root/main" mode="chapter">
<xsl:for-each-group select="docum" group-by="#month">
<xsl:result-document href="{lower-case(concat('id_', generate-id()))}.htm" method="HTML">
<html>
<body>
<h1><xsl:value-of select="#year" /></h1>
<h2><xsl:value-of select="#month" /></h2>
<xsl:apply-templates select="current-group()" />
</body>
</html>
</xsl:result-document>
</xsl:for-each-group>
</xsl:template>
</xsl:stylesheet>
I think you want something along the following lines:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes">
<xsl:template match="root/main">
<xsl:result-document href="toc.html">
<html>
<head>
<title>TOC</title>
</head>
<body>
<xsl:for-each-group select="docum" group-by="#year">
<div id="g-{current-grouping-key()}">
{let $sorted-months := sort(current-group()/#month, (), function($m) { $m }) return $sorted-months[1] || ('-' || $sorted-months[last()])[$sorted-months[2]]}
</div>
<xsl:result-document href="year-{current-grouping-key()}.html">
<html>
<head>
<title>{current-grouping-key()}</title>
</head>
<body>
<xsl:apply-templates select="current-group()"/>
</body>
</html>
</xsl:result-document>
</xsl:for-each-group>
</body>
</html>
</xsl:result-document>
</xsl:template>
<xsl:template match="docum">
<div>
<h1>{#year}</h1>
<h2>{#month}</h2>
{.}
</div>
</xsl:template>
</xsl:stylesheet>
This creates toc.html and for each year a year-yyyy.html which I think then has the contents you want, i.e. each month belonging to that year.
I'm trying to transform the following XML..
<?xml version="1.0" encoding="utf-16"?><Member TextRank="unknown" FullName="My Name" ..etc.. />
Into something like the following,
<div class="member">
<span class="label">
Text Rank (note: i want to override the labels in the xslt)
</div>
<span class="value">
unknown
</span>
<span class="label">
Full Name
</div>
<span class="value">
My Name
</span>
..etc..
</div>
How if possible could I do this using xslt?
Here's a different approach, that does away for the need for the xsl:choose element. Instead, you could take advantage of the matching templates to have specific templates for the cases of attributes who names you want to override, and a generic template for other case.
To avoid repetition of code, you could also make the generic template a named template, with a parameter to override the name
<xsl:template match="#*" name="attribute">
<xsl:param name="label" select="local-name()" />
So, the default for most attributes would be to use the attribute name, but the specific template for #FullName could then call this with a different name.
<xsl:template match="#FullName">
<xsl:call-template name="attribute">
<xsl:with-param name="label" select="'Full Name'" />
</xsl:call-template>
</xsl:template>
Here is the full XSLT:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="*">
<div class="{local-name()}">
<div> Title: </div>
<xsl:apply-templates select="#*"/>
</div>
</xsl:template>
<xsl:template match="#FullName">
<xsl:call-template name="attribute">
<xsl:with-param name="label" select="'Full Name'" />
</xsl:call-template>
</xsl:template>
<xsl:template match="#*" name="attribute">
<xsl:param name="label" select="local-name()" />
<span class="label">
<xsl:value-of select="concat($label, ' : ')"/>
</span>
<span class="value">
<xsl:value-of select="."/>
</span>
<br/>
</xsl:template>
</xsl:stylesheet>
When applied to the following XML:
<Member TextRank="unknown" ID="12" FullName="My Name" Dob="01/01/1970" />
The following is output:
<div class="Member">
<div> Title: </div>
<span class="label">TextRank : </span>
<span class="value">unknown</span>
<br>
<span class="label">ID : </span>
<span class="value">12</span>
<br>
<span class="label">Full Name : </span>
<span class="value">My Name</span>
<br>
<span class="label">Dob : </span>
<span class="value">01/01/1970</span>
<br>
</div>
This is the solution I came up with.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output indent="yes" />
<xsl:template match="*">
<xsl:element name="div">
<xsl:attribute name="class">className</xsl:attribute>
<div>
Title:
</div>
<!-- UID, Name, DBO-->
<xsl:apply-templates select="#ID"/>
<xsl:apply-templates select="#FullName"/>
<xsl:apply-templates select="#Dob"/>
</xsl:element>
</xsl:template>
<xsl:template match="#*">
<xsl:element name="span">
<xsl:attribute name="class">label</xsl:attribute>
<xsl:choose>
<xsl:when test="name() = 'FullName'">
Full Name
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="name()"/>
</xsl:otherwise>
</xsl:choose>
:
</xsl:element>
<xsl:element name="span">
<xsl:attribute name="class">value</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
<br/>
</xsl:template>
</xsl:stylesheet>
I need to check if a param has got a value in it and if it has then do this line otherwise do this line.
I've got it working whereas I don't get errors but it's not taking the right branch
The branch that is wrong is in the volunteer_role template
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="volunteers-by-region" match="volunteer" use="region" />
<xsl:template name="hoo" match="/">
<html>
<head>
<title>Registered Volunteers</title>
<link rel="stylesheet" type="text/css" href="volunteer.css" />
</head>
<body>
<h1>Registered Volunteers</h1>
<h3>Ordered by the username ascending</h3>
<xsl:for-each select="folktask/member[user/account/userlevel='2']">
<xsl:for-each select="volunteer[count(. | key('volunteers-by-region', region)[1]) = 1]">
<xsl:sort select="region" />
<xsl:for-each select="key('volunteers-by-region', region)">
<xsl:sort select="folktask/member/user/personal/name" />
<div class="userdiv">
<xsl:call-template name="volunteer_volid">
<xsl:with-param name="volid" select="../volunteer/#id" />
</xsl:call-template>
<xsl:call-template name="volunteer_role">
<xsl:with-param name="volrole" select="../volunteer/roles" />
</xsl:call-template>
<xsl:call-template name="volunteer_region">
<xsl:with-param name="volloc" select="../volunteer/region" />
</xsl:call-template>
</div>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
<xsl:if test="position()=last()">
<div class="count">
<h2>Total number of volunteers: <xsl:value-of select="count(/folktask/member/user/account/userlevel[text()=2])" />
</h2>
</div>
</xsl:if>
</body>
</html>
</xsl:template>
<xsl:template name="volunteer_volid">
<xsl:param name="volid" select="'Not Available'" />
<div class="heading2 bold"><h2>VOLUNTEER ID: <xsl:value-of select="$volid" /></h2></div>
</xsl:template>
<xsl:template name="volunteer_role">
<xsl:param name="volrole" select="'Not Available'" />
<div class="small bold">ROLES:</div>
<div class="large">
<xsl:choose>
<xsl:when test="string-length($volrole)!=0">
<xsl:value-of select="$volrole" />
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<xsl:template name="volunteer_region">
<xsl:param name="volloc" select="'Not Available'" />
<div class="small bold">REGION:</div>
<div class="large"><xsl:value-of select="$volloc" /></div>
</xsl:template>
</xsl:stylesheet>
And the XML:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="volunteers.xsl"?>
<folktask xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="folktask.xsd">
<member>
<user id="1">
<personal>
<name>Abbie Hunt</name>
<sex>Female</sex>
<address1>108 Access Road</address1>
<address2></address2>
<city>Wells</city>
<county>Somerset</county>
<postcode>BA5 8GH</postcode>
<telephone>01528927616</telephone>
<mobile>07085252492</mobile>
<email>adrock#gmail.com</email>
</personal>
<account>
<username>AdRock</username>
<password>269eb625e2f0cf6fae9a29434c12a89f</password>
<userlevel>4</userlevel>
<signupdate>2010-03-26T09:23:50</signupdate>
</account>
</user>
<volunteer id="1">
<roles></roles>
<region>South West</region>
</volunteer>
</member>
<member>
<user id="2">
<personal>
<name>Aidan Harris</name>
<sex>Male</sex>
<address1>103 Aiken Street</address1>
<address2></address2>
<city>Chichester</city>
<county>Sussex</county>
<postcode>PO19 4DS</postcode>
<telephone>01905149894</telephone>
<mobile>07784467941</mobile>
<email>ambientexpert#yahoo.co.uk</email>
</personal>
<account>
<username>AmbientExpert</username>
<password>8e64214160e9dd14ae2a6d9f700004a6</password>
<userlevel>2</userlevel>
<signupdate>2010-03-26T09:23:50</signupdate>
</account>
</user>
<volunteer id="2">
<roles>Van Driver,gas Fitter</roles>
<region>South Central</region>
</volunteer>
</member>
</folktask>
The following should do the trick:
<xsl:template name="volunteer_volid">
<xsl:param name="volid" />
<xsl:choose>
<xsl:when test="string-length($volid) > 0">
<div class="heading2 bold"><h2>VOLUNTEER ID: <xsl:value-of select="$volid" /></h2></div>
</xsl:when>
<xsl:otherwise>
<!-- No volid -->
</xsl:otherwise>
</xsl:choose>
</xsl:template>
I've replaced the default value with an empty string so that not providing a parameter value is the same as providing the parameter value as "". If this isn't the desired behaviour then change the parameters select and modify the test expression accordingly, for example:
$volid != 'Not Available'
I have a set of items which I am grouping using the muenchian method using keys. This is working great, however when I try to do things with the first x number of items it is doing it on the x number of items in each group rather than across the whole set of results. How would I get the individual position of each item accross the whole collection?
<xsl:key name="pictures-by-productid" match="/dsQueryResponse/Rows/Row" use="#ProductId" />
<xsl:template match="/">
<div style="border:1px solid red; float:left;">
<xsl:apply-templates select="/" mode="sub">
</xsl:apply-templates>
</div>
</xsl:template>
and the second template
<xsl:template match="/" mode="sub"> <xsl:for-each select="/dsQueryResponse/Rows/Row[count(. | key('pictures-by-productid', #ProductId)[1]) = 1]">
<xsl:for-each select="key('pictures-by-productid', #ProductId)">
<xsl:sort select="#PictureType" />
<div style="float:left; margin:2px;">
<img src="{#ThumbNailUrl}" width="58" /> <br />
Download
<xsl:number value="position()" format="1. " />
<xsl:value-of select="." />
</div>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:key
name="pictures-by-productid"
match="/dsQueryResponse/Rows/Row"
use="#ProductId"
/>
<xsl:template match="/">
<div style="border:1px solid red; float:left;">
<!-- iterate the group, sorted by PictureType… -->
<xsl:for-each select="/dsQueryResponse/Rows/Row[
count(. | key('pictures-by-productid', #ProductId)[1]) = 1
]">
<xsl:sort select="#PictureType">
<!-- …and output only if among the fist 6 items -->
<xsl:if test="position() <= 6">
<xsl:apply-templates
mode="picture"
select="key('pictures-by-productid', #ProductId)"
/>
</xsl:if>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template match="/dsQueryResponse/Rows/Row" mode="picture">
<div style="float:left; margin:2px;">
<img src="{#ThumbNailUrl}" width="58" /> <br />
<xsl:text>Download </xsl:text>
<xsl:number value="position()" format="1. " />
<xsl:value-of select="." />
</div>
</xsl:template>
I have the following xsl template that I'm using to group my xsl. The problem I have is that I need to uppercase the #Title as currently my grouping is seeing upper and lowercase as seperate groups.
<xsl:key name="rows-by-title" match="Row" use="substring(#Title,1,1)" />
<xsl:template name="Meunchian" match="/dsQueryResponse/Rows">
<xsl:for-each select="Row[count(. | key('rows-by-title', substring(#Title,1,1))[1]) = 1]">
<xsl:sort select="substring(#Title,1,1)" />
<p></p><xsl:value-of select="substring(#Title,1,1)" /><br />
<xsl:for-each select="key('rows-by-title', substring(#Title,1,1))">
<xsl:value-of select="#Title" /><br/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
I tried to use call-template and set a variable but xsl does not seem to like this:
<xsl:key name="rows-by-title" match="Row" use="substring(#Title,1,1)" />
<xsl:template name="Meunchian" match="/dsQueryResponse/Rows">
<xsl:for-each select="Row[count(. | key('rows-by-title', substring(#Title,1,1))[1]) = 1]">
<xsl:variable name="myTitle">
<xsl:call-template name="to-upper">
<xsl:with-param name="text">
<xsl:value-of select="#Title"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<p></p><xsl:value-of select="$myTitle" /><br />
<xsl:for-each select="key('rows-by-title', substring(#Title,1,1))">
<xsl:value-of select="#Title" /><br/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
What I am trying to achieve is meunchian grouping but without case sensitivity - hope this makes Sense!
Kieran
The way to convert lower-case letters to upper is to use the XPath translate() function.
Using it, one way to express the desired transformation is the following:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:variable name="vLower" select=
"'abcdefghijklmnopqrstuvwxyz'"
/>
<xsl:variable name="vUpper" select=
"'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"
/>
<xsl:key name="rows-by-title" match="Row" use=
"translate(substring(#Title,1,1),
'abcdefghijklmnopqrstuvwxyz',
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
)" />
<xsl:template match="/">
<html>
<xsl:apply-templates select="*/*"/>
</html>
</xsl:template>
<xsl:template name="Meunchian" match="/dsQueryResponse/Rows">
<xsl:for-each select=
"Row[generate-id()
=
generate-id(key('rows-by-title',
translate(substring(#Title,1,1),
$vLower,
$vUpper)
)[1]
)
]">
<xsl:sort select="translate(substring(#Title,1,1),
$vLower,
$vUpper)" />
<p></p>
<xsl:value-of select="translate(substring(#Title,1,1),
$vLower,
$vUpper)" />
<br />
<xsl:for-each select=
"key('rows-by-title',
translate(substring(#Title,1,1),
$vLower,
$vUpper)">
<xsl:value-of select="#Title" />
<br/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
When applied on the following XML document:
<dsQueryResponse>
<Rows>
<Row Title="Agenda" />
<Row Title="Policy" />
<Row Title="policy" />
<Row Title="Report" />
<Row Title="report" />
<Row Title="Test2" />
<Row Title="test1" />
<Row Title="Boo" />
<Row Title="foo" />
</Rows>
</dsQueryResponse>
it produces the desired result:
<html>
<p/>A
<br/>Agenda
<br/>
<p/>B
<br/>Boo
<br/>
<p/>F
<br/>foo
<br/>
<p/>P
<br/>Policy
<br/>policy
<br/>
<p/>R
<br/>Report
<br/>report
<br/>
<p/>T
<br/>Test2
<br/>test1
<br/>
</html>
In XPath 2.0 one will use the upper-case() function to convert lower case to upper case.
Also, grouping in XSLT 2.0 can be better expressed using the <xsl:for-each-group>
instruction.