Note that there are some explanatory texts on larger screens.

plurals
  1. POShowing True Type Font Personalized xslt 1.0
    primarykey
    data
    text
    <p>This is my xml:</p> <pre><code>&lt;SECTION_CONTENT_LIST_ITEM&gt; &lt;NTC_LIGHTLISTPRODUCT&gt; &lt;IMMUTABLE_ID&gt;9849&lt;/IMMUTABLE_ID&gt; &lt;LIGHT_STRUCTURE&gt; &lt;STRUCTURE_DESCRIPTION&gt;Boa \A a fuso \B segnale \C speciale \D&lt;/STRUCTURE_DESCRIPTION&gt; &lt;/LIGHT_STRUCTURE&gt; &lt;/NTC_LIGHTLISTPRODUCT&gt; &lt;/SECTION_CONTENT_LIST_ITEM&gt; </code></pre> <p>Focus your attention on the fields "Structure Description": You can see : "Boa \A a fuso \B segnale \C speciale \D"</p> <p>in correspondence of the values \A,\B,\C,\D my xslt code open a true type font file and translate this \a or \b or \c or \d in a special different character.</p> <p>My xslt code:</p> <pre><code>&lt;xsl:template name="simboli"&gt; &lt;xsl:param name="testo"/&gt; &lt;xsl:param name="separatore"/&gt; &lt;xsl:choose&gt; &lt;xsl:when test="contains($testo, $separatore)"&gt; &lt;xsl:value-of select="substring-before($testo, $separatore)"/&gt; &lt;span style="font-family:lol;font-size:9pt;"&gt; &lt;xsl:value-of select= "substring(., string-length(substring-before($testo, $separatore)) +2, 1)"/&gt; &lt;/span&gt; &lt;xsl:call-template name="simboli"&gt; &lt;xsl:with-param name="testo" select="substring(substring-after($testo, $separatore), 2, string-length(substring-after($testo, $separatore)))"/&gt; &lt;xsl:with-param name="separatore" select="$separatore"/&gt; &lt;/xsl:call-template&gt; &lt;/xsl:when&gt; &lt;xsl:otherwise&gt; &lt;xsl:value-of select="$testo"/&gt; &lt;/xsl:otherwise&gt; &lt;/xsl:choose&gt; </code></pre> <p></p> <p>You can see that I use font-family=lol &lt;---custom font</p> <pre><code>&lt;span style="font-family:lol;font-size:9pt;"&gt; &lt;xsl:value-of select= "substring(., string-length(substring-before($testo, $separatore)) +2, 1)"/&gt; &lt;/span&gt; </code></pre> <p>I open this XML file with Microsoft Word, I select Xslt file and after in output I get:</p> <p>Boa A a fuso f segnale u speciale s</p> <p>the letter f ,u and s should be a special character of LOL .</p> <p>My question is: Why converts only the first character?</p> <p>N.B: I controlled XSLT and running correct, the only problem is that convert only the first \A and jumps \B \C \D.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload