开发者

How put html tags into XSL stylesheet?

开发者 https://www.devze.com 2023-02-18 09:14 出处:网络
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 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:

How put html tags into XSL stylesheet?

Every value should be put to separate cell, like this:

How put html tags into XSL stylesheet?


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 (&lt; &gt;).

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

0

精彩评论

暂无评论...
验证码 换一张
取 消