On 28/02/2025 12:50, Roger L Costello costello@xxxxxxxxx wrote:
Hi Folks,
In XML Schema \p{P} denotes the set of punctuation characters.
Is there a way in XSLT to output (display) the characters denoted by \p{P}
With "brute force", like this, perhaps?
B <xsl:template match="/" name="xsl:initial-template">
B B B <html>
B B B B B <head>
B B B B B B B <title>Test of puncation chars</title>
B B B B B </head>
B B B B B <body>
B B B B B B B <table>
B B B B B B B B B <thead>
B B B B B B B B B B B <tr>
B B B B B B B B B B B B B <th>Unicode</th>
B B B B B B B B B B B B B <th>Character</th>
B B B B B B B B B B B </tr>
B B B B B B B B B </thead>
B B B B B B B B B <tbody>
B B B B B B B B B B B <xsl:for-each select="1 to 1114111">
B B B B B B B B B B B B B <xsl:try>
B B B B B B B B B B B B B B B <xsl:variable name="char"
select="codepoints-to-string(.)"/>
B B B B B B B B B B B B B B B <xsl:if test="matches($char, '\p{P}')">
B B B B B B B B B B B B B B B B B <tr>
B B B B B B B B B B B B B B B B B B B <td>{.}</td>
B B B B B B B B B B B B B B B B B B B <td>{$char}</td>
B B B B B B B B B B B B B B B B B </tr>
B B B B B B B B B B B B B B B </xsl:if>
B B B B B B B B B B B B B B B <xsl:catch/>
B B B B B B B B B B B B B </xsl:try>
B B B B B B B B B B B </xsl:for-each>
B B B B B B B B B </tbody>
B B B B B B B </table>
B B B B B </body>
B B B </html>
B </xsl:template>
|