473,387 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

multiple filtering

sp
<files>
<file id="1" type="txt">
<indicies index="A">
<keyword>key1</keyword>
</indices>
<indicies index="B">
<keyword>key2</keyword>
</indices>
<indicies index="A">
<keyword>key3</keyword>
</indices>
</file>
<file id="2"type="doc">

<indicies index="A">
<keyword>key1</keyword>
</indices>
<indicies index="C">
<keyword>key3</keyword>
</indices>

<indicies index="B">
<keyword>key4</keyword>
</indices>
</file>
<file id="3"type="txt">
<indicies index="E">
<keyword>key5</keyword>
</indices>
<indicies index="F">
<keyword>key2</keyword>
</indices>
<indicies index="A">
<keyword>key6</keyword>
</indices>
<indicies index="H">
<keyword>key7</keyword>
</indices>
</file>
</files>
i need the output of those files whose type="txt" and index="A"

the XSL i used

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:template match="/>
<xsl:for-each select="/files/file[@type='txt']">
<xsl:apply-templates select="/indices[@index='A']" />
</xsl:for-each>
</xsl:template>
<xsl:template match="/indicies[@index='A']" />
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>

and i am not getting the output i expected can anyone help me out in
solving this issue

praveen

Jan 30 '06 #1
1 1188
sp wrote:
<xsl:apply-templates select="/indices[@index='A']" />
...

<xsl:template match="/indicies[@index='A']" />

Ged rid of 'em leading slashes. The selection expression with the slash
selects nodes that are document elements (aka root element of the
document) and are named indices (and have an attribute named index with
the value 'A'). The match pattern also only matches such nodes.

Soren
Jan 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: arthur-e | last post by:
I can filter a query for a report on a field of a subform BUT now.... I'd like to be able to select more than one item in a multi-list box to select all the records. ALSO to use two fields (or...
4
by: Doug | last post by:
I have your typically form/subform. You enter the account number in a textbox and select whether you want to see the detail or summary information on the main form. Both fields I want to filter...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
23
blyxx86
by: blyxx86 | last post by:
I am trying to filter multiple entries with only one search box. That way the user can type whatever they want and find all the values that contain what they enter. Private Sub...
12
daniel aristidou
by: daniel aristidou | last post by:
hi i was wondering if it is possible to filter multiple numbers of tables at the same time. the filter would be automatically applied ie. as in a query. However i want only one list to appear...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.