XSLTGeneral questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .

basically if we see the element name in target format(UserCode) is nothing but the attr name in source format(UserCode). I don't want to hardcode and apply this logic in XSLT. how can this be done using xslt?

I think i have misled your answer because of my little experience with XSLT,not sure whether i can make use of this in my scenario.. I am trying to put my actual scenario. Actually i have source and target xsds and have to use xslt to convert from one xsd formatted XML to another xsd formatted XML.

So to do this i am creating the xstl like below. And in if scenario i dont want to hard code it to 'UserCode' or 'Password' and wants to use use any in built function, so that i will be able to extend my xsds in future without worrrying about xslt Xformation. Please let me know how can i get the UserCode element name in if condition below. I was unable to refer any target element in xslt if condition.

I am afraid I don't really understand what you write in your second post. You say you don't want to "hard code" UserCode or Password. The stylesheet I posted does not hard code them so why can't you use it?