Leslie MacNeill Posted July 6, 2006 Posted July 6, 2006 I posted 3 problems the day before yesterday. Yesterday, I posted an update with one problem solved and another larger in scope. Now, I'm posting another update and an urgent plea for help: 1) I found a way to resolve this issue. 2) Since my original post, problem #2 seemed to grow in scope. However, I've resolved the additional, seemingly related, issues. Now I'm back to my original unresolved issue below: I have an often-used xsl:choose command that compares a field with a text string that doesn't work and I can't see why. A similar comparison between a token and a text string works just fine as did the comparison between the field and the text string in CDML. ... Kit Kit Part Number 3) Do you know of a good documentation source that could help me answer questions such as this? I've gleaned what I can from the Custom Web Publishing Guide and online XSL and XPath tutorials. Please help!
Martin Brändle Posted July 6, 2006 Posted July 6, 2006 Just a comment: forums are not always urgent. 2) You don't need to nest your xsl:choose clause, you can write analogous to a case statement the xsl:when in a series, if there is only one alternative if the tests fail: Kit Kit Part Number or even: Kit Part Number 3) Consider buying the book by Michael Kay, XSLT : Programmer's Reference, 2nd ed., Wiley Publishing,2003. The XSLT bible. Read also http://www.filemaker.com/developers/resources/xml_xslt.html
Leslie MacNeill Posted July 7, 2006 Author Posted July 7, 2006 Thanks so much for getting back to me, Martin. Sorry for the "urgent" request. I'm under the gun to get this upgrade finished. I tried both of the modifications you suggested and I'm still getting the same result: there is no error message; it just always goes to the default choice, whether the test is met or not. Any other ideas? I'll check out the website you mentioned. Also, I appreciate seeing how the boolean "or" can used to simplify the statement. Thanks in advance for your help.
Leslie MacNeill Posted July 7, 2006 Author Posted July 7, 2006 The field combo_no contains part numbers for kits as well as for parts. Examples include AM151KIT, BM1766KT, and M55. Oh, my gosh! I just realized what it is. The test is case sensitive (CDML wasn't) and I tend to prefer doing most of my coding in lower case... I just tried changing the test string from 'kit'/'kt' to 'KIT'/'KT' and it worked! Your question provoked me to think it through. Thank you!
Martin Brändle Posted July 7, 2006 Posted July 7, 2006 You can also use translate(), e.g. for upper- to lowercase conversion.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now