KernelNewbies:

XML-sidor och XSLT-processning

Om du har Python4Suite installerat på ditt system så är det möjligt att spara XML-dokument som sidor. Det är viktigt att dessa sidor börjar med en XML-deklaration "<?xml ...>" på sidans allra första rad. Det "stylesheet" som ska användas måste också specificeras. Detta görs genom att använda ett standard-xml-stilmall skript-instruktion, med namnet på sidan som innehåller stilmallen som parameter till "href".

Se följande exempel för detaljer. Det kan också ses på XsltVersion-sidan.

Example

<?xml version="1.0" encoding="ISO-8859-1"?>

<?xml-stylesheet href="XsltVersion" type="text/xml"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:output method="html" omit-xml-declaration="yes" indent="no"/>

   <xsl:template match="/">
     This Wiki is running an XSLT engine by
     <xsl:value-of select="system-property('xsl:vendor')"/>
     (<a href="{system-property('xsl:vendor-url')}"><xsl:value-of select="system-property('xsl:vendor-url')"/></a>)
     implementing XSLT v<xsl:value-of select="system-property('xsl:version')"/>
   </xsl:template>

</xsl:stylesheet>

Hur det ser ut

XSLT option disabled, please look at HelpOnConfiguration.
<?xml version="1.0"?>

<?xml-stylesheet href="XsltVersion" type="text/xml"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:output method="html" omit-xml-declaration="yes" indent="no"/>

   <xsl:template match="/">
     This Wiki is running an XSLT engine by
     <xsl:value-of select="system-property('xsl:vendor')"/>
     (<a href="{system-property('xsl:vendor-url')}"><xsl:value-of select="system-property('xsl:vendor-url')"/></a>)
     implementing XSLT v<xsl:value-of select="system-property('xsl:version')"/>
   </xsl:template>

</xsl:stylesheet>