XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Weems HuttoSubject: 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.

<?xml version="1.0"?><!DOCTYPE Schema []><Schema name="sessionSchemaV1" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:dct="duckcreek">
<AttributeType name="id" dt:type="id">
<description>Line ID</description>
</AttributeType>
<AttributeType name="manuscript" dt:type="string"/>
<AttributeType name="refObject" dt:type="string"/>
<AttributeType name="flag" dt:type="string"/>
<AttributeType name="category" dt:type="string"/>
...
<ElementType name="Producer" content="eltOnly" model="closed" order="many">
<attribute type="id" required="no"/>
<element type="userName" minOccurs="0" maxOccurs="1"/>
<element type="fullName" minOccurs="0" maxOccurs="1"/>
<element type="NewQuoteProducer" minOccurs="0" maxOccurs="1"/>
</ElementType>
<ElementType name="NewQuoteProducer" content="textOnly" dt:type="string"/>
</Schema>

Thanks for your help.
Weems

Postnext
Tony LavinioSubject: 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).

There is a converter to turn it into official W3C XML Schema here
http://www.microsoft.com/downloads/details.aspx?familyid=5f6505a1-359e-47bf-8963-f4affaf87566&languageid=f49e8428-7071-4979-8a67-3cffcb0c2524&displaylang=en

Postnext
Weems HuttoSubject: 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?

Thanks again.
Weems


Postnext
Minollo I.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.

Hope this helps,
Minollo

Postnext
Minollo I.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.

You should change:
<xsd:schema version="1.0" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
...into...
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Minollo

Posttop
Weems HuttoSubject: 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

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.