How to print the symbol from xslt?

0

I am building a class generator from SQL database among several recommendations I chose to use XSLT 1.0, everything worked out pretty well, the inconvenience came when I wanted to print the symbol < since I need to print the following string "ICollections < Entidad >". I have reviewed several solutions on the web but without effectiveness. Use * .tt but I did not choose it because you do not need to execute when modifying it is executed. Thank you in advance for any information.

    
asked by Jkpala 27.12.2016 в 23:30
source

2 answers

0

XSLT only transforms the xslt tags, so, you've tried something like:

ICollections < <xsl:value-of select="Entidad "/> >

You can also make use of predefined XSLT entities, and use &#60; for "<"

You can see a list of HTML entities (it's in English, but values are what matters)

    
answered by 20.09.2017 в 09:28
0

If you are generating code, you should take into account:

  • The output of your xslt must be text:

    Example:

    <xsl:output method="text" version="1.0" encoding="ISO-8859-1" indent="no" />
    
  • Symbols such as "<" you can generate them by appealing to their numerical values and preventing them from being escaped by the parser. For example:

    <xsl:text disable-output-escaping="yes">&#60;</xsl:text>
    
answered by 19.09.2017 в 22:33