> Ok, I've made the decision to use XML as the format to > pass data between > objects in my application. This approach seems to have > lots of advantages > as opposed to using lists of parameters or structures. My > question now is > how and why use XSD's and XSL.
> 1. Is there a better list to post this to? > 2. XSD's don't seem to provide much benefit in a > stand-alone application besides helping create test > data via tools like xmlSpy. The Blogs onTap sample application uses a lot of XSL for "skinning" different blogs so you can change the layout and the look and feel of the blog (beyond what's available with CSS) by editing a reasonably simple XHTML packet with a handfull of custom XML tags for the blog. I don't generally use XML to pass data to and from internal components as it's extra overhead with no significant advantage as far as I'm concerned. There are exceptions -- I have a generic logging tool in the Members onTap plugin which also provides undo/redo functionality for applications, which uses XML to store request data (form/url variables). I use XML in that case to make the tool more extensible, so there's a minimum of code necessary to write the undo/redo components. I also use XML to store the data for the RuleManager components used by both the logging tools in Members onTap and in the blog - in which case the RuleManager component is a facade for managing those rules and all the XML is used internally by the RuleManager.cfc and a collection of RuleCriteria cfc's designed specifically for managing that packet. The packet is only exported from the component for storage -- all other use/implementation of the packet is internal. > I don't even see how in ColdFusion you can validate > an XML using an associated XSD. With CF7 it validates if you put the path to the XSD in a doctype before you parse it. > And it doesn't look like XSL documents are based off > of an XSD, so you still have to validate if field > lengths, etc using code. Am I missing something > here? XSL is validated against the XSD/DTD for XSL. (Offhand I don't know which they use -- I'm hoping they have an XSD, but then I don't know how they would get around the problem of having only any, choose and sequence as their options for the types of children for a node, since you XSL allows child nodes in any order afaik.) The document on either side of an XSL transformation (before or after being transformed) is validated separately against any applicable DTD/XSD for that document (which is where you'd get any string-length validation, etc). > 3. Lastly, since the XSL doesn't use data off of the XSD, > it appears to be just a different, not necessarily better, > mechanism for displaying data. Not just for display, but I believe that's mostly what it's used for. It's also used in some cases for converting one XML dialect to another dialect, for instance, if you had your own internal XML dialect for expressing the data in a calendar because it solves some problems for you, you could then use XSL to transform that calendar format for an export to a standard calendar dialect like iCal for instance (which I'm not certain actually is XML since I haven't looked into it, but that's what I'd heard). > I am not sure of the value for me to learn this at this > point in time and I see no value in converting screens > from CF/HTML to XSL/HTML. Again, am I missing something > here? What type of situations cry out for XSL vs. CF/HTML? Skinning. :) and RuleManagers... But yeah, if you don't have a specific reason for it you don't really need it... s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217609 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

