Hello All, We can make two types of xsl files in general . 1) Template based . 2) Non template Bases .or you can say simple. Can anyone one compare what is the difference between them . Regards . Awais Bajwa
Template base XSL use to create the rule of template that includes specify the template and apply the specified template. It may be used to transform an XML document to an another XML document(filtered). e.g, <xsl:template match="root"> <xsl:apply-templates select="path1"/> </xsl:template> <xsl:template match="path1"> <xsl:apply-templates/> </xsl:template> In simple XSL used to create XSL-enhanced HTML document. I guess even in this trnsformation you need to specfy at lease a single template to get the required note path.
Hi, awais The complexity of xsl depends on the structure of original xml document. Refer to Michael Kay's famous book _XSLT Programmer's Reference_ chapter9 "Stylesheet Design Patterns" to get some ideas of that.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep
Template based XSLT is usually used in a recursive way... along the lines of "whenever you find an element like this, do this with it", and then nested elements cause templates to be applied, etc... The simpler form you're referring to is often called "fill in the blanks" XSLT, which is very much like a form letter used with a mail merge. You create lots of fixed (static) content, then insert xsl: elements for stuff that varies. Here's an example of the latter, which writes a Java bean to represent state that's stored in an XML file:
Scott Bain<br />Senior Consultant<br />Net Objectives<br />425-591-5844<br /><a href="http://www.netobjectives.com" target="_blank" rel="nofollow">Net Objectives</a><br />----------------------------<br />* Sign up for our free newsletter by sending an e-mail to<br />firstname.lastname@example.org<br />* Learn about and join our design pattern community of practice by going to<br /><a href="http://www.netobjectives.com/dpexplained" target="_blank" rel="nofollow">www.netobjectives.com/dpexplained</a><br />* Alan Shalloway & Jim Trott's - Design Patterns Explained: A New Perspective on<br />Object-Oriented Design is now available<br />* Our new CDROM-based XML training is now available as well
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
SKIP - a book about connecting industrious people with elderly land owners