Determing the type of a variable..
All:
I've read through the forums. I've read through some different XSLT books. Either I'm not seeing what is right in front of me, or there is no way to do this...
How can I test a variable to determine if it is an RTF or node-set? I am writing some templates that others will import to use in their own stylesheets. So far so good, but I would like to be agnostic about what the user passes to my template... They could pass me one of several node-sets that contain the same kind of data (but structured differently), this is easy to accomodate... but where I'm getting stuck is.. what if they just pass me an RTF? I can't seem to test for this, no matter what I do the proc chokes with an invalid type error...
I would like to do something like if (type($variable) == rtf)) but clearly its not that easy.. and sadly we are stuck with xslt1.0 for at least another 18 months...
I did a search on fragment/rtf/result tree fragment and I didn't see any posts that directly addressed this question... so I'm hoping I am asking something obvious...
|