RE: object-oriented XSL
Robert, i think that you're absolutely right in that there's no clean divide between business logic and styling, and the example you bring up illustrates perfectly why XSLT needs to be able to do logic. the question of where to do the logic is sometimes not straightforward, and one that we keep coming up against where i work. i think one has to be pragmatic and see which solution is the most sensible - usually there's a 'right' way (such as determining links with XSLT) that stands out once you find it. often the problem is that someone like myself will think mainly in terms of procedural logic (being these days a mostly-Java developer), and might not see the obvious functional solution - or vice versa :) /m On Fri, 23 Aug 2002, Robert Koberg wrote: > I have a concern about mixing concerns :) > > Would you consider building relative paths for all links (nav, snailtrail, > pagers, content links, etc) in your output to be business logic. It does not > seem to be styling. > > If you maintain a site structure in an XML file you can build these relative > paths with XSLT. You do not need to hardcode specific links. You can reference > an internal link through an ID and travel up and down the XML site hierarchy to > determine the relative path to a file. I find this much easier to do at > transformation time in the XSL than anywhere else. I do not want to hardcode the > links relative path because they could change. But this is not styling, right? > So how would you do it? Note: I do not want to use root relative paths. > > I am seeing people with this mindset totally neglecting very powerful parts of > XSL. > > fwiw, > -Rob XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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