Subject: Re: [xsl] Re: xhtml via xslt failure From: e-letter <inpost@xxxxxxxxx> Date: Tue, 17 Dec 2013 22:30:23 +0000 |
> Learner: the tests for preceding or following sibling 'author' > elements will only work within the context of children of 'book' > elements, such as the 'author' elements. Evaluated in the context of > the 'book', you never have 'author' element siblings at all (by > design), so these tests always return false. > The xml file is: <?xml version="1.0" encoding="utf-8"?> <!-- Edited by XMLSpyB., taken from http://www.w3schools.com--> <?xml-stylesheet type='text/xsl" href="xstylesheetexample.xslt" ?> <bookstore> ... <book category="WEB"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> Perhaps my description was erroneous, but my understanding of the structure of this xml file is that the element 'author' for "Per..." is an expression "following-sibling" for the preceding element 'author' for "James...". Is it wrong to conclude that the elements 'author' are classified as sibling elements for the book title "xquery kick start"? > > I hope that helps. > Thanks, application of the example produces: ... , James Linn and Vaidyanathan Nagarajan</p> ... The stage is see whether xslt offers css-type capability to apply formatting based upon certain conditions, in this case changing the block-level line breaks to in-line span-level formatting for >1 sibling elements. Excuse me for more reading!
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: xhtml via xslt failur, e-letter | Thread | Re: [xsl] Re: xhtml via xslt failur, e-letter |
Re: [xsl] Select All Except First a, Dimitre Novatchev | Date | Re: [xsl] Select All Except First a, Wendell Piez |
Month |