[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: variable binding
Charles Knell, Thank you, that was very helpful. I thought it meant siblings of the element being processed. I figured out a workaround to do "leftmost daughter". It means the daughter which is a leaf (has no children) and whose parents are only first children of their parent. So in the example below the first word element "the" is the leftmost daughter of ng. Thanks a lot again. -Shipra > > <ng of='proteins' role='h'> > > <nx head='targeting' role='h'> > > <W index='92'>the</W> > > <W role='h' index='93'>targeting</W> > > </nx> > > <W index='94'>of</W> > > <nx head='proteins' role='k'> > > <W index='95'>the</W> > > <W index='96'>myosin</W> > > <W role='h' index='97'>proteins</W> > > </nx> > > </ng> > > I am confused by " ... I am trying to find the leftmost daughter of the element ng." XPath has no concept of left or right. It has three (if we ignore the attribute axis) broad categories of axes: sibling axis, ancestor axis and descendant axis. > > Are you saying that you want to find an element that is a child of <ng>? XPath has a "child axis" that is a kind of descendant axis that includes only those elements that are one level down from the parent element. > > Please try to re-state your requirement using XPath terminology, or tell us which specific element in you example fits your requirement so we can figure out the correct XPath expression to select it. > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|