I have an XML IS schema and I want to create an IS document which depends on the IS Schema.
Can someone please tell me if its possible to create an xml IS document from an IS schema (I am using wM Developer 6.1).
Please go through the xml schema guide.
Yes,you can create Documenttype using schema in the developer it will prompt you the schema.xsd location.
In Developer, if you just right-click on a folder and choose New DocumentType, you will not have the option of creating the document type from an existing XML schema or XML document (instance).
However, when you choose “All Choices” from the right-click menu or when you use File-New or CTRL-N and pick Document Type, you will be stepped through a wizard that will prompt you for the source of the document type. When you pick XML Schema as the source, you will be prompted for the location of an XSD file.
Your schema will need to have one or more elements defined (not just complex types or simple types). You will be prompted to pick one of the elements in the schema as the root node of your document type.
Thank you all,
I have an existing schema defined on the integration server. I wanted to know if I can use this schema to create a IS document, without using a XSD file
XML Schema - Describes the structure and constraints of an XML document. An XML Schema Definition is normally contained within an .xsd file.
IS Schema (sometimes called XML IS Schema?) - Provides a formal description of the structure and content for a valid instance document. IS Schemas can be created from XML Schemas, DTDs or XML document instances. IS Schema and XML Schema are not equivalent.
IS FF Schema - Details the structure of a document, including delimiters, records, and repeated record structures. IS FF Schema and IS Schema are not related.
An IS document type can be created from an IS FF schema directly on the schema’s Flat File Structure tab.
An IS document type cannot be created directly from an IS schema. If the original .xsd that was used to create the IS schema is not available (or the schema was created by hand), you can use pub.schema:createXSD to create one. The resulting xsd can then be used to create an IS document type using the steps that rmg and Mark mention.
There are a few things I dislike about the current wizard that creates document types from XML schemas:
- If the XML schema (XSD) contains an element called “Order”, you would naturally name your document type “Order” as well. However, when the document type is created your Order document type will contain as its first child a document type called, you guessed it, “Order”. I almost always remove this “extra” document type and outdent its contents. The wizard should give you an option to do this automatically.
- The new document type wizard will generate namespace prefixes for any namespace qualified elements naming them “ns”, “ns1”, “ns2”, etc. If you don’t want to use those default prefix values you have to manually rename them in Developer. There should be an option to let you specify the namespace prefix values if you don’t want to use the default values [Update: In some cases the prefixes that are specified in the XML schema are actually used in the generated doc type. However, I haven’t been able to isolate the specific setting in the schema that makes this so.]
- If you create IS XML Schemas from XSD files prior to creating document types from the same XML schema file using the wizard, you get a warning message informing you ever so helpfully that definitions for those elements already exist. Of course they exist, I just created them explicitly, intentionally and necessarily. What a useless, time wasting (and confusing for new users) warning message. At least put a “never, ever show this stupid message again” checkbox on it.
- Document types created from an XSD can not be refreshed when the underlying XSD changes. You have to delete or rename them taking care to “ignore usages” and then completely recreate them from scratch. Lots of unnecessary extra steps.
- While not really a new doc type wizard issue, maintaining a static “snapshot” IS schema that is a) proprietary and b) not aware of any changes to the underlying XML schema (XSD) is very painful. Changes to the underlying schema are not detected automatically nor can I simply click a button to “refresh” the snapshot IS schema.
- As pointed out by Sidnair’s post, you can’t create doc types from IS schemas created from an XML schema definition (XSD). This is another strike against the static, proprietary IS schemas approach.
Hello, just to make sure I understand it correctly and stop wasting time looking for solution:
- there is no way to update document type once underlying schema has changed. If your schema (or any schema included/ imported into source schema) changes, you have to create all documents and IS schemas from scratch again. Correct?
- IS schema is more or less useless as long as it is just snapshot of xsd, but does not have any link to source xsd and can not be used as an input for document type. I didn’t get differences between IS Schema and xml schema definition except that IS schema is WM proprietary invention. Is that correct?
Yes, the IS schema is a snapshot in time and is not linked in any way to the underlying XSD. When the XSD changes, you only have to recreate those doc types that were affected by the schema changes, you can also modifiy the doc types directly if the changes are minor.
This is similar to changing the structure (columns, data types, etc.) of an underlying DBMS table. Nothing magical will update your code (Flow, java, C#, Perl, etc.) for you. This places a healthy emphasis on nailing down requirements up front and spending adequate time on design. However, just like databases, XML data structures can and will change during the project.
Well, not useless, just not as useful as it could/should be.