vgritsenko 02/02/01 19:04:20 Modified: src/webapp sitemap.xmap src/webapp/docs/samples sample-dynamic.xml src/webapp/stylesheets/news moreover.xsl news.xsl slashdot.xsl Added: src/webapp/stylesheets/news xmlhack.xsl Log: Add XMLHAck to the news sample. Make result look more like html. Revision Changes Path 1.23 +13 -6 xml-cocoon2/src/webapp/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/sitemap.xmap,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- sitemap.xmap 30 Jan 2002 23:32:33 -0000 1.22 +++ sitemap.xmap 2 Feb 2002 03:04:19 -0000 1.23 @@ -768,17 +768,17 @@ <!-- ================ NEWS =========================== --> - <map:match pattern="slashdot/slashdot.xml"> + <map:match pattern="news/slashdot.xml"> <map:generate src="http://slashdot.org/slashdot.xml"/> <map:transform src="stylesheets/news/slashdot.xsl"/> <map:serialize/> </map:match> - <map:match pattern="slashdot/**.gif"> + <map:match pattern="news/**.gif"> <map:read src="http://images.slashdot.org/topics/{1}.gif" mime-type="image/gif"/> </map:match> - <map:match pattern="slashdot/**.jpg"> + <map:match pattern="news/**.jpg"> <map:read src="http://images.slashdot.org/topics/{1}.jpg" mime-type="image/jpg"/> </map:match> @@ -790,12 +790,18 @@ <map:read src="http://images.slashdot.org/topics/{1}.jpg" mime-type="image/jpg"/> </map:match> - <map:match pattern="moreover/moreover.xml"> + <map:match pattern="news/moreover.xml"> <map:generate src="http://www.moreover.com/cgi-local/page?o=xml&c=Developer%20news"/> <map:transform src="stylesheets/news/moreover.xsl"/> <map:serialize/> </map:match> + <map:match pattern="news/xmlhack.xml"> + <map:generate src="http://www.xmlhack.com/cdf.cdf"/> + <map:transform src="stylesheets/news/xmlhack.xsl"/> + <map:serialize/> + </map:match> + <map:match pattern="news/aggregate.xml"> <map:aggregate element="page" ns="http://foo.bar.com/myspace"> <!-- @@ -829,8 +835,9 @@ Please see docs for further explanations. --> - <map:part src="cocoon:/slashdot/slashdot.xml" element="slashdot" ns="http://foo.bar.com/slashdot"/> - <map:part src="cocoon:/moreover/moreover.xml" element="moreover" ns="http://foo.bar.com/moreover"/> + <map:part src="cocoon:/news/slashdot.xml" element="news" ns="http://foo.bar.com/slashdot"/> + <map:part src="cocoon:/news/moreover.xml" element="news" ns="http://foo.bar.com/moreover"/> + <map:part src="cocoon:/news/xmlhack.xml" element="news" ns="http://foo.bar.com/xmlhack"/> </map:aggregate> <map:transform src="stylesheets/news/news.xsl"/> <map:serialize/> 1.5 +6 -3 xml-cocoon2/src/webapp/docs/samples/sample-dynamic.xml Index: sample-dynamic.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/docs/samples/sample-dynamic.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- sample-dynamic.xml 24 Jan 2002 14:31:57 -0000 1.4 +++ sample-dynamic.xml 2 Feb 2002 03:04:19 -0000 1.5 @@ -101,14 +101,17 @@ </group> <group name="Aggregation Sample"> - <sample name="Slashdot" href="slashdot/slashdot.xml"> + <sample name="Slashdot" href="news/slashdot.xml"> Live XML Feed from Slashdot. </sample> - <sample name="Moreover.com" href="moreover/moreover.xml"> + <sample name="Moreover.com" href="news/moreover.xml"> + Live XML Developer News Feed from moreover.com. + </sample> + <sample name="XMLHack.com" href="news/xmlhack.xml"> Live XML Developer News Feed from moreover.com. </sample> <sample name="Aggregation" href="news/aggregate.xml"> - Single Web Page with News from both sources above. + Single Web Page with News from all sources above. </sample> </group> </samples> 1.2 +2 -0 xml-cocoon2/src/webapp/stylesheets/news/moreover.xsl Index: moreover.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/stylesheets/news/moreover.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- moreover.xsl 3 Jan 2002 12:31:46 -0000 1.1 +++ moreover.xsl 2 Feb 2002 03:04:19 -0000 1.2 @@ -1,3 +1,5 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + <!-- [XSL-XSLT] This stylesheet automatically updated from an IE5-compatible XSL stylesheet to XSLT. The following problems which need manual attention may exist in this stylesheet: 1.3 +18 -26 xml-cocoon2/src/webapp/stylesheets/news/news.xsl Index: news.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/stylesheets/news/news.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- news.xsl 22 Jan 2002 01:24:24 -0000 1.2 +++ news.xsl 2 Feb 2002 03:04:19 -0000 1.3 @@ -1,45 +1,37 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:ns0="http://foo.bar.com/myspace" xmlns:ns1="http://foo.bar.com/slashdot" xmlns:ns2="http://foo.bar.com/moreover" -> + xmlns:ns3="http://foo.bar.com/xmlhack"> + <xsl:include href="../page/simple-page2html.xsl"/> <!-- Match The Root Node --> - <xsl:template match="/"> - <HTML> - <BODY> + <xsl:template match="ns0:page"> + <html> + <body> <xsl:apply-templates/> - </BODY> - </HTML> + </body> + </html> </xsl:template> - <xsl:template match="HTML"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="ns1:HTML"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="ns2:HTML"> - <xsl:apply-templates/> - </xsl:template> - - <xsl:template match="BODY"> - <xsl:apply-templates/> + <xsl:template match="ns1:news"> + <xsl:apply-templates select="ns1:HTML/ns1:BODY/*"/> </xsl:template> - <xsl:template match="ns1:BODY"> - <xsl:apply-templates/> + <xsl:template match="ns2:news"> + <xsl:apply-templates select="ns2:HTML/ns2:BODY/*"/> </xsl:template> - <xsl:template match="ns2:BODY"> - <xsl:apply-templates/> + <xsl:template match="ns3:news"> + <xsl:apply-templates select="ns3:html/ns3:body/*"/> </xsl:template> - <xsl:template match="@*|*|text()|processing-instruction()" priority="-1"> + <xsl:template match="@*|*|text()" priority="-1"> <xsl:copy> - <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> + <xsl:apply-templates select="@*|*|text()"/> </xsl:copy> </xsl:template> 1.2 +2 -0 xml-cocoon2/src/webapp/stylesheets/news/slashdot.xsl Index: slashdot.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/stylesheets/news/slashdot.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- slashdot.xsl 3 Jan 2002 12:31:46 -0000 1.1 +++ slashdot.xsl 2 Feb 2002 03:04:19 -0000 1.2 @@ -1,3 +1,5 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + <!-- [XSL-XSLT] This stylesheet automatically updated from an IE5-compatible XSL stylesheet to XSLT. The following problems which need manual attention may exist in this stylesheet: 1.1 xml-cocoon2/src/webapp/stylesheets/news/xmlhack.xsl Index: xmlhack.xsl =================================================================== <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Match The Root Node --> <xsl:template match="/"> <html> <body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="CHANNEL"> <table border="0" width="100%"> <tr> <td colspan="3" style="background-color: #B0E0E6; font: x-small Arial, Helvetica, sans-serif;"> <center><b>Current News from xmlhack.com</b></center> </td> </tr> <xsl:apply-templates select="ITEM"/> </table> </xsl:template> <xsl:template match="ITEM"> <tr> <xsl:if test="(position() mod 2) = 1"> <xsl:attribute name="style">background-color: lightgrey; font: x-small Arial, Helvetica, sans-serif;</xsl:attribute> </xsl:if> <xsl:if test="(position() mod 2) = 0"> <xsl:attribute name="style">background-color: #C0C0C0; font: x-small Arial, Helvetica, sans-serif;</xsl:attribute> </xsl:if> <td STYLE="font: bold;" width="75%"> <a target="_blank" style="text-decoration: none;" href="{@href}"> <xsl:value-of select="TITLE"/> </a> </td> <td> <xsl:value-of select="@LASTMOD"/> </td> </tr> <tr> <td colspan="3"> <xsl:value-of select="ABSTRACT"/> </td> </tr> </xsl:template> </xsl:stylesheet>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]