XSD(XML Schema Design) Tutorial

Hi,
Can anyone point me to a very good tutorial on XSD.
I need to learn from SIMPLE to Advanced features of XSD.
could not find much on google.
Thanks
Deepak

You obviously didn't look very hard!
Suggest you also try amazon

Similar Messages

  • XML Schema Design question

    Hello all,
    I am a new to XML Schema design and struggling with designing my first XML Schema. Here is my problem.
    I have almost 200 elements in my database which I have to use to design XSDs, I have customer name ( last name, first name, dob etc) and customer address ( office address, home address etc) and at the same time I have other player such as Patient name ( last name, first name, dob etc) and patient address( home address, office address).
    And then we have some dollor related data such as patient insurance amount, copay amount , total amount and many more $.
    What I wanted to know is that what would be best approach to design a XML schema for such kind of system, should I create one schema (xsd) for all the 200 attributes or I should create seperate schema for customers ( including names and addresses along with other dollor amount data ) and a similar xsd for Patient data. Some of the XML documents which I will create from these schemas would be based on customers and patient information both .
    Thank you.
    Regards
    Suhail Ahmad

    It's hard to tell what is the best design. But in order to simplify access to these data through other program APIs such as JAXB, you may start from defining objects such as the schema types/elements for customer, patient and the addresses
    Then you can assoicate the related data to these object.

  • Database to XML with XSD (XML schema)

    I have an Oracle 9 DB.
    I need to convert data from a table (Java ResultSet) to XML (I have an XML schema file).
    How can I do?
    Is there a tool?
    Thanks, Ludo.

    Refer to
    Oracle Xml Sql Utility.
    http://www.xml.com/pub/r/846

  • How to create the XSD(XML Schema Definition) ?

    Dear All,
         How to create an XSD for the following XML defined ?
    <?xml version="1.0" encoding="utf-8"?>
    <formulations name="Formulations">
        <formulation name="Formulation-1" type="formulation">
            <intermediateFormulation name="IntermediateFormulation-1" type="intermediate">
                <grade name="Grade-1" type="grade">
                    <rawMaterial name="Raw Material-1" type="raw" />
                </grade>
            </intermediateFormulation>
            <grade name="Grade-1" type="grade">
                <rawMaterial name="Raw Material-1" type="raw" />
            </grade>
        </formulation>
    </formulations>
    Thank You,
    Supreet R

    Hi Sivaram,
    Unfortunately, the 8.1 IDE did not have special tooling for schema generation.
    You will need to create it by hand or using an external tool
    If you are using an external tool to create the file within the schema project, you might want to disable the schema project auto build, which will be triggered every time a file save takes place
    cheers
    Raj

  • XSD (XML Schema)

    Do you now any tool that creates Java objects from XSD?
    Can I use the logic from an XSD file into a java aplication?
    Can I perfomr checking on setting values of an object created from XSD? I found out only how to perform checking on an XML file, but I want to perform checking also on the objects that represents the XML data.

    Do you now any tool that creates Java objects from
    XSD?
    Can I use the logic from an XSD file into a java
    aplication?
    Can I perfomr checking on setting values of an object
    created from XSD? I found out only how to perform
    checking on an XML file, but I want to perform
    checking also on the objects that represents the XML
    data.Hi,
    You may be interested in Java(TM) Architechture for XML binding (JAXB)
    JAXB is a technique to simplify the creation and maintenance of XML enabled Java applications. It has a schema compiler which will create
    Java Objects from a schema file.
    For more information please see http://java.sun.com/xml/jaxb/index.html
    The Public Draft of the spec is available there.
    Thanks,
    Bhakti

  • How to generate WPF Xaml through XSD (xml schema definition)

    Hi Experts
    I am working on Projects where we need to generate wpf ui (xaml) at runtime as per different requirements. We are trying to generate xaml from xsd file. We are able to generate UI from xml but as size of xml can be large we are reluctant to use xml as xaml
    generation source. I am attaching a sample image what we are trying to do
    UI elements Description
    For each complex node in xsd, we need a panel which can have add or delete button depending on minoccurs and maxoccurs of the node. Inside panel we want to add different ui elements.
    Please suggest if there is any way to do this or any one have worked in this direction?
    Thanks
    Praveen

    I should think you could use xsl on xsd to generate xaml.
    I have used xsl on xml to do this sort of thing - for reporting style stuff. 
    Xsd is just an odd kind of xml so I should think that's do-able.
    Failing that.
    You could use the template approach and generate xml from that but use c# to read the xsd.
    You would have like a textbox template etc.
    Is that UI truly representative?
    You could leverage the approach I use in this:
    http://social.technet.microsoft.com/wiki/contents/articles/29777.wpf-property-list-editing.aspx
    The EditRow user control has label + editing control as a pair.
    You would add another control for that pattern thing I see in grey after some of those.
    But you could essentially iterate the fields in an xsd , decide what control to use based on field type. 
    Set the label....
    Add that to a Listbox.
    You have a big bunch of xsd and you're thinking of generating the UI?
    I suppose you could then use icustomtypeprovider to generate matching viewmodels inheriting some base vm functionality.
    I don't follow how a "supporting dll" comes into this.
    Could you explain?
    Hope that helps.
    Recent Technet articles:
    Property List Editing ;  
    Dynamic XAML

  • Validate XML using XSD (XML Schema)

    Hi experts.
    Is there any way in ABAP to validate XML file against specified XSD file?
    I found only possibility to validate against DTD, but no XSD. As far as I know this is only possible in Java, or is a part of XI. Is it doable without Java or XI (on NetWeaver 2004s)?
    Help appreciated (and rewarded).
    Regards, Frantisek.

    Hello
    Perhaps you missed this link: [How to Perform XML Validations in SAP NetWeaver Process Integration 7.1|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1]
    Regards
      Uwe

  • Build XSD (XML Schema Defenition) from XML using Oracle SOAz

    Hi:
    I want to integrate Application A to Application B using Oracle SOA suite. Application A will give me a XML file. Application B will supports XSD. Can any one help me how to build XSD using existing XML in Oracle SOA suite?
    Appreciate if you give me the steps.
    Thanks,
    RAO

    You might want to ask this question in the SOA forum. To get there ...
    at the top of this page you will see a set of links that look like "Forum Home » Technology Network Community » Certification".
    Click on 'Forum Home' to get to the Forum Home page.
    Then press Ctrl+F to enable search in your browser.
    Enter SOA in the search box, and if you are using Internet Explorer you might want to press the Next button.
    You will see a list
    SOA & Process Management
      SOA Suite 
      BPEL
      Applications Integration using Oracle Fusion Middleware
      Business Process Management Suite 
      More... You could click on 'SOA Suite' to chat with people who use the SOA Suite.
    You could click on 'More...' to see whether there are other useful forums.
    Just to satisfy my curiosity, why did you select the Certification forum for this question?

  • Conditions in XML schema

    Hello all
    This is more of a XML schema design question.
    If I have 2 elements, both at the same hierarchy level in a xml document, how can I enforce a condition such that atleast one of these elements should occur ? I don't think choice, all or sequence would do it for me!!
    Thanks for your replies.
    Mahesh :)

    Hey
    Thanks a lot. I knew it would be simple.
    One more question I have-
    I am trying to convert a fixed length flat file to XML.
    I believe the only required information for such a coversion is- the element or field names, their data types, and the fixed length of each field.
    I do not want to generate a xsl document by hand. Just looking if there are any open source tools which can help me out here.
    Thanks a bunch
    Mahesh :)

  • How do you create an xsd file for an xml schema in BI Publisher?

    Helllo.
    I hope this is a really daft question for somebody..
    How I create an xsd file to be used as an xml schema to attach to a Data Definition that Ive created? I've obv. got the xml and rtf files ready and attached. I've looked through the relevant docs (XML Publisher Report Designer's Guide.pdf & XML Publisher Administration and Developer's Guide.pdf) but can't find where..
    Once this has been done then I can run the template via ORACLE Financials for the reports I've converted.
    many thanks..
    Steven

    I don't think you need to have an XSD it's an optional field. If you really want to create one use this site: http://www.hitsw.com/xml_utilites/
    I believe I answered your question, don't forget to give me the points.
    Ike Wiggins
    http://bipublisher.blogspot.com

  • How to generate XSD file for XML schema adobe form

    Hi,
    I want to generate XSD file for XML schema interfaces adobe forms. How can I do it. Where I can do it..or who will provide this file..
    Thanks
    Ram
    Edited by: Ramesh ram on Feb 23, 2010 6:33 PM

    Aaaaah, my mistake, sorry for that. Of course you should use the XML interface and I forgot it is not described in this tutorial. You can easily find another one where the XML based interface is used. But... you won´t need any tutorial. just create a WD context. Place a Interactive form element on your WD app screen, in the attributes you need to maintain the form template name. If you write a name suitable for you which no existing forms uses, the system will offer you to generate a XML based interface and right after that it will "send" you to the SFP transaction. That means you can like skipi the step defining the interface because it it is generated automatically and you only draw the layout for this generated interface.
    You should use XMl based interface for your WD app, because when using the ABAP dic based, some features are not available (I am not sure, but ABAP based works only for print form or something).
    Hope it is all clear now,
    have a nice day,
    Otto

  • XML Schema -- xsi:null in document instance and nullable in XSD

    Hi,
    I have an XML document
    <DOC>
    <EMP_ID>1</EMP_ID>
    <EMP_NAME>Scott</EMP_NAME>
    <EMP_ADDRESS>USA</EMP_ADDRESS>
    </DOC>
    As to what I understand, for the document to look like
    <DOC>
    <EMP_ID>1</EMP_ID>
    <EMP_NAME>Scott</EMP_NAME>
    <EMP_ADDRESS></EMP_ADDRESS>
    </DOC>
    with no value in <EMP_ADDRESS> tag, I have to use nullable attribute in XSD and xsi:null attribute in document. Is there any other way where we don't make any modificaitons in the document

    Hi, Thanks for the reply.I have a scenario like this :
    1. We have lot of xml files in our application server ( size ranges form 2 MB to 200 MB).
    2. We have xml schema based structured storage for a column "personjoininfo" for a relational table --- Table is :
    CREATE TABLE PERSON_COMP_TABLE
    empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
    ,comments VARCHAR2(20)
    ,joindate DATE
    ,personjoininfo xmltype
    XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
    3. What is the best option for me to load the xml files in the personjoin info column along with the other column values.
    As I know , if I use the XML DIR ( directory feature ), I would need to put these xml files in the database server for loading ---
    So, what are my options in this scenario for loading these xml files ?
    Thanks

  • How to bind data from script created variable to embed element of XML schema (xsd) in "Data View"

    Hi, i have got another problem with livecycle designer scripting.
    I have got script line which is defining of string variable:
    var aaa = "this is my string";
    and i have got embed XML schema like this (it`s only short part of whole file):
    ... xs:element name="bbb" type="xs:string"/ ...
    After saving data to XML i would like to get "this is my string" as a value of my "bbb" XML element.
    To save this data i`m using submit button which is connect with submit.php file on my server.
    How to connect script created variable and embed XML schema element which is present on my "Data View" tab.
    Please help me a bit becouse i don`t know even where to search answer of it...
    Of course i know possibilities to create fake unvisible text field object and bind it with 'bbb' and than put "this.rawValue = aaa" to connect those two variables but i think that is not a good idea to solve it in that way. It`s too primitive

    i solve it, i should write this:
    xfa.datasets.data.bbb.value = aaa;

  • XML Schema Collection (SQL Server 2012): Complex Schema Collection with Attribute - Should xs or xsd be used in the coding?

    Hi all,
    I just got a copy of the book "Pro SQL Server 2008 XML" written by Michael Coles (published by Apress) and try to learn the XML Schema Collection in my SQL Server 2012 Management Studio (SSMS2012). I studied Chapter 4 XML Collection of the book
    and executed the following code of Listing 4-8 Complex Schema with Attribute:
    -- Pro SQL Server 2008 XML by Michael Coles (Apress)
    -- Listing04-08.sql Complex XML Schema with Attribute
    -- shcColes04-08.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress
    -- 6 April 2015 8:00 PM
    CREATE XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute
    AS
    N'<?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="item">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" />
    <xs:element name="color" />
    <xs:group ref="id-price" />
    <xs:group ref="size-group" />
    </xs:sequence>
    <xs:attribute name="id" />
    <xs:attribute name="number" />
    </xs:complexType>
    </xs:element>
    <xs:group name="id-price">
    <xs:choice>
    <xs:element name="list-price" />
    <xs:element name="standard-cost" />
    </xs:choice>
    </xs:group>
    <xs:group name="size-group">
    <xs:sequence>
    <xs:element name="size" />
    <xs:element name="unit-of-measure" />
    </xs:sequence>
    </xs:group>
    </xs:schema>';
    GO
    DECLARE @x XML (dbo.ComplexTestSchemaCollection_attribute);
    SET @x = N'<?xml version="1.0"?>
    <item id="749" number="BK-R93R-62">
    <name>Road-150 Red, 62</name>
    <color>Red</color>
    <list-price>3578.27</list-price>
    <size>62</size>
    <unit-of-measure>CM</unit-of-measure>
    </item>';
    SELECT @x;
    GO
    DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute;
    It worked nicely. But, I just found out the coding that was downloaded from the website of Apress and I just executed was different from the coding of Listing 4-8 listed in the book: all the <xs: ....> and </xs: ..> in my SSMS2012 are
    listed as <xsd:...> and </xsd:...> respectively in the book!!??  The same thing happens in the Listing 4-3 Simple XML Schema, Listing 4-5 XML Schema and Valid XML Document with Comple Type Definition, Listion 4-6 XML Schema and XML
    Document Document with Complex Type Using <sequence> and <choice>, and Listing 4-7 Complex XML Schema and XML Document with Model Group Definition (I executed last week) too.  I wonder: should xs or xsd be used in the XML
    Schema Collection of SSMS2012?  Please kindly help,  clarify this matter and explain the diffirence of using xs and xsd for me.
    Thanks in advance,
    Scott Chang   

    Hi Scott,
    Using xs or xsd depends on how you declare the namespace prefix.
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="item">
    I've posted a very good link in your last question, just in case you might have missed it, please see the below link.
    Understanding XML Namespaces
    In an XML document we use a namespace prefix to qualify the local names of both elements and attributes . A prefix is really just an abbreviation for the namespace identifier (URI), which is typically quite long. The prefix is first mapped to a namespace
    identifier through a namespace declaration. The syntax for a namespace declaration is:
    xmlns:<prefix>='<namespace identifier>'
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Try to do my first XML Schema in SQL Server 2012 Mangement Studio(SSMS2012)-How to execute the xsd and xml files in SSMS2012?

    Hi all,
    I learmed the basic stuff of XML, DTD, DOM, etc. long time ago. Now, I came back to resume my XML journey and try to learn the XML Schemas, XPath and XQuery. I have Microsoft SQL Server 2012 Management Studio (SSMS2012) in our computer network. From
    Page 221 of the old Book "Beginning XML 2nd Edition" written by David Hunter, et.al., (published by Wrox), I copied the name5.xsd and name5.xml :
    <?xml version="1.0"?>
    <schema xmlns=http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.wrox.com/name" xmlns:target="http://www.wrox.com/name"
    elementFormDefault="qualified">
    <element name="name">
    <complexType>
    <sequence>
    <element name="first" type="string"/>
    <element name="middle" type="string"/>
    <element name="last" type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    <?xml version="1.0"?>
    <name
    xmlns=http://www.wrox.com/name"
    xmlns:xsi="http://www.wrox.org/2001XMLSchema-instance"
    xsi:schemaLocation="http://www.wrox.com/name name5.xsd"
    title="Mr.">
    <first>John</first>
    <middle>Frizgerald</middle>
    <last>Doe</last>
    </name>
    How can I execute these two files in my SSMS2012 for doing my first XML Schema trial?
    Please kindly help, advise and respond.
    Thanks in advance,
    Scott Chang

    Hi Eric Zhang, Thanks for your nice response.
    1) I saw the CREATE XML SCHEMA COLLECTION (Transact-SQL) and tried  its first example "Create XML schema collection in the database" in my SQL Server 2012 Management Studio (SSMS2012):
    -- Create a sample database in which to load the XML schema collection.
    -- Copied this set of code stsments from Microsoft Library (ms176009)
    -- ColesMS12_20a.sql (saved in C:/Documents/SQL Server Management Studio)
    -- 19 March 2015 1145 AM
    CREATE DATABASE SampleDB
    GO
    USE SampleDB
    GO
    CREATE XML SCHEMA COLLECTION ManuInstructionsSchemaCollection AS
    N'<?xml version="1.0" encoding="UTF-16"?>
    <xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
    xmlns ="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
    <xsd:complexType name="StepType" mixed="true" >
    <xsd:choice minOccurs="0" maxOccurs="unbounded" >
    <xsd:element name="tool" type="xsd:string" />
    <xsd:element name="material" type="xsd:string" />
    <xsd:element name="blueprint" type="xsd:string" />
    <xsd:element name="specs" type="xsd:string" />
    <xsd:element name="diag" type="xsd:string" />
    </xsd:choice>
    </xsd:complexType>
    <xsd:element name="root">
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:element name="Location" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:element name="step" type="StepType" minOccurs="1" maxOccurs="unbounded" />
    </xsd:sequence>
    <xsd:attribute name="LocationID" type="xsd:integer" use="required"/>
    <xsd:attribute name="SetupHours" type="xsd:decimal" use="optional"/>
    <xsd:attribute name="MachineHours" type="xsd:decimal" use="optional"/>
    <xsd:attribute name="LaborHours" type="xsd:decimal" use="optional"/>
    <xsd:attribute name="LotSize" type="xsd:decimal" use="optional"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>' ;
    GO
    -- Verify - list of collections in the database.
    select *
    from sys.xml_schema_collections
    -- Verify - list of namespaces in the database.
    select name
    from sys.xml_schema_namespaces
    -- Use it. Create a typed xml variable. Note collection name specified.
    DECLARE @x xml (ManuInstructionsSchemaCollection)
    GO
    --Or create a typed xml column.
    CREATE TABLE T (
    i int primary key,
    x xml (ManuInstructionsSchemaCollection))
    GO
    -- ////The following code statements are not used in order to create SampleDB
    -- Clean up
    ---DROP TABLE T
    ---GO
    ---DROP XML SCHEMA COLLECTION ManuInstructionsSchemaCollection
    ---Go
    ---USE Master
    ---GO
    ---DROP DATABASE SampleDB
    It worked and I got the following results:
    1 4 NULL sys 2009-04-13 12:59:13.390 2012-02-10 20:16:02.097
    65536 1 NULL ManuInstructionsSchemaCollection 2015-03-19 11:47:17.660 2015-03-19 11:47:17.660
    http://www.w3.org/2001/XMLSchema
    http://schemas.microsoft.com/sqlserver/2004/sqltypes
    http://www.w3.org/XML/1998/namespace
    http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions
    But, I don't undertand (i) what SCHEMA COECTION is, (ii) what <xsd:schema targetNamespace=.....</xsd:complexType> are, (iii) How I can specify my "project specific" schema in the Microsoft SCHEMA COLLECTION to check my xml file.
    2) I dived in the XQuery programmimng in SSMS2012 in the last few weeks. I used the examles of Ad-Hoc XML File Query by Seth Delconte (in
    httpS://www.simple-talk.com/content/print.aspx?article=1756) in my SSMS2012. They worked. But I don't understand the (i) Importing XML data using a function, (ii) Using the XQuery contans()
    function to find substrings, (iii)Efficiency comparisons in the article.
    Please kindly help me in enlightening me to resolve the difficulties listed in 1) and 2).
    Thanks,
    Scott Chang

Maybe you are looking for