⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stylesheet.xsl

📁 XML tutorial
💻 XSL
字号:
<!DOCTYPE stylesheet [ <!ENTITY eacute '&#233;'> <!ENTITY ugrave '&#249;'> <!ENTITY agrave '&#224;'> <!ENTITY egrave '&#232;'> <!ENTITY icirc  '&#238;'> <!ENTITY ecirc  '&#234;'> <!ENTITY ccedil '&#231;'> ]><xsl:stylesheet  xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version="1.1"  xmlns="http://www.w3.org/1999/xhtml"> <xsl:import href="../../../share/XSLT/descriptionTop.xslt"/><xsl:include href="../../../share/XSLT/xhtml.xsl"/><xsl:param name="pwd"/><xsl:param name="basePath"/><xsl:param name="lang">eng</xsl:param><xsl:param name="langsuffix"/><xsl:variable name="zvonItemid" select="document('../Data/frontpage.xml')/frontPage/@idref"/><xsl:output method="html"/><xsl:preserve-space elements="doc"/><xsl:variable name="translationLabels"><labels xmlns=""><headContentsTitle>    <text lang="eng">XML Tutorial - Contents</text>    <text lang="cze">XML Tutorial - Obsah</text>    <text lang="spa">Tutorial de XML - Contenidos</text>    <text lang="por">Tutorial XML - Conte&#xFA;do</text>    <text lang="tur">XML kaynak dersleri - &#x130;&#xE7;eriklers</text>    <text lang="dut">XML Tutorial - Inhoud</text>    <text lang="ger">XML Tutorial - Inhalt</text>    <text lang="fre">Tutoriel XML - Contenu</text>    <text lang="ita">Corso XML - Contenuto</text>    <text lang="chi">XML 教程 - 目录</text></headContentsTitle><contentsTitle>    <text lang="eng">Contents</text>    <text lang="cze">Obsah</text>    <text lang="spa">Contenidos</text>    <text lang="por">Conte&#xFA;do</text>    <text lang="tur">&#x130;&#xE7;erikler</text>    <text lang="dut">Inhoud</text>    <text lang="ger">Inhalt</text>    <text lang="fre">Contenu</text>    <text lang="ita">Contenuto</text>    <text lang="chi">目录</text></contentsTitle><exampleText>    <text lang="eng">Example</text>    <text lang="cze">P&#345;&#237;klad</text>    <text lang="spa">Ejemplo</text>    <text lang="por">Exemplo</text>    <text lang="tur">&#xD6;rnek</text>    <text lang="dut">Voorbeeld</text>    <text lang="ger">Beispiel</text>    <text lang="fre">Exemple</text>    <text lang="ita">Esempio</text>    <text lang="chi">实例</text></exampleText><prev>    <text lang="eng">Prev</text>    <text lang="cze">P&#345;ede&#353;l&#253;</text>    <text lang="spa">Anterior</text>    <text lang="por">Anterior</text>    <text lang="tur">&#xD6;nceki</text>    <text lang="dut">Vorig</text>    <text lang="ger">Zur&#xFC;ck</text>    <text lang="fre">Pr&eacute;c&eacute;dent</text>    <text lang="ita">Precedente</text>    <text lang="chi">前页</text></prev><next>    <text lang="eng">Next</text>    <text lang="cze">N&#225;sleduj&#237;c&#237;</text>    <text lang="spa">Siguiente</text>    <text lang="por">Pr&#xF3;xima</text>    <text lang="tur">Sonraki</text>    <text lang="dut">Volgend</text>    <text lang="ger">Weiter</text>    <text lang="fre">Suivant</text>    <text lang="ita">Successivo</text>    <text lang="chi">后页</text></next><descriptionTitle>    <text lang="eng">Description</text>    <text lang="cze">Popis</text>    <text lang="spa">Descripci&#243;n</text>    <text lang="por">Descri&#xE7;&#xE3;o</text>    <text lang="tur">Tan&#x131;mlama</text>    <text lang="dut">Beschrijving</text>    <text lang="ger">Beschreibung</text>    <text lang="fre">Description</text>    <text lang="ita">Descrizione</text>    <text lang="chi">描述</text></descriptionTitle><wellFormedSourceTitle>    <text lang="eng">Well-formed documents</text>    <text lang="cze">Spr&#225;vn&#283; form&#225;tovan&#233; dokumenty</text>    <text lang="spa">Documento bien formado</text>    <text lang="por">Documento bem formado</text>    <text lang="tur">Do&#x11F;ru-form&#xFC;le edilmi&#x15F; dok&#xFC;manlar</text>    <text lang="dut">Goed gevormde documenten</text>    <text lang="ger">Richtig geformte Dokumente</text>    <text lang="fre">Documents bien form&eacute;s</text>    <text lang="ita">Documenti ben formati</text>    <text lang="chi">格式正规的文档</text></wellFormedSourceTitle><errorSourceTitle>    <text lang="eng">Documents with errors</text>    <text lang="cze">Dokument s chybami</text>    <text lang="spa">Documento con errores</text>    <text lang="por">Documentos com erros</text>    <text lang="tur">Hatal&#x131; dok&#xFC;manlar</text>    <text lang="dut">Documenten met fouten</text>    <text lang="ger">Dokument mit Fehler</text>    <text lang="fre">Documents erron&eacute;s</text>    <text lang="ita">Documenti con errori</text>    <text lang="chi">有错误的文档</text></errorSourceTitle><top>    <text lang="eng">Top</text>    <text lang="cze">Nahoru</text>    <text lang="spa">Arriba</text>    <text lang="por">Topo</text>    <text lang="tur">&#xDC;st</text>    <text lang="dut">Top</text>    <text lang="ger">Oben</text>    <text lang="fre">D&eacute;but</text>    <text lang="ita">Inizio</text>    <text lang="chi">顶部</text></top></labels></xsl:variable><xsl:template match="allExamples">  <xsl:apply-templates select="//XTutorial" mode="example"/>  <html>    <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>      <link rel="stylesheet" type="text/css" href="../CSS/tutorial.css"/>      <title> <xsl:value-of select="$translationLabels/labels/headContentsTitle/text[@lang = $lang]"/></title>      <base target="_top"/>    </head>    <body>            <xsl:call-template name="share_descriptionTop">	<xsl:with-param name="id" select="$zvonItemid"/>	<xsl:with-param name="lang" select="$lang"/>	<xsl:with-param name="multilang">yes</xsl:with-param>	<xsl:with-param name="languages">	  <language lang="eng" href="../General/contents.html"/>	  <language lang="cze" href="../General_cze/contents.html"/>	  <language lang="spa" href="../General_spa/contents.html"/>	  <language lang="por" href="../General_por/contents.html"/>	  <language lang="tur" href="../General_tur/contents.html"/>	  <language lang="dut" href="../General_dut/contents.html"/>	  <language lang="rus" href="../General_rus/contents.html"/>	  <language lang="ger" href="../General_ger/contents.html"/>	  <language lang="fre" href="../General_fre/contents.html"/>	  <language lang="ita" href="../General_ita/contents.html"/>	  <language lang="chi" href="../General_chi/contents.html"/>	</xsl:with-param>      </xsl:call-template>            <!-- table class="hangingMenu" border="0" cellpadding="1" cellspacing="0" width="100%">	<tr>	  <td>	    <b>>> Contents &lt;&lt;</b> 	    |	    <a class='naviBlack' href='../General/book.html#{@id}'>intro</a>	  </td>	</tr>      </table -->      <br/>	      <h3><xsl:value-of select="$translationLabels/labels/contentsTitle/text[@lang = $lang]"/></h3>            <table border='0' cellpadding='5' cellspacing='0'>	<xsl:apply-templates select="//XTutorial" mode="contents">	  <xsl:sort order="ascending" data-type="number" select="@id"/>	</xsl:apply-templates>      </table>    </body>  </html></xsl:template><xsl:template match="XTutorial" mode="contents">  <tr>    <th class="d{position() mod 2}">      <a  class='indexExample' href='../Output{$langsuffix}/example{@id}.html'>&#160;<xsl:value-of select="$translationLabels/labels/exampleText/text[@lang = $lang]"/><xsl:text> </xsl:text><xsl:value-of select="@id"/>&#160;</a>    </th>    <td class="d{position() mod 2}">      <a name="{@id}"/><xsl:apply-templates select="description[@lang=$lang]"/>    </td>  </tr></xsl:template><xsl:template match="ex">  example <xsl:value-of select="."/></xsl:template><xsl:template match="XTutorial" mode="example">  <xsl:document href="{$pwd}Output{$langsuffix}/example{@id}.html"method="xml" doctype-public="{$doctype-public}" doctype-system="{$doctype-system}">    <html>      <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>	<link rel="stylesheet" type="text/css" href="../CSS/tutorial.css"/>	<title>XML Tutorial</title>      <link rel="previous" href='example{@previous}.html'/>      <link rel="next" href='example{@next}.html'/>      <link rel="contents" href='../General{$langsuffix}/contents.html#{@id}'/>      </head>      <body>      	<xsl:call-template name="share_descriptionTop">	  <xsl:with-param name="id" select="$zvonItemid"/>	  <xsl:with-param name="lang" select="$lang"/>	  <xsl:with-param name="multilang">yes</xsl:with-param>	  <xsl:with-param name="languages">	    <language lang="eng" href="../Output/example{@id}.html"/>	    <language lang="cze" href="../Output_cze/example{@id}.html"/>	    <language lang="spa" href="../Output_spa/example{@id}.html"/>	    <language lang="por" href="../Output_por/example{@id}.html"/>	    <language lang="tur" href="../Output_tur/example{@id}.html"/>	    <language lang="dut" href="../Output_dut/example{@id}.html"/>	    <language lang="rus" href="../Output_rus/example{@id}.html"/>	    <language lang="ger" href="../Output_ger/example{@id}.html"/>	    <language lang="fre" href="../Output_fre/example{@id}.html"/>	    <language lang="ita" href="../Output_ita/example{@id}.html"/>	    <language lang="chi" href="../Output_chi/example{@id}.html"/>	  </xsl:with-param>	</xsl:call-template>		<table class="hangingMenu" border="0" cellpadding="1" cellspacing="0" width="100%">	  <tr>	    <td>	      <b>>> <xsl:value-of select="$translationLabels/labels/exampleText/text[@lang = $lang]"/><xsl:text> </xsl:text><xsl:value-of select="@id"/> &lt;&lt;</b>	      |	      <a class='naviBlack' href='example{@previous}.html'><xsl:value-of select="$translationLabels/labels/prev/text[@lang = $lang]"/></a>	      |	      <a class='naviBlack' href='example{@next}.html'><xsl:value-of select="$translationLabels/labels/next/text[@lang = $lang]"/></a>	      |	      <a class='naviBlack' href='../General{$langsuffix}/contents.html#{@id}'><xsl:value-of select="$translationLabels/labels/contentsTitle/text[@lang = $lang]"/></a>	    </td>	  </tr>	</table>	<br/>	<h3><xsl:value-of select="$translationLabels/labels/descriptionTitle/text[@lang = $lang]"/></h3>	<hr/>	<div class='description'>	  <xsl:apply-templates select="description[@lang=$lang]"/>	</div>	<!-- div class='description'>	  <i>Please, mail corrections me: </i>	  <a href="mailto:Jiri.Jirat@systinet.com?Subject=XML_Tutorial_ex_{@id}&amp;Body={jv:encode(description[@lang=$lang])}">Jiri.Jirat@systinet.com</a>	  <xsl:text>. Thank you very much.</xsl:text>	</div -->	<br/>	<h3><xsl:value-of select="$translationLabels/labels/wellFormedSourceTitle/text[@lang = $lang]"/></h3>	<hr/>	<xsl:apply-templates select="demo[@type='wf']"/>	<xsl:if test="demo[@type = 'notwf']">	  <h3><xsl:value-of select="$translationLabels/labels/errorSourceTitle/text[@lang = $lang]"/>	  <sup><a href="#"><xsl:value-of select="$translationLabels/labels/top/text[@lang = $lang]"/></a></sup>	</h3>	<hr/>	<xsl:apply-templates select="demo[@type='notwf']"/>      </xsl:if>      </body>    </html>  </xsl:document></xsl:template><xsl:template match="demo">  <xsl:if test="position()=1"><br/></xsl:if>  <div class="docDescription">     <xsl:apply-templates select="description[@lang=$lang]"/>:      <!-- div class='description'>	<i>Please, mail corrections me: </i>	<a href="mailto:Jiri.Jirat@systinet.com?Subject=XML_Tutorial_ex_{@id}&amp;Body={jv:encode(description[@lang=$lang])}">Jiri.Jirat@systinet.com</a>	<xsl:text>. Thank you very much.</xsl:text>      </div -->    </div>    <table width="75%" cellpadding="15">      <tr>	<td class="doc">	  <xsl:apply-templates select="doc"/>	</td>      </tr>    </table>    <xsl:if test="last()"><br/></xsl:if></xsl:template><xsl:template match="dtd">  <xsl:if test="position()=1"><br/></xsl:if>  <div class="docDescription">     <xsl:apply-templates select="description[@lang=$lang]"/>:      <!-- div class='description'>	<i>Please, mail corrections me: </i>	<a href="mailto:Jiri.Jirat@systinet.com?Subject=XML_Tutorial_ex_{@id}&amp;Body={jv:encode(description[@lang=$lang])}">Jiri.Jirat@systinet.com</a>	<xsl:text>. Thank you very much.</xsl:text>      </div -->    </div>    <table width="75%" cellpadding="15">      <tr>	<td class="doc">	  <xsl:apply-templates select="file"/>	</td>      </tr>    </table>    <xsl:if test="last()"><br/></xsl:if></xsl:template><xsl:template match="file">  <xsl:apply-templates/></xsl:template><xsl:template match="text()">  <xsl:value-of select="translate(.,'{}','&lt;&gt;')"/></xsl:template><xsl:template match="description">  <!-- xsl:choose>    <xsl:when test="@lang = $lang">      <xsl:apply-templates/>          </xsl:when>    <xsl:otherwise/>  </xsl:choose -->  <xsl:apply-templates/></xsl:template><xsl:template match="doc"><xsl:apply-templates/></xsl:template><xsl:template match="*"><xsl:element name="{name()}"><xsl:apply-templates/></xsl:element></xsl:template><xsl:template match="error">  <span class="error"><xsl:apply-templates/></span></xsl:template><xsl:template match="el">  <span class="element"><xsl:apply-templates/></span></xsl:template> <xsl:template match="at">   <span class="attribute"><xsl:apply-templates/></span></xsl:template></xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -