Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.milyn.org/xsd/smooks/csv-1.2.xsd"
           elementFormDefault="qualified"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:smooks="http://www.milyn.org/xsd/smooks-1.1.xsd"
           xmlns:smooks-csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">

    <xs:import namespace="http://www.milyn.org/xsd/smooks-1.1.xsd"/>

    <xs:annotation>
        <xs:documentation xml:lang="en">Smooks CSV Reader Configuration</xs:documentation>
    </xs:annotation>

    <xs:element name="reader" type="smooks-csv:reader" substitutionGroup="smooks:abstract-reader">
    	<xs:annotation>
    		<xs:documentation xml:lang="en">
    			CSV Reader Configuration.
                <p/>
                The CSV reader reads and validates a CSV stream and converts it to SAX events that Smooks
    		 	can process.
    		</xs:documentation>
    	</xs:annotation>
    </xs:element>

    <xs:complexType name="reader">
    	<xs:annotation>
    		 <xs:documentation xml:lang="en">CSV Reader</xs:documentation>
    	</xs:annotation>
    	<xs:complexContent>
    		<xs:extension base="smooks:abstract-reader">
                <xs:choice minOccurs="0" maxOccurs="1">
                    <xs:element name="singleBinding" type="smooks-csv:binding" />
                    <xs:element name="listBinding" type="smooks-csv:binding" />
                    <xs:element name="mapBinding" type="smooks-csv:mapBinding" />
                </xs:choice>
    			<xs:attribute name="fields" type="xs:string">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						Comma separated list of CSV record field names
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
    			<xs:attribute name="separator" type="smooks-csv:char" use="optional" default=",">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						 Field separator character.  Default of ','.
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
    			<xs:attribute name="quote" type="smooks-csv:char" use="optional" default="&#34;">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						Quote character.  Default of '"'.
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
    			<xs:attribute name="skipLines" type="xs:integer" use="optional" default="0">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						Number of lines to skip before processing starts. Default of 0.
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
    			<xs:attribute name="encoding" type="xs:string" use="optional" default="UTF-8">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						The encoding of the input stream. Default of 'UTF-8'
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
    			<xs:attribute name="rootElementName" type="xs:string" use="optional" default="csv-set">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						Name of csv root element.
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
    			<xs:attribute name="recordElementName" type="xs:string" use="optional" default="csv-record">
    				<xs:annotation>
    					<xs:documentation xml:lang="en">
    						Name of csv record element.
    					</xs:documentation>
    				</xs:annotation>
    			</xs:attribute>
                <xs:attribute name="indent" type="xs:boolean" use="optional" default="false">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            Add indentation character data to the generated event stream.  This simply makes
                            the generated event stream easier to read in its serialized form.  Useful for
                            testing etc.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
    		</xs:extension>
    	</xs:complexContent>
    </xs:complexType>

    <xs:complexType name="binding">
    	<xs:annotation>
            <xs:documentation xml:lang="en">
                CSV Binding Configuration.
                <p/>
                Supports simple automatic java binding of CSV records onto a bean based on the configured field
                names matching the target bean's property names.  For more complex binding, use the main Java
                binding configurations.
            </xs:documentation>
    	</xs:annotation>
    	<xs:complexContent>
    		<xs:extension base="smooks:abstract-resource-config">
                <xs:attribute name="beanId" type="xs:string" use="required">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The ID under which the created bean is to be bound in the bean context.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="class" type="xs:string" use="required">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The fully qualified bean Class name.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
    		</xs:extension>
    	</xs:complexContent>
    </xs:complexType>

    <xs:complexType name="mapBinding">
    	<xs:annotation>
            <xs:documentation xml:lang="en">
                CSV Binding Configuration.
                <p/>
                Supports simple automatic java binding of CSV records onto a bean based on the configured field
                names matching the target bean's property names.  For more complex binding, use the main Java
                binding configurations.
            </xs:documentation>
    	</xs:annotation>
    	<xs:complexContent>
    		<xs:extension base="smooks-csv:binding">
                <xs:attribute name="keyField" type="xs:string" use="required">
                    <xs:annotation>
                        <xs:documentation xml:lang="en">
                            The CSV field whose value is used as the Map key value.
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
    		</xs:extension>
    	</xs:complexContent>
    </xs:complexType>

    <xs:simpleType name="char">
    	<xs:restriction base="xs:string">
    		<xs:length value="1"></xs:length>
    	</xs:restriction>
    </xs:simpleType>
</xs:schema>
New to GrepCode? Check out our FAQ X