Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Create UI from XSD?

Create UI from XSD?

Scheduled Pinned Locked Moved The Lounge
comdesignxmlquestion
22 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Josh Smith

    I once considered building a component which did something similar. I wanted to build something which would apply validation rules to controls based on an XSD. You specify the part of the XSD which a control "represents" and the component would then automatically enforce that rule. Never did get around to it...

    :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

    M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #7

    Josh Smith wrote:

    Never did get around to it...

    Bummer. So far, we've found this.[^] Marc

    Thyme In The Country
    Interacx
    My Blog

    P 1 Reply Last reply
    0
    • L lost in transition

      :suss:I heard that Larry, Curly, and Moe beat down Chuck Norris.:suss: You heard that?


      God Bless, Jason
      I am not perfect but I try to be better than those before me. So those who come after me will be better than I am.

      J Offline
      J Offline
      Josh Smith
      wrote on last edited by
      #8

      jason_lakewhitney wrote:

      I heard that Larry, Curly, and Moe beat down Chuck Norris. You heard that?

      Curly accidentally smacked him in the head with a plank of wood while turning around...but Chuck Norris eats planks of wood for breakfast. Then spits the splinters at people and impales them.

      :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

      L 1 Reply Last reply
      0
      • J Josh Smith

        jason_lakewhitney wrote:

        I heard that Larry, Curly, and Moe beat down Chuck Norris. You heard that?

        Curly accidentally smacked him in the head with a plank of wood while turning around...but Chuck Norris eats planks of wood for breakfast. Then spits the splinters at people and impales them.

        :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

        L Offline
        L Offline
        lost in transition
        wrote on last edited by
        #9

        Josh Smith wrote:

        impales them

        :wtf:


        God Bless, Jason
        I am not perfect but I try to be better than those before me. So those who come after me will be better than I am.

        J 1 Reply Last reply
        0
        • L lost in transition

          Josh Smith wrote:

          impales them

          :wtf:


          God Bless, Jason
          I am not perfect but I try to be better than those before me. So those who come after me will be better than I am.

          J Offline
          J Offline
          Josh Smith
          wrote on last edited by
          #10

          jason_lakewhitney wrote: :wtf:

          ;)

          :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

          1 Reply Last reply
          0
          • M Marc Clifton

            Josh Smith wrote:

            Never did get around to it...

            Bummer. So far, we've found this.[^] Marc

            Thyme In The Country
            Interacx
            My Blog

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #11

            Sounds like somebody's next article here. I wonder who that could be.

            Deja View - the feeling that you've seen this post before.

            M 1 Reply Last reply
            0
            • L lost in transition

              Josh Smith wrote:

              Never did get around to it...

              Well what good are you? :)


              God Bless, Jason
              I am not perfect but I try to be better than those before me. So those who come after me will be better than I am.

              N Offline
              N Offline
              NormDroid
              wrote on last edited by
              #12

              How dare you critise King Josh, hail the WPF king ;) being one of the WPF deciples I dare anyone to mock our king.

              It takes Chuck Norris 20 minutes to watch 60 Minutes.

              J 1 Reply Last reply
              0
              • P Pete OHanlon

                Sounds like somebody's next article here. I wonder who that could be.

                Deja View - the feeling that you've seen this post before.

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #13

                Pete O`Hanlon wrote:

                Sounds like somebody's next article here. I wonder who that could be.

                I'll have to see if I can get permission from my client to make any such work public. :) Marc

                Thyme In The Country
                Interacx
                My Blog

                1 Reply Last reply
                0
                • N NormDroid

                  How dare you critise King Josh, hail the WPF king ;) being one of the WPF deciples I dare anyone to mock our king.

                  It takes Chuck Norris 20 minutes to watch 60 Minutes.

                  J Offline
                  J Offline
                  Josh Smith
                  wrote on last edited by
                  #14

                  norm .net wrote:

                  How dare you critise King Josh, hail the WPF king

                  :omg: :-O :->

                  norm .net wrote:

                  being one of the WPF deciples I dare anyone to mock our king.

                  Slay the non-believers, Norm. :)

                  :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

                  P 1 Reply Last reply
                  0
                  • J Josh Smith

                    norm .net wrote:

                    How dare you critise King Josh, hail the WPF king

                    :omg: :-O :->

                    norm .net wrote:

                    being one of the WPF deciples I dare anyone to mock our king.

                    Slay the non-believers, Norm. :)

                    :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #15

                    How dare you continue to wear your WPF crown now that you've strayed into none-WPF territory? Nah - only joking. All hail King Josh. Repeat after me: "All hail the King. Blessed be the name of the King. For the King giveth WPF and the King taketh away WPF. Ladies and gentlemen - Josh has left the building."

                    Deja View - the feeling that you've seen this post before.

                    J 1 Reply Last reply
                    0
                    • P Pete OHanlon

                      How dare you continue to wear your WPF crown now that you've strayed into none-WPF territory? Nah - only joking. All hail King Josh. Repeat after me: "All hail the King. Blessed be the name of the King. For the King giveth WPF and the King taketh away WPF. Ladies and gentlemen - Josh has left the building."

                      Deja View - the feeling that you've seen this post before.

                      J Offline
                      J Offline
                      Josh Smith
                      wrote on last edited by
                      #16

                      Pete O`Hanlon wrote:

                      How dare you continue to wear your WPF crown now that you've strayed into none-WPF territory?

                      Isn't there some Zen saying about taking a step backwards to go forwards? Yeah, something like that... :rolleyes:

                      Pete O`Hanlon wrote:

                      Ladies and gentlemen - Josh has left the building

                      Speaking of...adios muchachos!

                      :josh: My WPF Blog[^] Without a strive for perfection I would be terribly bored.

                      1 Reply Last reply
                      0
                      • M Marc Clifton

                        Besides the work that I did on this a few years ago, which was pretty primitive, do you know of anyone (commercial or otherwise) that has put together a "control" that dynamically generates its contents (child controls to edit the associated XML) given an XSD? Marc

                        Thyme In The Country
                        Interacx
                        My Blog

                        L Offline
                        L Offline
                        leppie
                        wrote on last edited by
                        #17

                        Marc, thats like saying, here's the C# spec, I need something that can generate me a program :) BUT, given you have an XSD, you can easily use XSL + XML to create the end result.

                        xacc.ide
                        The rule of three: "The first time you notice something that might repeat, don't generalize it. The second time the situation occurs, develop in a similar fashion -- possibly even copy/paste -- but don't generalize yet. On the third time, look to generalize the approach."

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          Besides the work that I did on this a few years ago, which was pretty primitive, do you know of anyone (commercial or otherwise) that has put together a "control" that dynamically generates its contents (child controls to edit the associated XML) given an XSD? Marc

                          Thyme In The Country
                          Interacx
                          My Blog

                          W Offline
                          W Offline
                          was8309
                          wrote on last edited by
                          #18

                          I've been trying to find this for a while now : XSD -> XSL -> UI -> XML -> XSL -> XSD. the UI would combo box all the previous allowable values for an element, plus allow entry of a new value. If a new one was entered, the final XSD would now have it included, so the next time around it would be in the list of values.

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            Besides the work that I did on this a few years ago, which was pretty primitive, do you know of anyone (commercial or otherwise) that has put together a "control" that dynamically generates its contents (child controls to edit the associated XML) given an XSD? Marc

                            Thyme In The Country
                            Interacx
                            My Blog

                            J Offline
                            J Offline
                            Jesse Jacob
                            wrote on last edited by
                            #19

                            You didn't specify whether you need to generate the UI from an unknown XSD at runtime (rough equiv. of magic), or if your schema is known at design time, so I'll tell you what I know about both. I've built a couple of apps using Altova's Authentic framework, and SoftQuad's XMetal/XMAX control to embed editing features for static XSDs in .NET apps. Both of these frameworks have a client component that you need to install to use the ActiveX control, and both have styling features that range from basic to super-advanced, and both have a really awful-looking basic mode that quickly generates a UI from a static or inferred XSD. Both of these frameworks also have a stand-alone editor with navigation and form-like features, but they are both very document-oriented. I've also built several Infopath projects for simple apps that had static schemas. Infopath is an excellent option to prototype UIs that will eventually be bound to XML documents, fragments, or relational databases, but only if you already have it or you have the budget to buy it. XMetal has a hefty per-seat cost while Authentic is free, but XMetal's ActiveX control and stand-alone editor are much better, IMO. I've used all three on different projects, and the users were generally happy with the results. The dynamic-UI-from-runtime-specified-XSD story is pretty bleak. You're pretty much limited to a few very experimental frameworks (do your own googling for the latest smoke and mirrors), or full-fledged XML/XSD editors like XML Notepad from Microsoft (free, small, simple, stable), or legacy dedicated editor/designers like Spy, Sylus Studio, etc. (most have lots of warts). The few frameworks I've seen that could generate UIs at runtime from user-specified XSDs only supported a subset of the XSD spec and created absolutely heinous UIs--nothing you'd want to throw at a user. Not that full-fledged editors are any better for the user; they're all slanted toward the developer/admin role. I agree with the poster who compared this endeavor to asking "Given the C# spec, does anyone know of an app that can generate progams for me?" Assuming you're trying something sane, like starting with a static schema at design time, the best .NET method I've come up with to create validating UIs is: 1. Use XSD.EXE (comes with visual studio) to generate serializable classes from the parts of the schema that need to be bound to UI controls 2. Manually create UI/user controls and then databind your components to the XSD classes 3. Add exceptions to the property setters in

                            M 1 Reply Last reply
                            0
                            • J Jesse Jacob

                              You didn't specify whether you need to generate the UI from an unknown XSD at runtime (rough equiv. of magic), or if your schema is known at design time, so I'll tell you what I know about both. I've built a couple of apps using Altova's Authentic framework, and SoftQuad's XMetal/XMAX control to embed editing features for static XSDs in .NET apps. Both of these frameworks have a client component that you need to install to use the ActiveX control, and both have styling features that range from basic to super-advanced, and both have a really awful-looking basic mode that quickly generates a UI from a static or inferred XSD. Both of these frameworks also have a stand-alone editor with navigation and form-like features, but they are both very document-oriented. I've also built several Infopath projects for simple apps that had static schemas. Infopath is an excellent option to prototype UIs that will eventually be bound to XML documents, fragments, or relational databases, but only if you already have it or you have the budget to buy it. XMetal has a hefty per-seat cost while Authentic is free, but XMetal's ActiveX control and stand-alone editor are much better, IMO. I've used all three on different projects, and the users were generally happy with the results. The dynamic-UI-from-runtime-specified-XSD story is pretty bleak. You're pretty much limited to a few very experimental frameworks (do your own googling for the latest smoke and mirrors), or full-fledged XML/XSD editors like XML Notepad from Microsoft (free, small, simple, stable), or legacy dedicated editor/designers like Spy, Sylus Studio, etc. (most have lots of warts). The few frameworks I've seen that could generate UIs at runtime from user-specified XSDs only supported a subset of the XSD spec and created absolutely heinous UIs--nothing you'd want to throw at a user. Not that full-fledged editors are any better for the user; they're all slanted toward the developer/admin role. I agree with the poster who compared this endeavor to asking "Given the C# spec, does anyone know of an app that can generate progams for me?" Assuming you're trying something sane, like starting with a static schema at design time, the best .NET method I've come up with to create validating UIs is: 1. Use XSD.EXE (comes with visual studio) to generate serializable classes from the parts of the schema that need to be bound to UI controls 2. Manually create UI/user controls and then databind your components to the XSD classes 3. Add exceptions to the property setters in

                              M Offline
                              M Offline
                              Marc Clifton
                              wrote on last edited by
                              #20

                              Hey Jeese, thanks for the great response. We've looked at Altova's Authenticate framework but I don't think anyone has looked at XMetal. Marc

                              Thyme In The Country
                              Interacx
                              My Blog

                              J 1 Reply Last reply
                              0
                              • M Marc Clifton

                                Hey Jeese, thanks for the great response. We've looked at Altova's Authenticate framework but I don't think anyone has looked at XMetal. Marc

                                Thyme In The Country
                                Interacx
                                My Blog

                                J Offline
                                J Offline
                                Jesse Jacob
                                wrote on last edited by
                                #21

                                One more detail: I went looking for XMetal specifically because of Authentic performance problems. My team was writing an editor based on another department's existing framework, but the borrowed code was excruciatingly slow with any schema-based XML document over 1/2mb. Their editing control was written in C# as a thin wrapper around the Authentic ActiveX control, so we started looking for drop-in replacements. Just seeing both controls render simple, unstyled XML showed a big enough performance diff to convince our users to fund the per-seat XMetal costs. Just scrolling a 2mb document in Authentic was awful, so we never looked back. YMMV--that was back in '03/04, so maybe Authentic has improved. I think someone already mentioned this: if you want a really interesting browser-based solution to rendering UI from XSD, check out XForms. It will take a lot of additional plumbing before major browsers have native implementations, but there are plenty of plugins that can render them today.

                                M 1 Reply Last reply
                                0
                                • J Jesse Jacob

                                  One more detail: I went looking for XMetal specifically because of Authentic performance problems. My team was writing an editor based on another department's existing framework, but the borrowed code was excruciatingly slow with any schema-based XML document over 1/2mb. Their editing control was written in C# as a thin wrapper around the Authentic ActiveX control, so we started looking for drop-in replacements. Just seeing both controls render simple, unstyled XML showed a big enough performance diff to convince our users to fund the per-seat XMetal costs. Just scrolling a 2mb document in Authentic was awful, so we never looked back. YMMV--that was back in '03/04, so maybe Authentic has improved. I think someone already mentioned this: if you want a really interesting browser-based solution to rendering UI from XSD, check out XForms. It will take a lot of additional plumbing before major browsers have native implementations, but there are plenty of plugins that can render them today.

                                  M Offline
                                  M Offline
                                  Marc Clifton
                                  wrote on last edited by
                                  #22

                                  Jesse Jacob wrote:

                                  if you want a really interesting browser-based solution to rendering UI from XSD, check out XForms.

                                  Ah, but I'm looking for a WinForm component, not a browser-based component. :) Marc

                                  Thyme In The Country
                                  Interacx
                                  My Blog

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups