RE: XML, XSD, XSL
I love it when that happens. :) > Thanks. And the most beautiful thing about this is that > this is it looks > like I am already doing the basic version of this. > Andy > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > Sent: Monday, September 12, 2005 9:31 AM > To: CF-Talk > Subject: RE: XML, XSD, XSL > MVC = Model-View-Controller > It's the most popular way of thinking about software > design for > maximum code-reuse. > Wikipedia actually isn't a bad place to start for this: > http://en.wikipedia.org/wiki/MVC >> MVC? And can you point me to some starter locations? >> -Original Message- >> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] >> Heh... sorry. :) You sound pretty sharp from this end. >> Give it some >> time, read some articles on general MVC, you'll figure it >> out. :) >>> Sir, >>> You are WAY over my head. Try to keep to 3 letter words >>> and 4 word paragraphs, please! 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 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217940 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: XML, XSD, XSL
Thanks. And the most beautiful thing about this is that this is it looks like I am already doing the basic version of this. Andy -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Monday, September 12, 2005 9:31 AM To: CF-Talk Subject: RE: XML, XSD, XSL MVC = Model-View-Controller It's the most popular way of thinking about software design for maximum code-reuse. Wikipedia actually isn't a bad place to start for this: http://en.wikipedia.org/wiki/MVC > MVC? And can you point me to some starter locations? > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > Heh... sorry. :) You sound pretty sharp from this end. > Give it some > time, read some articles on general MVC, you'll figure it > out. :) >> Sir, >> You are WAY over my head. Try to keep to 3 letter words >> and 4 word paragraphs, please! > ~~ > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217931 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
RE: XML, XSD, XSL
MVC = Model-View-Controller It's the most popular way of thinking about software design for maximum code-reuse. Wikipedia actually isn't a bad place to start for this: http://en.wikipedia.org/wiki/MVC > MVC? And can you point me to some starter locations? > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > Heh... sorry. :) You sound pretty sharp from this end. > Give it some > time, read some articles on general MVC, you'll figure it > out. :) >> Sir, >> You are WAY over my head. Try to keep to 3 letter words >> and 4 word paragraphs, please! > ~~ > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217930 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: XML, XSD, XSL
MVC? And can you point me to some starter locations? -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Heh... sorry. :) You sound pretty sharp from this end. Give it some time, read some articles on general MVC, you'll figure it out. :) > Sir, > You are WAY over my head. Try to keep to 3 letter words > and 4 word paragraphs, please! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217925 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
RE: XML, XSD, XSL
Heh... sorry. :) You sound pretty sharp from this end. Give it some time, read some articles on general MVC, you'll figure it out. :) > Sir, > You are WAY over my head. Try to keep to 3 letter words > and 4 word paragraphs, please! > -Original Message- > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] >> First, I think that your apps are way more sophisticated >> then mine. All I have is a very basic controller (I am >> using Application.cfc in this role), > Mmmm... I'm thinking that might be a misinterpretation of > what's > generally meant by "controller" when people talk about > MVC... I've > always heard it described as a "traffic cop" which manages > the > relationship between the domain model and the view. You > certainly > could use the Application.cfc to instantiate your > listeners and pass > data from the form/url to them, in which case it would be > a > controller, but I'd be surprised if that's the case (and > it's not how > I would write it). All of this just sort of FYI mind you. 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:217909 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: XML, XSD, XSL
Sir, You are WAY over my head. Try to keep to 3 letter words and 4 word paragraphs, please! -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > First, I think that your apps are way more sophisticated > then mine. All I have is a very basic controller (I am > using Application.cfc in this role), Mmmm... I'm thinking that might be a misinterpretation of what's generally meant by "controller" when people talk about MVC... I've always heard it described as a "traffic cop" which manages the relationship between the domain model and the view. You certainly could use the Application.cfc to instantiate your listeners and pass data from the form/url to them, in which case it would be a controller, but I'd be surprised if that's the case (and it's not how I would write it). All of this just sort of FYI mind you. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217902 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
RE: XML, XSD, XSL
> First, I think that your apps are way more sophisticated > then mine. All I have is a very basic controller (I am > using Application.cfc in this role), Mmmm... I'm thinking that might be a misinterpretation of what's generally meant by "controller" when people talk about MVC... I've always heard it described as a "traffic cop" which manages the relationship between the domain model and the view. You certainly could use the Application.cfc to instantiate your listeners and pass data from the form/url to them, in which case it would be a controller, but I'd be surprised if that's the case (and it's not how I would write it). All of this just sort of FYI mind you. > a presentation layer and BusinessObjects (basic cfc's > like Invoice, Order, Customer, Address, Person). I don't > have a factory (although I could since I don't know what > the heck it is). > So my use of xml in my app is passing between > Presentation Layer and 1 business object, sometimes > a couple objects. Okay, this is more clear and makes more sense to me now. :) I guess I have a tendency to forget that most CF apps really aren't very large or complicated (sophistication and complexity don't necessarily go hand in hand). :) > Once in an object, I sometimes pass a node of XML to > another function, but sometimes just 1 or two values > directly. My RuleManagers do this internally... From the view, only the RuleManager is ever referenced directly -- you create a RuleManager and then you can optionally choose to load/unload a context and a set of criteria types (by name/classpath) although by default the criteria types can interrogate the context to determine their own applicability. From there on you use the UI to allow users to manage their rules and you call RuleManager.ruleApplies() to determine the applicability of an individual rules, but you never reference the criteria objects directly. Within the RuleManager, the criteria type CFC's (which share a common interface) will send and receive XML nodes (as a node or as text) to perform the tasks of making changes to the rule-set and testing the applicability of individual criteria (within each rule). The only time XML is passed in or out of the RuleManager is when you instantiate it (and load up a rule-set) or when you pull the text of the XML to save it to file or database. I realise this seems like an advert :) just trying to give some context for comparison really. >> 2. I can easily maintain before and after pictures >> of an object at the client and do not have to create >> session variables to do so. > Why would you want them at the client? > Is that really a big issue for online shoppers? I figured > if they > didn't complete the checkout they probably weren't that > interested in > the first place. > AO: First, I am mostly a B-B site, albeit very small B to > very small B. > And failed completion is not always related to > abandonment. I've been > interrupted while placing an order and by the time I got > back, I've timed > out. So I need some mechanism for maintaining state. I > like to let buyers > know when they've made a change, so I need both current > and past. This also > gives me an unwind feature, even after committing the > transaction. Okay that makes more sense... I was thinking about retail transactions where the person's casually considering a t-shirt or somesuch. And the "unwind" is also something I build into the Members onTap plugin, and also used XML as part of that undo/redo process, although in that case the choice of XML was intended to allow many different, as yet unknown plugins take advantage of that system, without knowing what data they might want to store. >> 3. Now that I've found out that I can validate >> against the schema, I don't have to maintain basic >> validation rules at both the UI and >> Business Object level. > Even without that, I'd probably still only validate > at the UI. > AO: How does the UI know what to validate? > Do you add Metadata to all of your attributes that > has size and type features? In which case, you are > created a schema, you've just rolled your own. Well I have the ability to do it that way just by adding special attributes to my forms, and yes that is a sort of schema... but primarily I just pull metadata from the database and tell the form which table a particular form is designed to manage... In the next day or so this url ought to work: http://www.fusiontap.com/?netaction=articles/powerontap That will be the new home of the Power onTap Captivate presentation... I mention it only because the latter half of the presentation demonstrates the tools used to generate that form validation. Oddly enough, they do actually use xml to accomplish their task: That's the short-short version (just the number of fields -- those are actually complete input elements and that's a complete form), but the tap:dbtable attribute at the top
RE: XML, XSD, XSL
First, I think that your apps are way more sophisticated then mine. All I have is a very basic controller (I am using Application.cfc in this role), a presentation layer and BusinessObjects (basic cfc's like Invoice, Order, Customer, Address, Person). I don't have a factory (although I could since I don't know what the heck it is). So my use of xml in my app is passing between Presentation Layer and 1 business object, sometimes a couple objects. Once in an object, I sometimes pass a node of XML to another function, but sometimes just 1 or two values directly. Rest of comments below... -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] > 1. Data for a particular object is "bundled" nicely > together in a way that is very readable I just thought I'd point out that the syntax can often (although not always) be identical (re: very readable). AO: Yup. > 2. I can easily maintain before and after pictures > of an object at the client and do not have to create > session variables to do so. Why would you want them at the client? Is that really a big issue for online shoppers? I figured if they didn't complete the checkout they probably weren't that interested in the first place. AO: First, I am mostly a B-B site, albeit very small B to very small B. And failed completion is not always related to abandonment. I've been interrupted while placing an order and by the time I got back, I've timed out. So I need some mechanism for maintaining state. I like to let buyers know when they've made a change, so I need both current and past. This also gives me an unwind feature, even after committing the transaction. > 3. Now that I've found out that I can validate > against the schema, I don't have to maintain basic > validation rules at both the UI and > Business Object level. Even without that, I'd probably still only validate at the UI. AO: How does the UI know what to validate? Do you add Metadata to all of your attributes that has size and type features? In which case, you are created a schema, you've just rolled your own. > 6. I am starting to like the way using xmlSpy > to create schemas and xml helps me think through > how I am organizing, validating and representing > objects I just write the xml out by hand... Not that xmlSpy is bad, but it's not a big seller for me -- I find the interface actually gets in the way more than it's an aid. AO: I am new, so I may stop using xmlSpy for this real soon! ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217760 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: XML, XSD, XSL
> I just don't see how using XML internally in an app is > extra work compared > to using individual attributes or another structure > format. And I don't > understand where there is any appreciable overhead. Of > course, my ignorance > could very well be bliss! > Advantages that I see: > 1. Data for a particular object is "bundled" nicely > together in a way that is very readable brief note: the following is not xml ... it's CF custom tags x y z ...x content... ...y content... ...z content... True you can't perform an XML transformation on tags in-line in a cf template, but you can't put statements directly in an XML template either (which is easier to code than an xml transromation), and you could parse these tags and perform a transformation on them or otherwise output this "xml" to a cf template to be executed. There are pros and cons to either, I just thought I'd point out that the syntax can often (although not always) be identical (re: very readable). > 2. I can easily maintain before and after pictures > of an object at the client and do not have to create > session variables to do so. Why would you want them at the client? > This way I can also maintain cart info across expired > sessions without loading the client up with cookies > or saving User data Is that really a big issue for online shoppers? I figured if they didn't complete the checkout they probably weren't that interested in the first place. > 3. Now that I've found out that I can validate > against the schema, I don't have to maintain basic > validation rules at both the UI and > Business Object level. Umm... neither do I ... I validate at the UI. Which is mostly automated from my db meta-data, so I rarely futz with form validation... I mean... I can, but I rarely need to. Even without that, I'd probably still only validate at the UI. > Question that I am working through is how > to translate xmlValidate error responses to user > friendly messages at the UI layer I'd expect that to be tough. > 4. I can create an object once and easily include > in other objects(e.g. Address in an Invoice). > Of course I could also do this using includes... I get the same thing from structures and arrays. > 5. I can create XML test files and quickly and > easily run regression test on all code Mmmm... okay... I never found that particularly time consuming... > 6. I am starting to like the way using xmlSpy > to create schemas and xml helps me think through > how I am organizing, validating and representing > objects I just write the xml out by hand... Not that xmlSpy is bad, but it's not a big seller for me -- I find the interface actually gets in the way more than it's an aid. I use a fair amount of XML in my apps recently actually, but I don't generally pass it around between components... I have a RuleManager facade which provides an interface for end-users to manage their business logic, which internally manages an xml packet and then store that xml packet somewhere... Maybe I'm just imagining from your description that you're using it in a really different way than I am when you're really not... For some reason I'd just envisioned tons of XML passing back and forth between marginally related components, as opposed to say a facade which manages its internal data as an XML packet for the sake of extensibility. 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 ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217752 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
RE: XML, XSD, XSL
I just don't see how using XML internally in an app is extra work compared to using individual attributes or another structure format. And I don't understand where there is any appreciable overhead. Of course, my ignorance could very well be bliss! Advantages that I see: 1. Data for a particular object is "bundled" nicely together in a way that is very readable 2. I can easily maintain before and after pictures of an object at the client and do not have to create session variables to do so. This way I can also maintain cart info across expired sessions without loading the client up with cookies or saving User data 3. Now that I've found out that I can validate against the schema, I don't have to maintain basic validation rules at both the UI and Business Object level. Question that I am working through is how to translate xmlValidate error responses to user friendly messages at the UI layer 4. I can create an object once and easily include in other objects(e.g. Address in an Invoice). Of course I could also do this using includes... 5. I can create XML test files and quickly and easily run regression test on all code 6. I am starting to like the way using xmlSpy to create schemas and xml helps me think through how I am organizing, validating and representing objects Andy -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] > 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. What exactly are these advantages? ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217740 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: XML, XSD, XSL
> > 2.XSD's don't seem to provide much benefit in a stand-alone > > application besides helping create test data via tools like xmlSpy. I > > don't > > even see how in ColdFusion you can validate an XML using an associated > > XSD. > > 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? > > Nope... XSDs are far from a panacea... they check structure and dialect. > Dat's it. > > CF 7 can validate an XSD and previous versions can do with outside help (COM > or Java). This is incorrect. you can validate a number of things with a proper XSD. Beyond the actual document struction validation XSD supports many native data types. You can define your own and use them within your document. You can validate on ranges and numeric values. It supports enumerations, and most importantly you can validate on REGEX patterns. Check out w3schools for a good intro on creating XSD files. (then as has been said use xml validate) But just to warn you, the results aren't always pretty :) Also FYI coldfusion use XERCES from xml.apache.org for the validation. Anthony ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217630 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
Re: XML, XSD, XSL
> You can find plenty of discussions on this topic over the web (especially on > mailing list). Like this one: > http://www.biglist.com/lists/xsl-list/archives/22/msg00087.html The main point is here: http://www.biglist.com/lists/xsl-list/archives/22/msg00098.html http://www.biglist.com/lists/xsl-list/archives/22/msg00104.html Massimo Foti Tools for ColdFusion and Dreamweaver developers: http://www.massimocorner.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217622 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
Re: XML, XSD, XSL
> > but since inside a XSLT template you can mix > > them with any, arbitrary, well-formed > > XML code, you can't validate it. > > That's untrue. Typically the XSL tags in an XSL document are prefixed > with the XSL namespace (which is one of the few namespaces which has a > default uri) -- that being the case, is validated > against the schema for the the xsl namespace, whereas other tags in > the document may be unvalidated or validated against any other schema > or DTD based on their respective namespace URI's. The XSLT 1.0 specs don't include a XSD, only a DTD: http://www.w3.org/TR/xslt#dtd You can find plenty of discussions on this topic over the web (especially on mailing list). Like this one: http://www.biglist.com/lists/xsl-list/archives/22/msg00087.html Massimo Foti Tools for ColdFusion and Dreamweaver developers: http://www.massimocorner.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217621 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: XML, XSD, XSL
> but since inside a XSLT template you can mix > them with any, arbitrary, well-formed > XML code, you can't validate it. That's untrue. Typically the XSL tags in an XSL document are prefixed with the XSL namespace (which is one of the few namespaces which has a default uri) -- that being the case, is validated against the schema for the the xsl namespace, whereas other tags in the document may be unvalidated or validated against any other schema or DTD based on their respective namespace URI's. In all likelyhood the schema for XSL uses a lot of "any-tag" references, although I have seen the XSLT engine provided with CF6/7 spit back the error "xsl:template is not allowed at this position in the document" or the like, and offhand I'm not certain how they would make that work with XSD if the containing tag has "any-tag" declared for its children. Of course, the attributes would be validated against the URI for each tag without any problems. Hence you get errors that say "namespace 'blah' is uneclared" or somesuch if you omit an alternate namespace from an XSL sheet that contains tags using that namespace and then try to perform a transformation. It seems strange to me that a doctype would not allow specification of an XSD instead of a DTD -- I don't understand why that would be the case, it doesn't make any sense to me... Though iirc I think CF7 also automatically validates against namespace URI's if they resolve to valid DTD's/XSD's now that think about 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 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217616 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: XML, XSD, XSL
> > With CF7 it validates if you put the path to the XSD > > in a doctype before you parse it. > > I don't think you can specify an XML Schema within a DOCTYPE declaration - > those only allow DTDs. Correct > > 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.) > > XSL is validated against the XSL Schema. There is no schema or DTD for XSLT, there can't be any. A XSLT template can't be validated. XSLT allows a finite set of tags and attributes, but since inside a XSLT template you can mix them with any, arbitrary, well-formed XML code, you can't validate it. You can find a few DTD or XSD for XSLT, but their main practical purpose is to "suggest" XSLT syntax to XML authoring tools. Massimo Foti Tools for ColdFusion and Dreamweaver developers: http://www.massimocorner.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217611 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: XML, XSD, XSL
> With CF7 it validates if you put the path to the XSD > in a doctype before you parse it. I don't think you can specify an XML Schema within a DOCTYPE declaration - those only allow DTDs. > 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.) XSL is validated against the XSL Schema. > 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). iCalendar isn't XML. It's plaintext, though, and you can use hCalendar to represent iCalendar documents as XHTML: http://developers.technorati.com/wiki/hCalendar Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217610 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: XML, XSD, XSL
> 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
RE: XML, XSD, XSL
> -Original Message- > From: Andy [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 07, 2005 11:57 PM > To: CF-Talk > Subject: XML, XSD, XSL > > 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. Within an application? This sounds odd... why not just pass objects? In my option XML is really only a good option where you're forced into a text-only mechanism (like HTTP). Other than that keeping things native is nearly always the way to go. > 1.Is there a better list to post this to? Probably. ;^) > 2.XSD's don't seem to provide much benefit in a stand-alone > application besides helping create test data via tools like xmlSpy. I > don't > even see how in ColdFusion you can validate an XML using an associated > XSD. > 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? Nope... XSDs are far from a panacea... they check structure and dialect. Dat's it. CF 7 can validate an XSD and previous versions can do with outside help (COM or Java). > 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. Well - for formatting and displaying data. That's it, nothing more. > 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? The interesting promise of XSL is to send plain XML data to the browser and have the XSL applied there - you send plain data and you get pretty pages.: a complete separation of data and presentation. The plain data is SO VERY MUCH easier for automated systems to deal with (the promise of the semantic web) and the pretty pages are only of use to humans so why not have them generated in the browser? Of course it hasn't really worked out that way (yet?) Personally I don't see much value for XSL on the server-side for the exact reasons already mentioned: 1) Why pass XML within an application in the first place? And 2) why not just format it in the old fashioned way? Jim Davis ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217604 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
RE: XML, XSD, XSL
> 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. What exactly are these advantages? I can't see any advantages for using XML to transport data within an application. If you want to transport data from one application to another, then XML provides advantages, but otherwise you're making more work for yourself. > 2.XSD's don't seem to provide much benefit in a stand-alone > application besides helping create test data via tools like > xmlSpy. I agree; if you're not passing data around between applications, you probably don't need DTDs or schemas. Of course, I don't think XML is especially useful at all in those cases either, as I mentioned above. > I don't even see how in ColdFusion you can validate an XML > using an associated XSD. CFMX 7 provides the XmlValidate function for this. > 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? I'm not sure what you're trying to accomplish, exactly. XSL documents follow the XSL schema - that defines all the different elements and attributes you can use within an XSL stylesheet. By itself, this won't help you with data validation, but then again that's not what XSL is for - it's for formatting and transforming XML documents. > 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. 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? If you already have a bunch of XML documents, it may be easier (and will almost certainly be more efficient) to write XSL stylesheets and transformations than to write CFML programs to read one XML language, then write something else. But if your data isn't already in XML, it's usually kind of silly to generate XML then use XSL to transform it to something else when you could just write what you want in the first place with CF. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217601 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