|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Which commands to use: xsl:if, xsl:when, xsl:choo
At 2004-01-27 10:31 -0800, Bill Walker wrote:
I have learned just enough XML and XSLT to think I understand what I am doing. Congratulations! However, when I am faced with something that takes more logic and real understanding of such things as: They are useful *within* a template ... sounds like you just need different sets of templates. I COULD just go on and create an XML and an XSL file for each page? Not sure why this (a single XSLT file) is important to you ... is it a maintenance problem? Throwing the logic for documents conforming to multiple DTDs into a single stylesheet has its own maintenance challenges. On brief review your vocabularies look mutually exclusive ... a single XSL stylesheet can support documents from multiple DTDs just by having the respective templates all in one stylesheet. When you have a vocabulary conflict you have to get into using modes, which starts with some of the challenges. But if you write a push-oriented stylesheet then you can accommodate different document models with a single XSLT file. But I'm not really sure why you want one stylesheet for everything. If you do have common templates, stylesheet modularization can done with <xsl:include/>. The idea is that no matter whether I was generating an opening Subject screen or a page further in, all the info. I need should be in this XML file. Why not modularize the common data, maintain it in a single location, and use the document() function to pull into your transform? That will improve your maintenance of your data without having copies of information in each XML file. I have tried many ways, but it is clear that I still don?t truly understand which commands are appropriate and how to incorporate them into the XSL? Separate <xsl:template> instructions sit there waiting to be fired by the <xsl:apply-templates/> that pushes nodes to the stylesheet. Since you have element types from different DTDs, you can just let the ones that do not apply sit there and never fire, and the ones that do apply actually get used. I hope this helps. ................... Ken Reference Dept. Stockton-San Joaquin County Public Library p.s. we are delivering XSL training in the San Francisco area the week of March 22 ... check out our home page for venue, pricing and registration details ... perhaps we can help you and your colleagues.
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc 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
|

Cart








