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
Udo BorkowskiSubject: Creating Schema from XML
Author: Udo Borkowski
Date: 19 Aug 2003 05:53 AM
Stylus Studio has the nice feature that it can create an XMLSchema from an XML file (with some kind of guessing at the application's side).

Is there a way to automatically generate such an XMLSchema not based on just one XML file but with several XML files as input? For all these XML files the same XMLSchema should apply. So the "generated" XMLSchema would need to consider all XML files, and all these XML files must be valid with respect to the XMLSchema. E.g. this would typically lead to some kind of "union" on all tags used in the files, some more "choices", less "required" attributes etc.

Or does some (external) tool exist that accomplished that task?

Postnext
Alberto MassariSubject: Re: Creating Schema from XML
Author: Alberto Massari
Date: 19 Aug 2003 06:10 AM
At 12.16 19/08/2003, stylus-studio-tech Listmanager wrote:
>From: "Udo Borkowski"
>[...]
>Is there a way to automatically generate such an XMLSchema not based on
>just one XML file but with several XML files as input? For all these XML
>files the same XMLSchema should apply. So the "generated" XMLSchema would
>need to consider all XML files, and all these XML files must be valid with
>respect to the XMLSchema. E.g. this would typically lead to some kind of
>"union" on all tags used in the files, some more "choices", less
>"required" attributes etc.
>
>Or does some (external) tool exist that accomplished that task?

You can try using TRANG directly, the utility from Thai Open Source
Software Center that we bundle. You can find it in the
[StylusDir]\bin\trang directory.
A sample command line could be:

java -cp trang.jar;jing.jar;crimson.jar
com.thaiopensource.relaxng.translate.Driver -I xml -O xsd input1.xml
input2.xml input3.xml output.xsd

Hope this helps,
Alberto


Postnext
Lee HumphriesSubject: Re: Creating Schema from XML
Author: Lee Humphries
Date: 19 Aug 2003 07:15 PM
Hi Alberto,

How about adding this as a document wizard? I find the process of creating an XSD from an XML instance a little tedious and frankly somewhat obscure. When I haven't done it for a while a always have to hunt around around until I remember what to do.

Adding a document wizard to call trang with a list of one or more XML documents would be fantastic.

Regards, Lee




Postnext
Minollo I.Subject: Re: Creating Schema from XML
Author: Minollo I.
Date: 19 Aug 2003 07:30 PM
You can actually create your own custom document wizard (v5.0); take a look
at the "DTD to XML Schema" wizard in Stylus: that's based on Trang and is
configured as a custom document wizard.

Minollo

Postnext
b pankeySubject: Re: Creating Schema from XML
Author: b pankey
Date: 18 May 2006 01:16 PM
I am a newbee. I want to create a schema doc from an xml data file. Unfortunatly, how this is done, other than by hand coding, is unclear to me. So, from what I have been reading on this string, it appears that stylus studio can do this. How.

bp

Posttop
Minollo I.Subject: Re: Creating Schema from XML
Author: Minollo I.
Date: 18 May 2006 01:25 PM
Two possible ways:

- Open the XML document, and select XML > Create Schema from XML Content
- Select File > Document Wizards... and choose XML to XML Schema

 
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.