1. Yes, using an XML Schema to validate the record, see the "countries"
example. Records that do not pass validation will be discarded, and may be
written to a file or database table.
2. Yes, using a sx:restrictRecordFilter, a child sx:recordTest element to
test the record with an XPATH boolean expression, and a child
sx:unmatchedRecord element to handle any discards, which as in (2) may be
written to a file or database table.
3. Set the attribute lineDelimited="no" in sx:flatFile.
4. The flat file text formatting options only apply to flat file writers.
But you can control the formatting of field values to XML element and
attribute values by using any XSLT formatting functions in select
expressions in the sx:fieldElementMap and sx:fieldAttributeMap elements, use
the select attribute rather than the field attribute.
-- Daniel
----- Original Message -----
From: "Mohit Gupta | Daffodil Software Ltd."
To: ser...@li...
Sent: Friday, August 10, 2007 3:41 AM
Subject: [Servingxml-help] Urgent Query - Mandatory/optional field
|conditions for flat file
Hi,
I am using ServingXML to convert some flat file data to XML format. It is a
very nice tool.
I seek some urgent help for a few points, whether these are achievable using
ServingXML or not? Points are:
Can we declare any field as mandatory or optional in flat file structure?
Can we specify condition for any field like
3rd field in a record should exist only if value of 2nd field is 'male'.
I.e. condition in a single record, where existence of one field is dependent
on some value in any previous field in same record.
While parsing flat file, tool is not ignoring the record delimiters and so
new line character is also coming into fixed width counting. What can be the
solution for this?
PadCharacter, and justify attributes are not working while converting flat
file to xml. Is there any solution? In code, LineFormatter is only working
with PositionalFieldWriter.
Solution for these points is very important for our project. Please help
urgently.
Regards,
--
Mohit Gupta
Daffodil Software Ltd | IInd floor, Vipul Orchid Plaza, Sec - 54, Gurgaon
Tel: +91-124-414-5800 | Cell: +91-981-007-0148 | Fax: +91-124-414-5801
E-Mail: moh...@da... | Web: www.daffodilsw.com
Experience is the only teacher we have. We may talk and reason all our
lives, but we shall not understand a word of truth until we experience it
ourselves.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Servingxml-help mailing list
Ser...@li...
https://lists.sourceforge.net/lists/listinfo/servingxml-help
|