XInclude csv inside DocBook

Description

A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values

Ant4docbook aims to:

  • easy xinclude csv into docbook documents, as tables.

Examples

docbook-with-csv.xml

<?xml version="1.0" encoding="utf-8"?>
<article xmlns:xi="http://www.w3.org/2001/XInclude">
  <title>Test xinclude csv</title>
  <xi:include href="datas.csv"/>
  <xi:include href="datas.csv?status=WIP"/>
  <xi:include href="datas.csv?[status=WIP,task]"/>
  <xi:include href="markdown-with-csv.md" />
</article>

markdown-with-csv.md

Markdown
========

status=ALL
----------


![](./datas.csv)

status=WIP
-----------


![](./datas.csv?status=WIP)

select columns
----------


![](./datas.csv?[status=WIP,task])

datas.csv

status;task;time;priority
TODO;task1;1 d;high
WIP;task2;2 d;medium
DONE;task3;4 h;low

build.xml

<project name="docbook-with-csv" default="docbook-with-csv">
  <taskdef name="dbk"
    classname="net.sourceforge.ant4docbook.taskdefs.DocbookTask"
    classpath="PATH/TO/ant4docbook.jar"/>

  <target name="docbook-with-csv">
    <dbk file="docbook-with-csv.xml" tofile="docbook-with-csv.pdf" />
  </target>
</project>