Subject:Creating example document from a supplied Schema Author:Weems Hutto Date:27 Dec 2005 09:13 AM
We received a schema that was created using another XML edit and wish to use that schema to create an example data document using Stylus studio. Stylus is able to open and work with the document without any errors, but is apparently thinking that the Schema is the original XML document, not a schema of the original document.
How do you get Stylus studio to recognize the schema file as a schema.
The schema file name is ratingSchema.xsd.
This is the start and ending of the ratingSchema.xsd document.
Subject:Creating example document from a supplied Schema Author:Tony Lavinio Date:27 Dec 2005 09:49 AM
That document is not an XML Schema. It is in another schema
language; most likely XDR, which is an obsolete schema-like format
used by some older tools (notably Biztalk).
Subject:Creating example document from a supplied Schema Author:Weems Hutto Date:27 Dec 2005 10:38 AM
Thanks for your prompt response.
I downloaded and extracted the XSD converter on the file as you suggested. The converter produced a much larger file, 301k versus 144k. But now Stylus Studio display only 'OOOOOOOOOO' characters in the text view when it opens this larger converted file. But I can open and read the converted file in my text editor. I see indented XML text as expected.
I am using the enterprize edition demo version of Stylus Studio. Is this a limitation of the demo version?
Subject:Creating example document from a supplied Schema Author:Minollo I. Date:27 Dec 2005 10:58 AM
Weems,
It looks like the converter utility Tony pointed you at creates an XML Schema output apparently encoded as utf-8 or ascii; but the document claims (in the PI at the top) that it's utf-16... which is clearly wrong. Being Stylus Studio an XML editor it must interpret the file accoding to what the XML PI says, and that's why you see the bogus charachters.
You can workaround the problem by manually editing the XML document and removing the 'encoding="UTF-16"' attribute in the top PI of the file generated by the XDR-to-XML Schema converter.
Subject:Creating example document from a supplied Schema Author:Minollo I. Date:27 Dec 2005 11:04 AM Originally Posted: 27 Dec 2005 11:05 AM
...another problem I just noted with the XDR-to-XML Schema converter, is that it generates a reference to an old/discontinued XML Schema namespace URI... which won't be recognized by Stylus Studio or other XML Schema editors as an XML Schema.
Subject:Creating example document from a supplied Schema Author:Weems Hutto Date:27 Dec 2005 12:15 PM
Minollo - yes!!!
After making that change to the tag, Stylus Studio now recognizes the converted XSD file as a Schema and will now generate XML Documents from it.
Thanks for your help.
Weems