RE: XML format for menus
In CFML, XML can be leveraged as an array of structs... - Calvin -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 1:52 PM To: CF-Talk Subject: Re: XML format for menus curious...what's the advantage of using XML versus just storing an an array of structs? On 7/29/05, Barney Boisvert [EMAIL PROTECTED] wrote: I've used this format with great success: menu name=Main id=main permissions=... menuitem href=... permissions=...User List/menuitem menu name=Security permissions=... menuitem href=... permissions=...Add User/menuitem / menuitem href=... permissions=...User List/menuitem / /menu /menu cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: Does anyone have an XML format that they would share? I want to convert my hard-coded system and an easily maintainable XML file seems like a good approach. Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213375 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 format for menus
I find it easier to find the menu that contains the current URL with XPath rather than figuring it out in CSS. What's the idea putting the url in the CSS? My menus uses standard A href... only the formating is in CSS (See exampe here: http://www.fafo.on.ca/ it's in French, but anyway...) The advantage: just omit the css file, and you get a standard list as an acurate site Map See Recherche, Plan du site. It's exactly the same page, but the CSS and JS files for the menu are omited. Of course, it is also 100% search engine friendly. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213342 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 format for menus
You could do it with UL/LI elements and some messy JS (to parse the doc structure and create the menus), The trick is to write not messy JS ;-) but it'd be hellish to make that work in older browsers that support pure-JS If you mean NT 4 or IE4, who cares nowadays? For IE5+ or Mozilla, no problem. (i.e. the menu structure is defined in JS) menus without issue. No, only the menu animation is handled via JS, the structure is UL-LI. -HTML handles the structure, -CSS handle the look'n feel, -JS handles the animation, -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213343 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 format for menus
Likewise, I just parse the XML file and display its structure and I get a site map (i've done this too). When I talk about finding the URL with CSS, I mean that I have contextual menus where the second level is only expanded if the parent is the URL currently being viewed. It's really easy to find this with XPath - doing this with CSS and JS in a cross browser fashion that also works in NS4 and other garbage browsers isn't worth my time. On 7/31/05, Claude Schneegans [EMAIL PROTECTED] wrote: I find it easier to find the menu that contains the current URL with XPath rather than figuring it out in CSS. What's the idea putting the url in the CSS? My menus uses standard A href... only the formating is in CSS (See exampe here: http://www.fafo.on.ca/ it's in French, but anyway...) The advantage: just omit the css file, and you get a standard list as an acurate site Map See Recherche, Plan du site. It's exactly the same page, but the CSS and JS files for the menu are omited. Of course, it is also 100% search engine friendly. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213344 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 format for menus
If you mean NT 4 or IE4, who cares nowadays? Lucky for you, I guess. Those are both still target platforms for us, and we still see a decent number of traffic from them. The trick is to write not messy JS ;-) If you can show me how to take a bunch of markup and convert it into a JS menu that'll work on NS4+, IE4+, Gecko and Safari without it being messy, I'll be very impressed. To this point, I've utterly failed. No, only the menu animation is handled via JS, the structure is UL-LI. -HTML handles the structure, -CSS handle the look'n feel, -JS handles the animation, I absolutely agree this would be desirable, but it doesn't handle security properly (you don't want to do security client-side, so you need an abstract representation on teh server anyway), it doesn't support all platforms equally well (as I've said above), and it still doesn't facilitate every potential format, at least not efficiently. cheers, barneyb On 7/31/05, Claude Schneegans [EMAIL PROTECTED] wrote: You could do it with UL/LI elements and some messy JS (to parse the doc structure and create the menus), The trick is to write not messy JS ;-) but it'd be hellish to make that work in older browsers that support pure-JS If you mean NT 4 or IE4, who cares nowadays? For IE5+ or Mozilla, no problem. (i.e. the menu structure is defined in JS) menus without issue. No, only the menu animation is handled via JS, the structure is UL-LI. -HTML handles the structure, -CSS handle the look'n feel, -JS handles the animation, -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213348 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 format for menus
If you can show me how to take a bunch of markup and convert it into a JS menu that'll work on NS4+, IE4+, Gecko and Safari without it being messy, I'll be very impressed. To this point, I've utterly failed. I agree with you about IE4 and NS4, although I didn't even try to make it compatible with them. However, I suspect these are only used by a couple of extremists just to check if your site supports them and complain if it doesn't. And why NS4 and not NS3, 2, 1? After all, you don't support CP/M, do you? I absolutely agree this would be desirable, but it doesn't handle security properly (you don't want to do security client-side, so you need an abstract representation on teh server anyway) I do this with CF, intranet users never see options they are not allowed to, and even if they know the url and call it directly, they will be kicked off. CF is perfectly capable of handling this. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213349 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 format for menus
And why NS4 and not NS3, 2, 1? After all, you don't support CP/M, do you? Because still see a significant enough amount of traffic with NS4 to justify making our sites at least functional with the browser, even if they're not as attractive overall as with a newer one. Not the case for older versions. Hell, we just had one of our clients switch from NS4 to IE6 across their entire corporate network this year. Yes, they were using NS4 corporate-wide as recently as 4 months ago. It's definitely not dead. I absolutely agree this would be desirable, but it doesn't handle security properly (you don't want to do security client-side, so you need an abstract representation on teh server anyway) I do this with CF, intranet users never see options they are not allowed to, and even if they know the url and call it directly, they will be kicked off. CF is perfectly capable of handling this. So you render your HTML with everything, and then apply security considerations with Javascript? Not that it's not viable, but seems kind of silly. Why build all that machinery twice, since you have to have it on the CF side regardless? I suppose it doesn't really matter at all, each will do it his own way. cheers, barneyb On 7/31/05, Claude Schneegans [EMAIL PROTECTED] wrote: If you can show me how to take a bunch of markup and convert it into a JS menu that'll work on NS4+, IE4+, Gecko and Safari without it being messy, I'll be very impressed. To this point, I've utterly failed. I agree with you about IE4 and NS4, although I didn't even try to make it compatible with them. However, I suspect these are only used by a couple of extremists just to check if your site supports them and complain if it doesn't. And why NS4 and not NS3, 2, 1? After all, you don't support CP/M, do you? I absolutely agree this would be desirable, but it doesn't handle security properly (you don't want to do security client-side, so you need an abstract representation on teh server anyway) I do this with CF, intranet users never see options they are not allowed to, and even if they know the url and call it directly, they will be kicked off. CF is perfectly capable of handling this. -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213363 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 format for menus
Hell, we just had one of our clients switch from NS4 to IE6 across their entire corporate network this year. Ah ah! Then they were probabilly the last ;-) According to http://www.upsdell.com/BrowserNews/stat.htm NN4 is less than 0.5%, and IE4 not even 0.1%. Is it really worth to bother with it? So you render your HTML with everything, and then apply security considerations with Javascript? Did I say so? I said I do it with CF. CF generates the menu according to permissions the user has. If he's not allowed, he does not see it. Even if he calls an url dorectly, he is kicked out. Doing it in JS would be foolish. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213366 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 format for menus
Actually I agree with that somewhat. Having both client side and server side checks has it's purpose. It saves a trip to the server for those that have not disabled JavaScript. -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: 01 August 2005 01:34 To: CF-Talk Subject: Re: XML format for menus And why NS4 and not NS3, 2, 1? After all, you don't support CP/M, do you? Because still see a significant enough amount of traffic with NS4 to justify making our sites at least functional with the browser, even if they're not as attractive overall as with a newer one. Not the case for older versions. Hell, we just had one of our clients switch from NS4 to IE6 across their entire corporate network this year. Yes, they were using NS4 corporate-wide as recently as 4 months ago. It's definitely not dead. I absolutely agree this would be desirable, but it doesn't handle security properly (you don't want to do security client-side, so you need an abstract representation on teh server anyway) I do this with CF, intranet users never see options they are not allowed to, and even if they know the url and call it directly, they will be kicked off. CF is perfectly capable of handling this. So you render your HTML with everything, and then apply security considerations with Javascript? Not that it's not viable, but seems kind of silly. Why build all that machinery twice, since you have to have it on the CF side regardless? I suppose it doesn't really matter at all, each will do it his own way. cheers, barneyb On 7/31/05, Claude Schneegans [EMAIL PROTECTED] wrote: If you can show me how to take a bunch of markup and convert it into a JS menu that'll work on NS4+, IE4+, Gecko and Safari without it being messy, I'll be very impressed. To this point, I've utterly failed. I agree with you about IE4 and NS4, although I didn't even try to make it compatible with them. However, I suspect these are only used by a couple of extremists just to check if your site supports them and complain if it doesn't. And why NS4 and not NS3, 2, 1? After all, you don't support CP/M, do you? I absolutely agree this would be desirable, but it doesn't handle security properly (you don't want to do security client-side, so you need an abstract representation on teh server anyway) I do this with CF, intranet users never see options they are not allowed to, and even if they know the url and call it directly, they will be kicked off. CF is perfectly capable of handling this. -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213368 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 format for menus
Yes, so the menu is built from some information available to CF - for us that information is the XML file. We just skip the CSS part and built the end result server-side. On 8/1/05, Claude Schneegans [EMAIL PROTECTED] wrote: So you render your HTML with everything, and then apply security considerations with Javascript? Did I say so? I said I do it with CF. CF generates the menu according to permissions the user has. If he's not allowed, he does not see it. Even if he calls an url dorectly, he is kicked out. Doing it in JS would be foolish. ~| 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:213370 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 format for menus
We just skip the CSS part and built the end result server-side. I see. This is this part that I don't like: my customers can modify a CSS file according to their taste, they are not that familiar with XML files. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213371 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 format for menus
This is essentially what I've been doing. I have a system where the menu, as defined in the XML, is searched for the current URL and the appropriate submenu is expanded and highlighted automatically. This is great for applications where one can't rely on javascript. I handle the authorisation bit by defining roles in the XML file - the code then only shows a menu choice for those logged in with the right role. On 7/30/05, Barney Boisvert [EMAIL PROTECTED] wrote: With CF. Each permissions attribute gets converted into a series of isUserAuthorized (an internal function) calls to see if that element is allowed for the user. If so, something gets rendered. In other words, where we're using permissions, we're not using XSL, but rather just CF's XML processing capabilities. We've also set up documents like this: menu ... cfif isUserAuthorized(...) menuitem href=...User List/menuitem /cfif /menu Where we include the XML with CFINCLUDE so the CF is processed, and then do XSL on the resulting XML doc to generate whatever we need. cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: Where / how do you limit/control what menu items get displayed? Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213315 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 format for menus
Simple to have have a single XML doc that describes your menu, and then run it through an XSLT stylesheet to generate the same menu with various look and feels. It still does not prove the advantage of using XML here. I acheive exactly the same functionality with UL and LI in a simple HTML doc and plain CSS stylesheet. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:213328 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 format for menus
I find it easier to find the menu that contains the current URL with XPath rather than figuring it out in CSS. It's also server-side, so it works in NS 4 etc without pain. On 7/31/05, Claude Schneegans [EMAIL PROTECTED] wrote: Simple to have have a single XML doc that describes your menu, and then run it through an XSLT stylesheet to generate the same menu with various look and feels. It still does not prove the advantage of using XML here. I acheive exactly the same functionality with UL and LI in a simple HTML doc and plain CSS stylesheet. ~| 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:213336 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 format for menus
I should have qualified look and feels a little better, that's my bad. The difference is that it happens server-side, not client side. What if one menu format happens to be JS dropdowns? You could do it with UL/LI elements and some messy JS (to parse the doc structure and create the menus), but it'd be hellish to make that work in older browsers that support pure-JS (i.e. the menu structure is defined in JS) menus without issue. To put it another way, CSS lets you format a defined document structure, while XSL lets you convert one structure into another (not necessarily XML) format. Hence it can be used for far more things than using CSS to format HTML can. cheers, barneyb On 7/30/05, Claude Schneegans [EMAIL PROTECTED] wrote: Simple to have have a single XML doc that describes your menu, and then run it through an XSLT stylesheet to generate the same menu with various look and feels. It still does not prove the advantage of using XML here. I acheive exactly the same functionality with UL and LI in a simple HTML doc and plain CSS stylesheet. -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213337 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 format for menus
I've used this format with great success: menu name=Main id=main permissions=... menuitem href=... permissions=...User List/menuitem menu name=Security permissions=... menuitem href=... permissions=...Add User/menuitem / menuitem href=... permissions=...User List/menuitem / /menu /menu cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: Does anyone have an XML format that they would share? I want to convert my hard-coded system and an easily maintainable XML file seems like a good approach. Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213288 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 format for menus
curious...what's the advantage of using XML versus just storing an an array of structs? On 7/29/05, Barney Boisvert [EMAIL PROTECTED] wrote: I've used this format with great success: menu name=Main id=main permissions=... menuitem href=... permissions=...User List/menuitem menu name=Security permissions=... menuitem href=... permissions=...Add User/menuitem / menuitem href=... permissions=...User List/menuitem / /menu /menu cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: Does anyone have an XML format that they would share? I want to convert my hard-coded system and an easily maintainable XML file seems like a good approach. Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213289 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 format for menus
Thanks Barney. Charlie, I am doing it because I can easily create and maintain the menus using an XML Editor such as xmlSpy and load at the beginning of a session based off of language preferences. Andy -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 12:52 PM To: CF-Talk Subject: Re: XML format for menus curious...what's the advantage of using XML versus just storing an an array of structs? On 7/29/05, Barney Boisvert [EMAIL PROTECTED] wrote: I've used this format with great success: menu name=Main id=main permissions=... menuitem href=... permissions=...User List/menuitem menu name=Security permissions=... menuitem href=... permissions=...Add User/menuitem / menuitem href=... permissions=...User List/menuitem / /menu /menu cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: Does anyone have an XML format that they would share? I want to convert my hard-coded system and an easily maintainable XML file seems like a good approach. Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213293 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 format for menus
Another advantage is XSLT transformations. That was the primary reason we did it. Simple to have have a single XML doc that describes your menu, and then run it through an XSLT stylesheet to generate the same menu with various look and feels. It's also potentially easier to deal with, because an array of structs has to be persisted somehow, where as an XML file is just a file on the filesystem. cheers, barneyb On 7/29/05, Charlie Griefer [EMAIL PROTECTED] wrote: curious...what's the advantage of using XML versus just storing an an array of structs? -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213297 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 format for menus
I was hoping this would work! Can I use it to create a menu for a specific user based on Permissions? Do you have an example of the XSLT file showing how I could do this? Andy -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 1:54 PM To: CF-Talk Subject: Re: XML format for menus Another advantage is XSLT transformations. That was the primary reason we did it. Simple to have have a single XML doc that describes your menu, and then run it through an XSLT stylesheet to generate the same menu with various look and feels. It's also potentially easier to deal with, because an array of structs has to be persisted somehow, where as an XML file is just a file on the filesystem. cheers, barneyb On 7/29/05, Charlie Griefer [EMAIL PROTECTED] wrote: curious...what's the advantage of using XML versus just storing an an array of structs? -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213298 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 format for menus
We don't do permission-based stuff with XSLT. Depending on your permission list (namely whether any permission names are substrings of other permission names), you could potentially use the 'contains' XPath function to only select nodes which match a permission list (computed by CF and passed in). But that'd probably be more trouble than it's worth. cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: I was hoping this would work! Can I use it to create a menu for a specific user based on Permissions? Do you have an example of the XSLT file showing how I could do this? Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213299 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 format for menus
Where / how do you limit/control what menu items get displayed? Andy -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 2:13 PM To: CF-Talk Subject: Re: XML format for menus We don't do permission-based stuff with XSLT. Depending on your permission list (namely whether any permission names are substrings of other permission names), you could potentially use the 'contains' XPath function to only select nodes which match a permission list (computed by CF and passed in). But that'd probably be more trouble than it's worth. cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: I was hoping this would work! Can I use it to create a menu for a specific user based on Permissions? Do you have an example of the XSLT file showing how I could do this? Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213301 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 format for menus
With CF. Each permissions attribute gets converted into a series of isUserAuthorized (an internal function) calls to see if that element is allowed for the user. If so, something gets rendered. In other words, where we're using permissions, we're not using XSL, but rather just CF's XML processing capabilities. We've also set up documents like this: menu ... cfif isUserAuthorized(...) menuitem href=...User List/menuitem /cfif /menu Where we include the XML with CFINCLUDE so the CF is processed, and then do XSL on the resulting XML doc to generate whatever we need. cheers, barneyb On 7/29/05, Andy [EMAIL PROTECTED] wrote: Where / how do you limit/control what menu items get displayed? Andy -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213302 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 format for menus
Another advantage to XML is it can be shared between different applications. For example, if you wanted to build the same thing in Flash, the same file could be used to describe the menu system. Jason Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 2:54 PM To: CF-Talk Subject: Re: XML format for menus Another advantage is XSLT transformations. That was the primary reason we did it. Simple to have have a single XML doc that describes your menu, and then run it through an XSLT stylesheet to generate the same menu with various look and feels. It's also potentially easier to deal with, because an array of structs has to be persisted somehow, where as an XML file is just a file on the filesystem. cheers, barneyb On 7/29/05, Charlie Griefer [EMAIL PROTECTED] wrote: curious...what's the advantage of using XML versus just storing an an array of structs? -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~| 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:213304 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