Subject: [xsl] selecting the nearest preceding sibling From: Mukul <mukulw3@xxxxxxxxx> Date: Tue, 13 May 2003 05:43:26 -0700 (PDT) |
Hello , My XML file is below XML file ------------ <rootelem> <tag> --- node 1 <a>1</a> <b>2</b> <c>3</c> <d>4</d> </tag> <tag> --- node 2 <b>5</b> <c>6</c> <d>7</d> </tag> <tag> --- node 3 <a>8</a> <b>9</b> <c>10</c> <d>11</d> </tag> <tag> --- node 4 <b>12</b> <c>13</c> <d>14</d> </tag> <tag> --- node 5 <b>15</b> <c>16</c> <d>17</d> </tag> </rootelem> ---------------------- I want to write **a XPATH expression which will select the nearest preceding sibling , which contains a particular element ( <a> in this example) ** . I do not want preceding sibling which do not contain the <a> tag (also the tag <a> should be nearest to the context node) for e.g. if the context node is node 5 , the XPATH expression which will select node 3(because it contains element <a>) or for e.g. if the context node is node 2 , the XPATH expression will select node 1(because it contains element <a>) I am trying with preceding-sibling::tag ?? Can somebody suggest a solution? Regards, Mukul __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] Should be simple?, Zink, Juergen | Thread | Re: [xsl] selecting the nearest pre, Nicolas Mazziotta |
[xsl] Dynamically changing and runn, Kathleen Kappers | Date | Re: [xsl] Obtain XSL content, Márcio Fernando Kell |
Month |