[Home] [By Thread] [By Date] [Recent Entries]
Shaikh, Parvez wrote:
The reason I did that change was when I change it to testnode instead of I was talking of a match="//bla" which is never needed (maybe you are thinking of select="//bla", which is sometimes needed, but likely a place for refactoring). If you change this: <xsl:template match="//bla"> to <xsl:template match="bla"> and your code stops working, you should consult your processor's helpdesk, as that is non-xslt behavior. Please note that I note that. Which is why I want you to reverse engineer: make a working example with one or both of our examples. Watch it working, learn how xslt does these things. That will bring you closer to how to get it into your big xslt stylesheet. It begins as well, this is usually a bad design decision as it gives you little flexibility as you by now have found out. It is usually better if you go from XML to a modified XML to use a modified identity template, there are plenty examples in the faq. Then, your code will become much cleaner with templates like this: <xsl:template match="erpayload"> <xsl:apply-templ.... <xsl:template match="purchasing"> <xsl:apply-templ.... etc. testnode is at erpayload/purchasing/testnodeWhy not? If you can't change it, you cannot remove any bugs or add any new features. Your starting point of your stylesheet is wrong (well, not wrong, but just very inflexible and not quite usable). Fix that and go from there. And I suggest a good text book, like Jeni Tenison's to help you going with XSLT. It will make life so much easier for you. -- Abel
|

Cart



