Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Re: XSLT Select?

Reply
Thread Tools

Re: XSLT Select?

 
 
TAN Kuan Hui
Guest
Posts: n/a
 
      07-10-2003
>
> and I pass x to a template, how can I send the first "a" to a
> template, but not recursively also send the second? I use
> apply-templates "a". Maybe I just need to apply-templates "x/a", but



Have you tried x/a[0] ?

> how do you do that if you are passing x, itself, to start off the
> template? the 'root' x node is not part of the nodeset, correct?


root x is not part of the nodeset but there is nothing stopping
you from accessing x from within x/a thru ..




 
Reply With Quote
 
 
 
 
Johannes Lebek
Guest
Posts: n/a
 
      07-11-2003

"TAN Kuan Hui" <> wrote in message
news:3f0df144$...
> >
> > and I pass x to a template, how can I send the first "a" to a
> > template, but not recursively also send the second? I use
> > apply-templates "a". Maybe I just need to apply-templates "x/a", but

>
>
> Have you tried x/a[0] ?


This won't work! In XSL arrays start at index '1'. Therefore, you must use:
<xsl:apply-templates select="a[1]"/>

>
> > how do you do that if you are passing x, itself, to start off the
> > template? the 'root' x node is not part of the nodeset, correct?

>
> root x is not part of the nodeset but there is nothing stopping
> you from accessing x from within x/a thru ..
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Including XSLT/XML document within a XSLT document dar_imiro@hotmail.com XML 4 12-13-2005 02:26 AM
Multiple XSLT Transforms using a Controller XSLT sneill@mxlogic.com XML 2 10-19-2005 11:00 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM
xslt alone or xslt/java for static site? ted XML 1 01-26-2004 10:41 AM
[XSLT]Passing values from Javascript to a XSLT variable Benjamin Hillsley XML 3 09-25-2003 04:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57