Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

HelpOnXmlPages: Difference between revisions

From ZeroWiki
(Repair MoniWiki formatting after migration)
(Repair MoniWiki formatting after migration)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== XML Pages & XSLT Processing ==
== XML Pages & [[XSLT]] Processing ==
If you have Python4Suite installed in your system, it is possible to save XML documents as pages. It's important to start those pages with an XML declaration "
If you have Python4Suite installed in your system, it is possible to save XML documents as pages. It's important to start those pages with an XML declaration "
  <?xml ...>
  <?xml ...>
" in the very first line. Also, you have to specify the stylesheet that is to be used to process the XML document to HTML. This is done using a [http://www.w3.org/TR/xml-stylesheet/ standard "xml-stylesheet" processing instruction], with the name of a page containing the stylesheet as the "{{{href}}}" parameter.
" in the very first line. Also, you have to specify the stylesheet that is to be used to process the XML document to HTML. This is done using a [http://www.w3.org/TR/xml-stylesheet/ standard "xml-stylesheet" processing instruction], with the name of a page containing the stylesheet as the " href" parameter.


See the following example for details, which can also be found on the XsltVersion page.
See the following example for details, which can also be found on the [[XsltVersion]] page.
----
----
/!\ MoniWiki support two type of XSLT processors. One is the xslt.php, the other is xsltproc.php. xslt.php need a xslt module for PHP and xsltproc.php need the xsltproc.
/!\ [[MoniWiki]] support two type of [[XSLT]] processors. One is the xslt.php, the other is xsltproc.php. xslt.php need a xslt module for PHP and xsltproc.php need the xsltproc.


MoniWiki use xsltproc.php by default.
[[MoniWiki]] use xsltproc.php by default.
=== Example ===
=== Example ===
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <?xml version="1.0" encoding="ISO-8859-1"?>
Line 28: Line 28:


=== Display ===
=== Display ===
[[Include(XsltVersion)]]
{{:[[XsltVersion]]}}
----
----
[[Navigation(HelpOnEditing)]]
<!-- MONIWIKI Navigation(HelpOnEditing) -->
* [[HelpOnEditing]]

Latest revision as of 00:34, 29 March 2026

XML Pages & XSLT Processing

If you have Python4Suite installed in your system, it is possible to save XML documents as pages. It's important to start those pages with an XML declaration "

<?xml ...>

" in the very first line. Also, you have to specify the stylesheet that is to be used to process the XML document to HTML. This is done using a standard "xml-stylesheet" processing instruction, with the name of a page containing the stylesheet as the " href" parameter.

See the following example for details, which can also be found on the XsltVersion page.


/!\ MoniWiki support two type of XSLT processors. One is the xslt.php, the other is xsltproc.php. xslt.php need a xslt module for PHP and xsltproc.php need the xsltproc.

MoniWiki use xsltproc.php by default.

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>

Display

{{:XsltVersion}}