Norman Walsh wrote:
Dan Brickley <[EMAIL PROTECTED]> writes:
(copying www-archive... why not..?)

Well I finally decided to learn what XProc does. I think I'm getting
the idea. But one thing caught my eye,

        5.10 Read/Write Non-XML File
        Read a CSV file and convert it to XML.
        Process the document with XSLT.
        Convert the result to a CSV format using text serialization.
[...]
...in the requirements and use-cases doc. Also the main spec has a
brief mention of a CSV scenario. But I can't really find much more
detail on what can be done with CSV.

I think that example should probably be reworded to make it clear(er)
that it's only hypothetical. The XProc spec doesn't provide any
builtin steps that perform any sort of non-XML-to-XML transformations
(beyond some unescape markup cruft).

That part of the spec is simply observing that one could, if one
wished, define an extension step that transformed arbitrary data into
XML. The requirement that XML flows between steps doesn't place any
other limits on what a step can do.

Ah okay, got it :)

...and it occured to me that maybe xproc is a nice environment for
such things if there will ever be a standard set of CSV handlers (in
xslt or native code).

Thinking out loud...

If you've got an idea about what a CSV-to-XML step could/should do,
I'd be happy to implement it for you and add it to the exproc.org site
as an (interoperable) extension.

Now there's an offer :) Hmm. In the general case ... answer is, I'm not sure. In the reverse-SPARQL case, I don't have a full design yet, but the idea would be to extract some form of structured comments (ie. mappings) from the top of the CSV, and then the rest of the CSV bulk data could be turned into XML along the lines of http://www.w3.org/TR/rdf-sparql-XMLres/ ?

But then if this is just the reverse-SPARQL case, I'm not sure in xproc terms whether it is possible for two output files to be the output from CSV-to-XML and then both be the input to some other step that mapped each CSV record into a set of RDF triples. Does that sound xprocable?

cheers,

Dan

--
http://danbri.org/

Reply via email to