I have python script that converts data.xml to html using stylesheet.xsl. And i have a problem w开发者_开发技巧ith inserting html tags into the stylesheet. I would like to put all the generated values into table cells. maybe someone experienced could help me?
xsl:choose
xsl:when test="$NECoords = 'true'"
xsl:value-of select="concat($PtStr, $NthStr, $EastStr, $ElevStr, ' ', $TimeStr, $hzPrec, $vtPrec, $PDOP, $aRMS, $NbrSat, $NbrInt)"/>
/xsl:when>
I would like to know how to put above concatenated strings into table cells in output html file, like:
Every value should be put to separate cell, like this:how about using
string-join( (concat('<td>',$firsElement),..(elements)..,concat($lastElement,'</td>') ) ,'</td><td>')
I think that this code would generate something like
<td>$firstElement</td><td>$secEl</td><td>..(n-cells)..</td><td>$lastElement</td>
I don't know if there are problems with the <td>
elements, in this case you have to escape them (< >
).
maybe you have to add this snippet to the xsl:stylesheet declaration.
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
http://www.w3schools.com/xpath/xpath_functions.asp#string
精彩评论