Dados de endereço simples em FSD

Este exemplo descreve dados de endereço simples, nos quais os campos podem estar em ordem diferente, dependendo da legenda. A marca de escolha é usada para determinar a linha de entrada mediante uma conciliação baseada na legenda.

Exemplo de entrada

name: John & Paul
number: 07593 128912
street: 1 Cousins Drive
name: P J Baird
street: 24b The Hamptons
number: 07382 213 877

Exemplo de saída

<addresses>
		<address>
				<name>John &amp; Paul</name>
				<number>07593 128912</number>
				<street>1 Cousins Drive</street>
		</address>
		<address>
				<name>P J Baird</name>
				<street>24b The Hamptons</street>
				<number>07382 213 877</number>
		</address>
</addresses>

Esquema

<?xml version='1.0'?>
<schema xmlns='http://www.systemsunion.com/2001/TD/SSTransform/fsd/' version='1.0'>
		<sequence name="addresses">
				<sequence
				name="address" output="yes" max-occur="0" min-occur="0">
						<choice
						output="no"
						max-occur="3" min-occur="3">
								<record record-sep="\r\n" min-occur="1" output="no">
										<field name="name-label"
										min-length="6"
										max-length="6"
										valid-value="name: "
										output="no"/>
										<field name="name"/>
								</record>
								<record record-sep="\r\n"
								min-occur="1" output="no">
										<field name="addr-label"
										min-length="8"
										max-length="8"
										valid-value="street: "
										output="no"/>
										<field name="street"/>
								</record>
								<record record-sep="\r\n"
								min-occur="1" output="no">
										<field name="num-label"
										min-length="8"
										max-length="8"
										valid-value="number: "
										output="no"/>
										<field name="number"/>
								</record>
						</choice>
						<record name="blank-line"
						output="no" max-occur="1"
						min-occur="0" record-sep="\r\n">
						<field output="no"/>
						</record>
				</sequence>
		</sequence>
</schema>