Subject:puzzle of XSD to XML output Author:Minollo I. Date:20 Mar 2006 06:15 PM
>1) what is these P1: prefix in the name-value pairsuch as ><p1:gfs_id>string</p1:gfs_id>?
Your XML Schema defines a target namespace, which means that all elements (not only the global ones, as you also defineselementFormDefault="qualified") need to be defined in a specific namespace. The XML Schema to XML wizard chooses to generate an explicit prefix for each namespace that should be used rather than overriding the default namespace; so, what you are seeing is equivalent to <gfs_id xmlns="http://gfs.swissre.com/edms/search_populated">string</gfs_id>
>2)what is the <!--Attribute send_date is optional--> come from? this
>field is not part of XSD at all?
As you may notice, that's an XML comment; it's output to help you understand the generated XML; you can control the generation of XML comments in Tools > Options > XML Schema Editor > XML Schema to XML
>3) It seems that XML didn't include the following simple type of
>XSD as the following...
I've asked engineering to take a look; I'll let you know if this is a limitation of the current wizard implementation.
>4) whers is <xsd:all> of XSD in XML?
It's implicit effect is to create the collection of the various elements as children of gfs_edms. What different behavior would you expect?
Subject:puzzle of XSD to XML output Author:Minollo I. Date:21 Mar 2006 09:33 AM
>>3) It seems that XML didn't include the following simple type of
>>XSD as the following...
>
>I've asked engineering to take a look; I'll let you know if this is a >limitation of the current wizard implementation.
Turns out this was a limitation in Stylus Studio 2006 (rel 1); Stylus Studio 2006 Release 2 fixes that problem. Release 2 will be available next week.
Subject:puzzle of XSD to XML output Author:chih chung Date:22 Mar 2006 05:15 PM Originally Posted: 22 Mar 2006 05:11 PM
Dear Minollo,<br>
<br>
Thank for your reply and it is very helpful. I have another question that you might help me:<br>
<br>
I have 1 XML (e.g. Casualty Certificate-v2_update.xml) that need to generate XML Schema. I use stylus studio version 46 to generate attached Casualty Certificate-v2_update_SS_46.xsd; I use stylus studio 2006 to generate attached Casualty Certificate-v2_update2006.xsd. I find that there are sigificant difference between these 2 XSDs such as the following:<br>
<br>
stylus studio version 46 output<br>
<xsd:element name='doc_type' type='xsd:string'><br>
</xsd:element><br>
<br>
stylus studio 2006 output <br>
<xs:element ref="doc_type"/><br>
<xs:element name="doc_type" type="xs:NCName"/><br>
<br>
My questions are:<br>
<br>
1) what is the difference between prefix xsd and prefix xs? <br>
2) if we convert both Schema XSDs to XML file, do we get the same XML output? if not, which XSD is better to use? <br>
<br>
Thank for your advice.<br>
<br>
Regards,<br>
Chih Chung <br>
<br>
<br>
Subject:puzzle of XSD to XML output Author:Minollo I. Date:22 Mar 2006 05:22 PM
I would rely on what Stylus Studio 2006 generates; Stylus Studio 2006 relies on Trang (http://www.thaiopensource.com/relaxng/trang.html) for XML to XML Schema conversions, while older versions used simpler algorithms.
xs or xsd, or any other prefix, are equivalent as long as they are assigned to the same namespace URI.