2016-05-13 31 views

回答

0

您必須聲明的實體:

<!DOCTYPE para [ 
<!ENTITY ast "*"> 
]> 
<para>here is entity "&ast;" </para> 

的XSLT代碼只是轉換parap元素:

<?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    exclude-result-prefixes="xs" 
    version="2.0"> 

    <xsl:template match="@* | node()"> 
     <xsl:copy> 
      <xsl:apply-templates select="@* , node()"/> 
     </xsl:copy> 
    </xsl:template> 

    <xsl:template match="para"> 
     <p> 
      <xsl:apply-templates select="@* , node()"/> 
     </p> 
    </xsl:template> 
</xsl:stylesheet> 
+0

感謝你的先生!我搜索另一個備用。 –