Re: Looking Not Working for No Obvious Reason
I must be doing something wrong but I can't figure out what it might be--the fact that some input values work and others don't is odd.
Input data is:
<title>Overview and Background</title>
The corresponding mapping entry is:
<item> <shorttitle>Background</shorttitle> <longtitle>Overview and Background</longtitle> </item>
The real mapping is small enough I could rewrite the code to use choose/when for the mappings but this seemed like the most efficient way to do a two-way mapping in XSLT.
Makes sense. I'll try that and see if the problem goes away.
those two bits aren't needed (but perhaps documenting them is good form) as the default behaviour is to implictly make a document node (for xslt 1 compat, mainly) or maybe that's the cause of your lookup failures, perhaps sometimes you have got duplicated short titles?
Since I define the mapping, each value occurs exactly once. My failure condition is that my count check returns zero when it should return 1 (as opposed to returning 2 when it should return 1).
-- W. Eliot Kimber Professional Services Innodata Isogen 8500 N. Mopac, Suite 402 Austin, TX 78759 (214) 954-5198
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