Title: Castor DTX - xml output problems

Hi there,

I'm busy going through the dtx examples from castor but am not sure how to output the xml. The product.xsd is full of errors - could this be the problem? I have changed the product schema to:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

        <xs:element name="product" type="ProductType"/>
        <xs:complexType name="ProductType">
                <xs:sequence>
                        <xs:element name="name" type="xs:string" minOccurs="0"/>
                        <xs:element name="price" type="xs:string" minOccurs="0"/>
                </xs:sequence>
                <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
</xs:schema>

How does Castor use the schema to output xml - does it use the element names or does it only use it to validate? When I run the Test it gets all the data (seen in the PrintWriter) but it is in text format. Do you use the DTXEngine to specify the xml output???

Help much appreciated
Jamie


Reply via email to