<?xml version="1.0"?>
<page-content>
<p>
You can use in xml content any tags, and write in <code>site-page.xsl</code>
section <code>match</code>.
</p>
<p>
For example there is tag <code><smile/></code> -> <smile/>.
<br/>
Xslt:
<source from="site-page.xsl"><![CDATA[
<xsl:template match="smile" mode="content">
<xsl:text>:)</xsl:text>
</xsl:template>]]>
</source>
</p>
<p>
Tag <code><email></code>: <code><email>123@123.com</email></code> -> <email>123@123.com</email>.
<br/>
Xslt:
<source from="site-page.xsl"><![CDATA[
<xsl:template match="email" mode="content">
<a href="mailto:{.}"><xsl:value-of select="."/></a>
</xsl:template>]]>
</source>
</p>
<p>
There is <code>section</code> tag, f.e.:
<code><section id="idsection" name="Name of Section" level="1"/></code>
<br/>xslt:
<source from="site-page.xsl"><![CDATA[
<xsl:template match="section" mode="content">
<a name="{@id}"/>
<xsl:element name="h{@level}"><xsl:value-of select="@name"/></xsl:element>
</xsl:template>]]>
</source>
</p>
<p>
By tag <code><sectionList/></code> you'll get content of page (list of sections).
<br/>xslt:
<source from="site-page.xsl"><![CDATA[
<xsl:template match="sectionList" mode="content">
<p>
<xsl:for-each select="/page-of-site/page-content/section">
<!-- indend before section name -->
<xsl:choose>
<xsl:when test="@level = 1"/>
<xsl:when test="@level = 2">  </xsl:when>
<xsl:when test="@level = 3">    </xsl:when>
</xsl:choose>
<a href="#{@id}"><xsl:value-of select="@name"/></a><br/>
</xsl:for-each>
</p>
</xsl:template>]]>
</source>
</p>
</page-content>
|