Currently I have following XML:
<Rowsets>
<Rowset>
<Row>
<DrilldownDepth>0</DrilldownDepth>
<ScheduleWeek>---</ScheduleWeek>
<ABC>---</ABC>
<PQR>1500</PQR>
<XYZ>15000</XYZ>
<Quant>285</Quant>
</Row>
<Row>
<DrilldownDepth>1</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>---</ABC>
<PQR>1500</PQR>
<XYZ>15000</XYZ>
<Quant>285</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>SUPER</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>Duper</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>Fun</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>7</ScheduleWeek>
<ABC>SUPER</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>7</ScheduleWeek>
<ABC>Duper</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>8</ScheduleWeek>
<ABC>SUPER</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
</Rowset>
</Rowsets>
Now I need only those <Row> where <DrilldownDepth>2</DrilldownDepth> and <ScheduleWeek>12</ScheduleWeek>. I can achieve it using a repeater/loop but I need to achieve it using either Xpath or XSLT. So any help inthis matter will be appreciated.
Sots
The following XPath statement uses a predicate filter to select the Row elements that contain the child elements that meet the specified criteria:
Using variables for the values applied in XSLT: