EDN Admin
Well-known member
hello.<br/>
I would trasform an xsd in to an xml.<br/>
The result xml must have the name of the class, the base class and the types , names , and scope of member vars(private/pubblic) .<br/>
ex:<br/>
<br/>
<xs:element substitutionGroup="ifc:IfcBoundedCurve" name="IfcCompositeCurve" nillable="true" type="ifc:IfcCompositeCurve <br/>
</xs:element><br/>
<br/>
<xs:complexType name="IfcCompositeCurve <br/>
<xs:complexContent><br/>
<xs:extension base="ifc:IfcBoundedCurve <br/>
<xs:sequence><br/>
<xs:element name="Segments <br/>
<xs:complexType><br/>
<xs:sequence><br/>
<xs:element ref="ifc:IfcCompositeCurveSegment" maxOccurs="unbounded <br/>
</xs:element><br/>
</xs:sequence><br/>
<xs:attribute ref="ex:itemType" fixed="ifc:IfcCompositeCurveSegment <br/>
</xs:attribute><br/>
<xs:attribute ref="ex:cType" fixed="list <br/>
</xs:attribute><br/>
<xs:attribute use="optional" ref="ex:arraySize <br/>
</xs:attribute><br/>
</xs:complexType><br/>
</xs:element><br/>
<xs:element name="SelfIntersect" type="ex:logical <br/>
</xs:element><br/>
</xs:sequence><br/>
</xs:extension><br/>
</xs:complexContent><br/>
</xs:complexType><br/>
<br/>
this would be the result xml<br/>
<class name="IfcCompositeCurve" base="IfcBoundedCurve <br/>
<member scope="public" type="IfcCompositeCurveSegment Segments</member><br/>
</class><br/>
<br/>
I would create a simple class definition from the xsd ,<br/>
Is possible?<br/>
<br/>
The first problem is to find the complex type that have the name of type of element<br/>
<br/>
<xs:element substitutionGroup="ifc:IfcBoundedCurve" name="IfcCompositeCurve" nillable="true" type="ifc:IfcCompositeCurve <br/>
</xs:element><br/>
<br/>
in this case i find ifcCompositeCurve and i must go to this declaration for find all the values and attributes.<br/>
I must use variables?<br/>
how i navigate to....<br/>
<br/>
<xs:complexType name="IfcCompositeCurve <br/>
<br/>
thanks.
View the full article
I would trasform an xsd in to an xml.<br/>
The result xml must have the name of the class, the base class and the types , names , and scope of member vars(private/pubblic) .<br/>
ex:<br/>
<br/>
<xs:element substitutionGroup="ifc:IfcBoundedCurve" name="IfcCompositeCurve" nillable="true" type="ifc:IfcCompositeCurve <br/>
</xs:element><br/>
<br/>
<xs:complexType name="IfcCompositeCurve <br/>
<xs:complexContent><br/>
<xs:extension base="ifc:IfcBoundedCurve <br/>
<xs:sequence><br/>
<xs:element name="Segments <br/>
<xs:complexType><br/>
<xs:sequence><br/>
<xs:element ref="ifc:IfcCompositeCurveSegment" maxOccurs="unbounded <br/>
</xs:element><br/>
</xs:sequence><br/>
<xs:attribute ref="ex:itemType" fixed="ifc:IfcCompositeCurveSegment <br/>
</xs:attribute><br/>
<xs:attribute ref="ex:cType" fixed="list <br/>
</xs:attribute><br/>
<xs:attribute use="optional" ref="ex:arraySize <br/>
</xs:attribute><br/>
</xs:complexType><br/>
</xs:element><br/>
<xs:element name="SelfIntersect" type="ex:logical <br/>
</xs:element><br/>
</xs:sequence><br/>
</xs:extension><br/>
</xs:complexContent><br/>
</xs:complexType><br/>
<br/>
this would be the result xml<br/>
<class name="IfcCompositeCurve" base="IfcBoundedCurve <br/>
<member scope="public" type="IfcCompositeCurveSegment Segments</member><br/>
</class><br/>
<br/>
I would create a simple class definition from the xsd ,<br/>
Is possible?<br/>
<br/>
The first problem is to find the complex type that have the name of type of element<br/>
<br/>
<xs:element substitutionGroup="ifc:IfcBoundedCurve" name="IfcCompositeCurve" nillable="true" type="ifc:IfcCompositeCurve <br/>
</xs:element><br/>
<br/>
in this case i find ifcCompositeCurve and i must go to this declaration for find all the values and attributes.<br/>
I must use variables?<br/>
how i navigate to....<br/>
<br/>
<xs:complexType name="IfcCompositeCurve <br/>
<br/>
thanks.
View the full article