in

CodeSmith Community

Your Code. Your Way. Faster!

XSDSchemaExplorer - an XSD Schema reader

Last post 02-08-2008 11:36 PM by ejsmith. 2 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-02-2004 3:46 PM

    • scooman
    • Not Ranked
    • Joined on 11-24-2003
    • North East England, UK
    • Posts 3
    • Points 185

    XSDSchemaExplorer - an XSD Schema reader

    This is the first version of an XSD Schema reader for CodeSmith.
     
    It allows schema type and element information to be interrogated in an abstract and simplified way. CodeSmith properties are provided for the schema as a whole or for individual complex/simple types within the schema. Examples are included.
     
    I am not a in general a fan of generating business objects from database schemas due to the business logic dependencies it introduces. My preferred development process is to ananlyse and design the core business objects, then define the data model to support it and finally design the mapping layer between business objects and data.
     
    The XSDSchemaExplorer allows business data objects to be defined in terms of XSD's (usefully this can also provide the objects that serialize to a defined schema - e.g. for WebServices). The database schema can be used to generate the DAL and then all that is needed is the mapping layer!
     
    XSDSchemaExplorer.zip is the dll and example. To use it, copy the XSDSchemaExplorer.dll into the CodeSmith program directory...
     
    XSDSchemaExplorerSrc.zip is the source - surprise :-)
     
    The other two files form a chm help file if you follow these steps (the file was too big and I couldn't upload a standard split...is there an easier way?confused )
     
    • save doc.zip and chmPart.z01 to the same place.
    • Open doc.zip and extract chmPart.zip
    • Open chmPart.zip and if your zipper supports it (winzip does) you should be able to extract the XSDSchemaExplorer.chm file!

    Enjoy

    Cheers
     
    • Post Points: 120
  • 09-03-2004 12:12 AM In reply to

    • ejsmith
    • Top 10 Contributor
    • Joined on 12-27-2002
    • Dallas, TX USA
    • Posts 2,185
    • Points 873,825

    RE: XSDSchemaExplorer - an XSD Schema reader

    I went ahead and changed the maximum attachment size to 1M.

    Thanks,
    Eric J. Smith
    Eric J. Smith
    CodeSmith Tools, LLC
    Chief Software Architect
    • Post Points: 5
  • 09-03-2004 9:09 AM In reply to

    • scooman
    • Not Ranked
    • Joined on 11-24-2003
    • North East England, UK
    • Posts 3
    • Points 185

    RE: XSDSchemaExplorer - an XSD Schema reader

    Thanks Eric, here's the help file in one part...
     
    • Post Points: 5
  • 09-03-2004 9:21 AM In reply to

    • dSquared
    • Top 10 Contributor
    • Joined on 09-01-2004
    • Paris - France
    • Posts 519
    • Points 260,935

    RE: XSDSchemaExplorer - an XSD Schema reader

    hi
    maybe you'll be intersted by this tool from microsoft:
    XSD Object Generator
    http://www.microsoft.com/downloads/details.aspx?FamilyID=89e6b1e5-f66c-4a4d-933b-46222bb01eb0&DisplayLang=en

    >I am not a in general a fan of generating business objects from database schemas due to the business logic dependencies it introduces. My preferred development process >is to ananlyse and design the core business objects, then define the data model to support it and finally design the mapping layer between business objects and data.

    would'nt be even better to generate the business objects from an XMI file ? is it possible today with codeSmith ?

    john
    John Roland

    ------------------------------

     Member of the .netTiers team

      http://en.serialcoder.net

    ------------------------------
    • Post Points: 5
  • 09-05-2004 2:09 PM In reply to

    • rhoeting
    • Top 500 Contributor
    • Joined on 07-02-2004
    • Posts 10
    • Points 135

    RE: XSDSchemaExplorer - an XSD Schema reader

    This looks pretty cool!  I think I can use it for sure.  I'll let you know how well it works.
     
    Thanks scoonman
    • Post Points: 5
  • 09-05-2004 2:14 PM In reply to

    • rhoeting
    • Top 500 Contributor
    • Joined on 07-02-2004
    • Posts 10
    • Points 135

    RE: XSDSchemaExplorer - an XSD Schema reader

    I downloaded and tried "XSD Object Generator" from microsoft.  While it does build a nice class based on an XSD file, I haven't figured out how to easily regenerate the file when I've made a change to the XSD.   Also, there's no mechanism by which I can create my own template (at least easily)... This is why I like codeSmith so much.  I can create and modify my templates as I see the need.

    Rob

    • Post Points: 35
  • 05-11-2007 11:15 AM In reply to

    • sheckel
    • Not Ranked
    • Joined on 05-11-2007
    • Posts 2
    • Points 40

    Re: RE: XSDSchemaExplorer - an XSD Schema reader

    I'd like to use this with CodeSmith 4.0.  Is this possible?  If so, how do I get Codesmith to recognize the schema provider?  I've tried placing the dll in the Schema Providers folder, adins, and bin directories, but it doesn't come up as a choice in the data sources drop down.
    • Post Points: 35
  • 02-08-2008 11:36 PM In reply to

    • ejsmith
    • Top 10 Contributor
    • Joined on 12-27-2002
    • Dallas, TX USA
    • Posts 2,185
    • Points 873,825

    Re: RE: XSDSchemaExplorer - an XSD Schema reader

    I was able to get this to work in CodeSmith 4.x by compiling the project, dropping the XSDSchemaExplorer.dll into the AddIns folder and then adding these lines to a template:

    <%@ Property Name="Schema" Type="XSDSchemaExplorer.XSDSchemaProperty" Optional="False" Category="Booleans" Description="This is a sample boolean property." %>
    <%@ Assembly Name="XSDSchemaExplorer" %>

    It's not a schema provider for SchemaExplorer, it's completely seperate.

    Also, you can just use System.Xml.Schema.XmlSchema for a property type and it will let you use that for generating from XSD as well.

    <%@ Property Name="Schema" Type="System.Xml.Schema.XmlSchema" Optional="False" Category="Booleans" Description="This is a sample boolean property." %>

    Eric J. Smith
    CodeSmith Tools, LLC
    Chief Software Architect
    • Post Points: 5
Page 1 of 1 (8 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems