[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:if test = empty string, returns true
At 2012-05-13 23:17 +0200, Jorge wrote:
> And, you are looking for the adjacent node (which in your example is a text node), rather than the adjacent element (unless you are invoking saxon with the option to strip white-space text nodes from your input, in which case that is not true). I see now that saxon was doing it by default. When I add -strip:none to the invocation then your code fails. > BTW, I very rarely ever have to address text() nodes But the normalize-space() returns a string, so how you address the content is irrelevant. It isn't that you were addressing a text node that a text node was returned, it was that your function was returning a tree with a text node created from the string output from normalize-space(). Your code was expecting the string to be returned. It is very subtle and it comes up in class. As you can see there are still concepts of XSL that I am not quite grasping yet. If you have the time I have posted 5 free hours of my XSLT training video here: http://www.CraneSoftwrights.com/links/udemy.htm ... where you do not need to create a username in order to view free content ... just close the sign-up dialogue box. The free stuff is mostly introductory, so this particular issue is not covered, but you might find other tips. More than appreciated. I simply wanted to discourage answers that focused on issues that did not address my main question. Please excuse me for the prejudice. No apology necessary ... I'm just trying to keep things found in the archive from pointing readers the "wrong" way. Good luck in your project! . . . . . . . . . . Ken -- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm 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
|