summaryrefslogtreecommitdiff
path: root/HelpOnXmlPages.mdwn
blob: f7f6750a3df6859e54c54fba6ba3afed51b1f1a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36


## XML Pages & XSLT Processing

If you have [[Python4Suite|http://4suite.org/]] 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|http://www.w3.org/TR/xml-stylesheet/]], 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|XsltVersion]] page. 


### Example


[[!format txt """
<?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

[[!inline pages="XsltVersion" quick="yes" raw="yes"]]