wp-select-csv

<xsl:include href="../plugins/tenandtwo-xslt-processor/xsl/wp.xsl" />

<xsl:call-template name="wp-select-csv">
    <xsl:with-param name="csv">spreadsheet.csv</xsl:with-param>
    <xsl:with-param name="separator">,</xsl:with-param>
    <xsl:with-param name="enclosure">"</xsl:with-param>
    <xsl:with-param name="escape">\</xsl:with-param>
    <xsl:with-param name="key_row" select="0" />
    <xsl:with-param name="col" select="0" />
    <xsl:with-param name="key_col" select="0" />
    <xsl:with-param name="key" select="''" />
    <xsl:with-param name="row" select="0" />
    <xsl:with-param name="class" select="'table'" />
</xsl:call-template>

TEST 1 :
wp-select-csv :
– csv = case-study-gsheets/Sheet1.csv
– separator = ,
– enclosure = \”
– escape = \\
– class = table table-striped

result :

ID NAME TITLE MONEY DATE DESCRIPTION
1001 name-one Name One $111.00 1/1/2001 this is some longer content for “Name One”
1002 name-two Name Two $222.00 2/2/1002 this is some longer content for name two with multiple lines
1003 name-three Name Three $333.00 3/3/2003 this is some longer content for <b>name three</b>
1004 name-four Name Four $444.00 4/4/2004 this is some longer content for name four
1005 name-five Name Five $555.00 5/5/2005 this is some longer content, for name five


TEST 2 :
wp-select-csv :
– csv = case-study-gsheets/Sheet1.tsv
– separator = \t
– enclosure = \”
– escape = \\
– class = table table-striped

result :

ID NAME TITLE MONEY DATE DESCRIPTION
1001 name-one Name One $111.00 1/1/2001 this is some longer content for “Name One”
1002 name-two Name Two $222.00 2/2/1002 this is some longer content for name two with multiple lines
1003 name-three Name Three $333.00 3/3/2003 this is some longer content for <b>name three</b>
1004 name-four Name Four $444.00 4/4/2004 this is some longer content for name four
1005 name-five Name Five $555.00 5/5/2005 this is some longer content, for name five


TEST 3 :
wp-select-csv :
– csv = case-study-gsheets/Sheet1.csv
– separator = ,
– enclosure = \”
– escape = \\
– row = 1,2
– class = table table-striped

result :

ID NAME TITLE MONEY DATE DESCRIPTION
1001 name-one Name One $111.00 1/1/2001 this is some longer content for “Name One”


TEST 4 :
wp-select-csv :
– csv = case-study-gsheets/Sheet1.csv
– separator = ,
– enclosure = \”
– escape = \\
– col = 2,6
– class = table table-striped

result :

NAME DESCRIPTION
name-one this is some longer content for “Name One”
name-two this is some longer content for name two with multiple lines
name-three this is some longer content for <b>name three</b>
name-four this is some longer content for name four
name-five this is some longer content, for name five


TEST 5 :
wp-select-csv :
– csv = case-study-gsheets/Sheet1.csv
– separator = ,
– enclosure = \”
– escape = \\
– key_row = 1
– col = ID,NAME
– key_col = ID
– key = 1003,1004
– row = 1
– class = table table-striped

result :

ID NAME
1003 name-three
1004 name-four