jdoy
December 5th, 2003, 04:57 AM
Hi all,
Well, one more time i have a (basic) question... I need to transform this time an X file to an XML file with an XSL stylesheet transformation, but i don't exactly how to proceed especially with the namespaces....
Look, by example i have this XSD file:
<xs:element name="today">
<xs:complexType>
<xs:sequence>
<xs:element name="field">
<xs:complexType>
<xs:attribute name="int" use="required"/>
<xs:attribute name="false" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="delta">
<xs:complexType>
<xs:attribute name="int" use="required"/>
<xs:attribute name="false" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="date" use="required"/>
<xs:attribute name="public" use="optional"/>
<xs:attribute name="purpose" use="optional" default="Return today at 00h00'00''"/>
</xs:complexType>
</xs:element>
and as result i'd like to have this corresponding XML sample:
<function scope="public" name="today" purpose="Return today at 00h00'00''">
<return-type>date</return-type>
<parameter by-ref="false">
<name>field</name>
<type>int</type>
</parameter>
<parameter by-ref="false">
<name>delta</name>
<type>int</type>
</parameter>
</function>
So how can i do that through an XSL stylesheet??? Thanx a lot for helping if you can....
Well, one more time i have a (basic) question... I need to transform this time an X file to an XML file with an XSL stylesheet transformation, but i don't exactly how to proceed especially with the namespaces....
Look, by example i have this XSD file:
<xs:element name="today">
<xs:complexType>
<xs:sequence>
<xs:element name="field">
<xs:complexType>
<xs:attribute name="int" use="required"/>
<xs:attribute name="false" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="delta">
<xs:complexType>
<xs:attribute name="int" use="required"/>
<xs:attribute name="false" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="date" use="required"/>
<xs:attribute name="public" use="optional"/>
<xs:attribute name="purpose" use="optional" default="Return today at 00h00'00''"/>
</xs:complexType>
</xs:element>
and as result i'd like to have this corresponding XML sample:
<function scope="public" name="today" purpose="Return today at 00h00'00''">
<return-type>date</return-type>
<parameter by-ref="false">
<name>field</name>
<type>int</type>
</parameter>
<parameter by-ref="false">
<name>delta</name>
<type>int</type>
</parameter>
</function>
So how can i do that through an XSL stylesheet??? Thanx a lot for helping if you can....