CSV serialization for result formats of new W3C parsing functions #2363
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes add support for the new CSV parsing result formats to
csv:serialize
. As forcsv:parse
result formats, the options that are used at parsing time can be supplied for serialization. For the new functions, these are the options conforming toFnCsvToArrays.CsvToArraysOptions
andFnParseCsv.ParseCsvOptions
. The actual options class and the serializer implementation are determined by inspecting the first item to be serialized:element(fn:csv)
document-node(element(fn:csv))
FnParseCsv.ParseCsvOptions
CsvXmlSerializer
element()
document-node()
CsvParserOptions
CsvDirectSerializer
array(*)
FnCsvToArrays.CsvToArraysOptions
CsvArraysSerializer
record(records, *)
CsvParserOptions
CsvXQuerySerializer
record(*)
FnParseCsv.ParseCsvOptions
CsvMapSerializer
Class
CsvSerializer.Delegator
has been added to delay this distiction until the first item is presented toserialize(Item)
.Test cases have been added in new class
CsvRoundtripTest
. These have been generated semi-atomatically by adding some temporary code to collect them while executing QT4 tests. The test cases