nicolaken 02/03/18 11:22:40 Added: src/webapp/samples/hello-world sitemap.xmap src/webapp/samples/hello-world/library/taglibs hello.xsl src/webapp/samples/hello-world/style/xsl simple-page2fo.xsl simple-page2html.xsl simple-page2svg.xsl simple-page2vml.xsl simple-page2vrml.xsl simple-page2wml.xsl simple-page2xls.xsl simple-xml2html.xsl src/webapp/samples/system sitemap.xmap src/webapp/samples/system/content/xml error-giving-page.xml Log: Partial commit of new samples structure. Samples go in samples/ dir with theit own sitemap. All scratchpad samples that are in the samples/ subdir are copied in webapp samples automatically by installscratchpadwar target. cocoon.xconf is moved in WEB-INF for security reasons. Added new "gump" target to build; it calls docs, javadocs, test and package. Revision Changes Path 1.1 xml-cocoon2/src/webapp/samples/hello-world/sitemap.xmap Index: sitemap.xmap =================================================================== <?xml version="1.0"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <!-- =========================== Components ================================ --> <map:components> <map:matchers default="wildcard"/> <map:selectors default="browser"/> <!-- <map:actions/> --> <map:generators default="file"/> <map:transformers default="xslt"/> <map:readers default="resource"/> <map:serializers default="html"> <map:serializer name="vrml" mime-type="model/vrml" logger="sitemap.serializer.vrml" src="org.apache.cocoon.serialization.TextSerializer"/> <map:serializer name="wml" mime-type="text/vnd.wap.wml" logger="sitemap.serializer.wml" src="org.apache.cocoon.serialization.XMLSerializer"> <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public> <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system> <encoding>ASCII</encoding> <omit-xml-declaration>yes</omit-xml-declaration> </map:serializer> <map:serializer name="svgxml" mime-type="image/svg-xml" logger="sitemap.serializer.svgxml" src="org.apache.cocoon.serialization.XMLSerializer"> <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public> <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system> </map:serializer> <map:serializer name="xhtml" mime-type="text/html" logger="sitemap.serializer.xhtml" src="org.apache.cocoon.serialization.XMLSerializer" pool-max="64" pool-min="2" pool-grow="2"> <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public> <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system> <encoding>UTF-8</encoding> </map:serializer> <map:serializer name="text" mime-type="text/text" logger="sitemap.serializer.text" src="org.apache.cocoon.serialization.TextSerializer"/> <map:serializer name="svg2jpeg" logger="sitemap.serializer.svg2jpeg" src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/jpeg"/> <map:serializer name="fo2pdf" logger="sitemap.serializer.fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf"/> <map:serializer name="fo2ps" logger="sitemap.serializer.fo2ps" src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/postscript"/> <map:serializer name="xls" logger="sitemap.serializer.xls" src="org.apache.cocoon.serialization.HSSFSerializer" mime-type="application/vnd.ms-excel"/> </map:serializers> </map:components> <!-- =========================== Views =================================== --> <!-- Views provide diffent, well, views to resources. Views are orthogonal to pipelines. Please refer to the docs. --> <map:views> <map:view name="content" from-label="content"> <map:serialize type="xml"/> </map:view> <map:view name="pretty-content" from-label="data"> <map:transform src="stylesheets/simple-xml2html.xsl"/> <map:serialize type="html"/> </map:view> <map:view name="links" from-position="last"> <map:serialize type="links"/> </map:view> </map:views> <map:pipelines> <!-- Utility for viewing source xml or html --> <map:pipeline> <map:match pattern="**.source"> <map:generate src="cocoon:/{1}" /> <map:transform src="style/xsl/simple-xml2html.xsl"/> <map:serialize/> </map:match> </map:pipeline> <!-- ================ Hello =========================== --> <map:pipeline> <map:match pattern="hello.html"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2html.xsl"/> <map:serialize type="html"/> </map:match> <map:match pattern="hello.txt"> <map:generate src="content/xml/hello-page.xml"/> <map:serialize type="text"/> </map:match> <map:match pattern="hello.xhtml"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2html.xsl"/> <map:serialize type="xhtml"/> </map:match> <map:match pattern="hello.wml"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2wml.xsl"/> <map:serialize type="wml"/> </map:match> <map:match pattern="hello.vml"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2vml.xsl"/> <map:serialize type="xml"/> </map:match> <map:match pattern="hello.svg"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2svg.xsl"/> <map:serialize type="svgxml"/> </map:match> <map:match pattern="hello.jpg"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2svg.xsl"/> <map:serialize type="svg2jpg"/> </map:match> <map:match pattern="hello.wrl"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2vrml.xsl"/> <map:serialize type="vrml"/> </map:match> <map:match pattern="hello.pdf"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2fo.xsl"/> <map:serialize type="fo2pdf"/> </map:match> <map:match pattern="hello.ps"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2fo.xsl"/> <map:serialize type="fo2ps"/> </map:match> <map:match pattern="hello.xls"> <map:generate src="content/xml/hello-page.xml"/> <map:transform src="style/xsl/simple-page2xls.xsl"/> <map:serialize type="xls"/> </map:match> </map:pipeline> </map:pipelines> </map:sitemap> <!-- end of file --> 1.1 xml-cocoon2/src/webapp/samples/hello-world/library/taglibs/hello.xsl Index: hello.xsl =================================================================== <?xml version="1.0"?> <!-- ***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * _________________________________________________________________________ * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * ***************************************************************************** --> <!-- * Hello World logicsheet for the Java language * * @author <a href="mailto:[EMAIL PROTECTED]>Vadim Gritsenko</a> * @version CVS $Revision: 1.1 $ $Date: 2002/03/18 19:22:39 $ --> <xsl:stylesheet version="1.0" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-hello="http://apache.org/xsp/hello/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="xsp-hello:greeting"> <xsl:variable name="name"> <xsl:choose> <xsl:when test="@name">"<xsl:value-of select="@name"/>"</xsl:when> <xsl:when test="xsp-hello:name"> <xsl:call-template name="get-nested-content"> <xsl:with-param name="content" select="xsp-hello:name"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="value"> <xsl:choose> <xsl:when test="@value">"<xsl:value-of select="@value"/>"</xsl:when> <xsl:when test="xsp-hello:value"> <xsl:call-template name="get-nested-content"> <xsl:with-param name="content" select="xsp-hello:value"/> </xsl:call-template> </xsl:when> <xsl:otherwise>"Hello"</xsl:otherwise> </xsl:choose> </xsl:variable> <xsp:content> <xsp:expr><xsl:value-of select="$value"/></xsp:expr>, <xsp:expr><xsl:value-of select="$name"/></xsp:expr>! </xsp:content> </xsl:template> <xsl:template name="get-nested-content"> <xsl:param name="content"/> <xsl:choose> <xsl:when test="$content/*"> <xsl:apply-templates select="$content/*"/> </xsl:when> <xsl:otherwise>"<xsl:value-of select="$content"/>"</xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="@*|*|text()|processing-instruction()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2fo.xsl Index: simple-page2fo.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="page" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm"> <fo:region-before extent="3cm"/> <fo:region-body margin-top="3cm"/> <fo:region-after extent="1.5cm"/> </fo:simple-page-master> <fo:page-sequence-master master-name="all"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="page" page-position="first"/> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="all"> <fo:static-content flow-name="xsl-region-after"> <fo:block text-align="center" font-size="10pt" font-family="serif" line-height="14pt">page <fo:page-number/></fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="title"> <fo:block font-size="36pt" space-before.optimum="24pt" text-align="center"><xsl:apply-templates/></fo:block> </xsl:template> <xsl:template match="para"> <fo:block font-size="12pt" space-before.optimum="12pt" text-align="center"><xsl:apply-templates/></fo:block> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2html.xsl Index: simple-page2html.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="view-source"/> <xsl:template match="page"> <html> <head> <title> <xsl:value-of select="title"/> </title> </head> <body bgcolor="white" alink="red" link="blue" vlink="blue"> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="title"> <h2 style="color: navy; text-align: center"> <xsl:if test="not($view-source)"> <xsl:apply-templates/> </xsl:if> <xsl:if test="$view-source"> <A> <xsl:attribute name="HREF">../view-source?filename=/<xsl:value-of select="$view-source"/></xsl:attribute> <xsl:attribute name="TARGET">_blank</xsl:attribute> <xsl:apply-templates/> </A> </xsl:if> </h2> </xsl:template> <xsl:template match="para"> <p align="left"> <i><xsl:apply-templates/></i> </p> </xsl:template> <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template> <xsl:template match="text()" priority="-1"><xsl:value-of select="."/></xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2svg.xsl Index: simple-page2svg.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> <svg width="450" height="160"> <defs> <filter id="blur1"><feGaussianBlur stdDeviation="3"/></filter> <filter id="blur2"><feGaussianBlur stdDeviation="1"/></filter> </defs> <g title="this is a tooltip"> <rect style="fill:#0086B3;stroke:#000000;stroke-width:4;filter:url(#blur1);" x="30" y="30" rx="20" ry="20" width="400" height="80"/> <xsl:apply-templates/> </g> </svg> </xsl:template> <xsl:template match="para"> <text style="fill:#FFFFFF;font-size:24;font-family:TrebuchetMS-Bold;filter:url(#blur2);" x="65" y="80"> <xsl:apply-templates/> </text> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2vml.xsl Index: simple-page2vml.xsl =================================================================== <?xml version="1.0"?> <!-- Written by Theodore B. Achacoso, MD 991122 [EMAIL PROTECTED] --> <!-- The code is based on Motorola's VoxML (Version 1.2) implementation of the emerging VoiceXML standard (version 0.9 as of 17 August '99). Foremost is the absence of <form></form> tags that delineate input. That said, when this file is rendered in Motorola's Mobile ADK simulator (MADK, version 1 beta 4 this November) the interaction looks like this: Computer: Hello world! This is my first voice enabled cocoon page. If user says "repeat" then the computer repeats the prompt. If the user says "goodbye" then the computer says "Goodbye" and ends the session. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> <DIALOG> <STEP NAME="init"> <PROMPT><xsl:apply-templates/></PROMPT> <INPUT TYPE="OPTIONLIST"> <OPTION NEXT="#init">repeat</OPTION> <OPTION NEXT="#goodbye">goodbye</OPTION> </INPUT> </STEP> <STEP NAME="goodbye"> <PROMPT>Goodbye</PROMPT> <INPUT TYPE="NONE" NEXT="#end"/> </STEP> </DIALOG> </xsl:template> <xsl:template match="title"> <!-- ignore --> </xsl:template> <xsl:template match="para"> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2vrml.xsl Index: simple-page2vrml.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> <!-- due to a DOM limitation, you must wrap your generated VRML with a fake tag, here uses <vrml>, that is stripped out by the text formatter --> <vrml><xsl:text>#VRML V2.0 utf8</xsl:text> <xsl:apply-templates select="content"/> </vrml> </xsl:template> <xsl:template match="content"> <xsl:text> Transform { translation 0 0 9 rotation 0 0 1 0.0 children Shape { appearance DEF WHITE Appearance { material Material { diffuseColor 1 1 1 } } geometry Text { string [ " </xsl:text><xsl:value-of select="para"/><xsl:text> " ] fontStyle DEF MFS FontStyle { size 0.1 family "SERIF" style "BOLD" justify "MIDDLE" } } } } </xsl:text> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2wml.xsl Index: simple-page2wml.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="page"> <wml> <card id="index" title="{title}"> <xsl:apply-templates select="content"/> <do type="accept" label="About"> <go href="#about"/> </do> </card> <card id="about" title="About"> <onevent type="ontimer"> <prev/> </onevent> <timer value="25"/> <p align="center"> <br/> <br/> <small> Copyright © 2000<br/> Apache Software Foundation.<br/> All rights reserved. </small> </p> </card> </wml> </xsl:template> <xsl:template match="para"> <p align="center"> <xsl:apply-templates/> </p> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-page2xls.xsl Index: simple-page2xls.xsl =================================================================== <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sql="http://apache.org/cocoon/SQL/2.0" xmlns:gmr="http://www.gnome.org/gnumeric/v7" > <xsl:param name="view-source"/> <xsl:template match="page"> <gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/v7"> <gmr:Sheets> <gmr:Sheet DisplayFormulas="false" HideZero="false" HideGrid="false" HideColHeader="false" HideRowHeader="false" DisplayOutlines="true" OutlineSymbolsBelow="true" OutlineSymbolsRight="true"> <gmr:Name><xsl:value-of select="title"/></gmr:Name> <gmr:MaxCol>2</gmr:MaxCol> <gmr:Cols DefaultSizePts="48"> <gmr:ColInfo No="0" Unit="48" MarginA="2" MarginB="2" Count="7"/> </gmr:Cols> <gmr:Rows DefaultSizePts="12.8"> <gmr:RowInfo No="0" Unit="12.8" MarginA="0" MarginB="0" Count="9"/> <gmr:RowInfo No="10" Unit="12.8" MarginA="1" MarginB="0" Count="24"/> </gmr:Rows> <gmr:Cells> <xsl:apply-templates/> </gmr:Cells> </gmr:Sheet> </gmr:Sheets> </gmr:Workbook> </xsl:template> <xsl:template match="content"> <xsl:apply-templates/> </xsl:template> <xsl:template match="para"> <gmr:Cell Col="0" ValueType="60"> <xsl:variable name="rownumber"><xsl:number level="any" from="content" count="para"/></xsl:variable> <xsl:attribute name="Row"> <xsl:value-of select="$rownumber"/> </xsl:attribute> <gmr:Content> <xsl:apply-templates/> </gmr:Content> </gmr:Cell> </xsl:template> <xsl:template match="title"></xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/hello-world/style/xsl/simple-xml2html.xsl Index: simple-xml2html.xsl =================================================================== <!-- | | XSLT REC Compliant Version of IE5 Default Stylesheet | | Original version by Jonathan Marsh ([EMAIL PROTECTED]) | http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl | | Conversion to XSLT 1.0 REC Syntax by Steve Muench ([EMAIL PROTECTED]) | +--> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="no" method="html"/> <xsl:template match="/"> <HTML> <HEAD> <SCRIPT> <xsl:comment><![CDATA[ function f(e){ if (e.className=="ci") { if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb"); } if (e.className=="di") { if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db"); } e.id=""; } function fix(e,cl){ e.className=cl; e.style.display="block"; j=e.parentElement.children(0); j.className="c"; k=j.children(0); k.style.visibility="visible"; k.href="#"; } function ch(e) { mark=e.children(0).children(0); if (mark.innerText=="+") { mark.innerText="-"; for (var i=1;i<e.children.length;i++) { e.children(i).style.display="block"; } } else if (mark.innerText=="-") { mark.innerText="+"; for (var i=1;i<e.children.length;i++) { e.children(i).style.display="none"; } } } function ch2(e) { mark=e.children(0).children(0); contents=e.children(1); if (mark.innerText=="+") { mark.innerText="-"; if (contents.className=="db"||contents.className=="cb") { contents.style.display="block"; } else { contents.style.display="inline"; } } else if (mark.innerText=="-") { mark.innerText="+"; contents.style.display="none"; } } function cl() { e=window.event.srcElement; if (e.className!="c") { e=e.parentElement; if (e.className!="c") { return; } } e=e.parentElement; if (e.className=="e") { ch(e); } if (e.className=="k") { ch2(e); } } function ex(){} function h(){window.status=" ";} document.onclick=cl; ]]> </xsl:comment> </SCRIPT> <STYLE> BODY {font:x-small 'Verdana'; margin-right:1.5em} .c {cursor:hand} .b {color:red; font-family:'Courier New'; font-weight:bold; text-decoration:none} .e {margin-left:1em; text-indent:-1em; margin-right:1em} .k {margin-left:1em; text-indent:-1em; margin-right:1em} .t {color:#990000} .xt {color:#990099} .ns {color:red} .dt {color:green} .m {color:blue} .tx {font-weight:bold} .db {text-indent:0px; margin-left:1em; margin-top:0px; margin-bottom:0px;padding-left:.3em; border-left:1px solid #CCCCCC; font:small Courier} .di {font:small Courier} .d {color:blue} .pi {color:blue} .cb {text-indent:0px; margin-left:1em; margin-top:0px; margin-bottom:0px;padding-left:.3em; font:small Courier; color:#888888} .ci {font:small Courier; color:#888888} PRE {margin:0px; display:inline} </STYLE> </HEAD> <BODY class="st"> <xsl:apply-templates/> </BODY> </HTML> </xsl:template> <xsl:template match="processing-instruction()"> <DIV class="e"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text><?</xsl:text> </SPAN> <SPAN class="pi"> <xsl:value-of select="name(.)"/> <xsl:value-of select="."/> </SPAN> <SPAN class="m"> <xsl:text>?></xsl:text> </SPAN> </DIV> </xsl:template> <xsl:template match="processing-instruction('xml')"> <DIV class="e"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text><?</xsl:text> </SPAN> <SPAN class="pi"> <xsl:text>xml </xsl:text> <xsl:for-each select="@*"> <xsl:value-of select="name(.)"/> <xsl:text>="</xsl:text> <xsl:value-of select="."/> <xsl:text>" </xsl:text> </xsl:for-each> </SPAN> <SPAN class="m"> <xsl:text>?></xsl:text> </SPAN> </DIV> </xsl:template> <xsl:template match="@*"> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*/@*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m">="</SPAN> <B> <xsl:value-of select="."/> </B> <SPAN class="m">"</SPAN> </xsl:template> <xsl:template match="text()"> <DIV class="e"> <SPAN class="b"> </SPAN> <SPAN class="tx"> <xsl:value-of select="."/> </SPAN> </DIV> </xsl:template> <xsl:template match="comment()"> <DIV class="k"> <SPAN> <A STYLE="visibility:hidden" class="b" onclick="return false" onfocus="h()">-</A> <SPAN class="m"> <xsl:text><!--</xsl:text> </SPAN> </SPAN> <SPAN class="ci" id="clean"> <PRE> <xsl:value-of select="."/> </PRE> </SPAN> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text>--></xsl:text> </SPAN> <SCRIPT>f(clean);</SCRIPT> </DIV> </xsl:template> <xsl:template match="*"> <DIV class="e"> <DIV STYLE="margin-left:1em;text-indent:-2em"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"><</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*"/> <SPAN class="m"> <xsl:text>/></xsl:text> </SPAN> </DIV> </DIV> </xsl:template> <xsl:template match="*[node()]"> <DIV class="e"> <DIV class="c"> <A class="b" href="#" onclick="return false" onfocus="h()">-</A> <SPAN class="m"><</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*"/> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> <DIV> <xsl:apply-templates/> <DIV> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text></</xsl:text> </SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> </DIV> </DIV> </xsl:template> <xsl:template match="*[text() and not (comment() or processing-instruction())]"> <DIV class="e"> <DIV STYLE="margin-left:1em;text-indent:-2em"> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text><</xsl:text> </SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*"/> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> <SPAN class="tx"> <xsl:value-of select="."/> </SPAN> <SPAN class="m"></</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> </DIV> </xsl:template> <xsl:template match="*[*]" priority="20"> <DIV class="e"> <DIV STYLE="margin-left:1em;text-indent:-2em" class="c"> <A class="b" href="#" onclick="return false" onfocus="h()">-</A> <SPAN class="m"><</SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> <xsl:if test="@*"> <xsl:text> </xsl:text> </xsl:if> </SPAN> <xsl:apply-templates select="@*"/> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> <DIV> <xsl:apply-templates/> <DIV> <SPAN class="b"> <xsl:call-template name="nbsp-ref"/> </SPAN> <SPAN class="m"> <xsl:text></</xsl:text> </SPAN> <SPAN> <xsl:attribute name="class"> <xsl:if test="xsl:*"> <xsl:text>x</xsl:text> </xsl:if> <xsl:text>t</xsl:text> </xsl:attribute> <xsl:value-of select="name(.)"/> </SPAN> <SPAN class="m"> <xsl:text>></xsl:text> </SPAN> </DIV> </DIV> </DIV> </xsl:template> <xsl:template name="nbsp-ref"> <xsl:text> </xsl:text> </xsl:template> </xsl:stylesheet> 1.1 xml-cocoon2/src/webapp/samples/system/sitemap.xmap Index: sitemap.xmap =================================================================== <?xml version="1.0"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> <!-- =========================== Components ================================ --> <map:components> <map:matchers default="wildcard"/> <map:selectors default="browser"/> <!-- <map:actions/> --> <map:generators default="file"> <map:generator name="request" src="org.apache.cocoon.generation.RequestGenerator" logger="sitemap.generator.request" label="data" pool-max="16" pool-min="2" pool-grow="2"/> </map:generators> <map:transformers default="xslt"/> <map:readers default="resource"/> <map:serializers default="html"/> </map:components> <!-- =========================== Views =================================== --> <!-- Views provide diffent, well, views to resources. Views are orthogonal to pipelines. Please refer to the docs. --> <map:views> <map:view name="content" from-label="content"> <map:serialize type="xml"/> </map:view> <map:view name="links" from-position="last"> <map:serialize type="links"/> </map:view> </map:views> <map:pipelines> <!-- ================ Hello =========================== --> <map:pipeline> <map:match pattern="request.html"> <map:generate type="request"/> <map:serialize type="xml"/> </map:match> <map:match pattern="generror.html"> <map:generate src="content/xml/error-giving-page.xml"/> <map:serialize/> </map:match> </map:pipeline> </map:pipelines> </map:sitemap> <!-- end of file --> 1.1 xml-cocoon2/src/webapp/samples/system/content/xml/error-giving-page.xml Index: error-giving-page.xml =================================================================== <?xml version="1.0"?> <!-- CVS: $Id: error-giving-page.xml,v 1.1 2002/03/18 19:22:40 nicolaken Exp $ --> <!DOCTYPE page [ <!ELEMENT page (title?, content)> <!ELEMENT title (#PCDATA)> <!ELEMENT content (para+)> <!ELEMENT para (#PCDATA)> ]> <page> <title>Hello</title> <content> </para>This is my first Cocoon page!</para> </content> </page>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]