[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath which tests that an element does not have mi
I messed up by not correctly addressing the Person element ... this
would be more precise:
not(normalize-space( string-join( (author,author/Person)/text() ),''))) Avoiding the use of string-join() you could individually test each text() node: not( (author,author/Person)/text()/boolean(normalize-space()) = true() ) ... but I'm not convinced someone maintaining the stylesheet would see the effect any quicker with the above expression than the one I proposed earlier. I hope this also helps. . . . . . . . . Ken At 2011-11-03 14:50 -0400, I wrote: At 2011-11-03 18:44 +0000, Costello, Roger L. wrote:Would you please recommend an XPath expression which ensures that the content of <author> is optional whitespace, <Person>, optional whitespace, and nothing else: -- Contact us for world-wide XML consulting and instructor-led training Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
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
|