RE: XML format for menus

2005-08-01 Thread Calvin Ward
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

Re: XML format for menus

2005-07-31 Thread Claude Schneegans
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

Re: XML format for menus

2005-07-31 Thread Claude Schneegans
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

Re: XML format for menus

2005-07-31 Thread James Holmes
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

Re: XML format for menus

2005-07-31 Thread Barney Boisvert
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

Re: XML format for menus

2005-07-31 Thread Claude Schneegans
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

Re: XML format for menus

2005-07-31 Thread Barney Boisvert
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

Re: XML format for menus

2005-07-31 Thread Claude Schneegans
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

RE: XML format for menus

2005-07-31 Thread Russ Michaels
-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

Re: XML format for menus

2005-07-31 Thread James Holmes
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

Re: XML format for menus

2005-07-31 Thread Claude Schneegans
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

Re: XML format for menus

2005-07-30 Thread James Holmes
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

Re: XML format for menus

2005-07-30 Thread Claude Schneegans
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

Re: XML format for menus

2005-07-30 Thread James Holmes
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

Re: XML format for menus

2005-07-30 Thread Barney Boisvert
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),

Re: XML format for menus

2005-07-29 Thread Barney Boisvert
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

Re: XML format for menus

2005-07-29 Thread Charlie Griefer
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

RE: XML format for menus

2005-07-29 Thread Andy
, 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

Re: XML format for menus

2005-07-29 Thread Barney Boisvert
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

RE: XML format for menus

2005-07-29 Thread Andy
-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

Re: XML format for menus

2005-07-29 Thread Barney Boisvert
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

RE: XML format for menus

2005-07-29 Thread Andy
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

Re: XML format for menus

2005-07-29 Thread Barney Boisvert
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

RE: XML format for menus

2005-07-29 Thread Merrill, Jason
- 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