cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] OpenOfficeGeneration Sat May 10 01:00:05 2003
Date Fri, 09 May 2003 23:00:05 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=OpenOfficeGeneration , version: 6 on Fri May
 9 22:40:43 2003 by JoergHeinicke

+ {{{
- {{\\cocoon/resources/entities
? ----

+ cocoon/resources/entities
- \\cocoon/implements/sxw
? --

+ cocoon/implements/sxw
- \\cocoon/implements/xsl
? --

+ cocoon/implements/xsl
- \\cocoon/implements/....
? --

+ cocoon/implements/....
- }}
+ }}}
?   +

- I've got the file "test.sxw" in my directory /implements/sxw
+ I've got the file "test.sxw" in my directory /implements/sxw \\
?                                                             +++

- \\I've got the file "html.oowriter.xsl" in my directory /implements/xsl
? --

+ I've got the file "html.oowriter.xsl" in my directory /implements/xsl \\
?                                                                      +++

- \\I've got the files from, in my case opt/OpenOffice.org1.0/share/dtd/officedocument/1_0

? --

+ I've got the files from, in my case opt/OpenOffice.org1.0/share/dtd/officedocument/1_0 \\
?                                                                                        ++

- \\(the DTDs from OpenOffice) copied to the folder /cocoon/resources/entities
? --

+ (the DTDs from OpenOffice) copied to the folder /cocoon/resources/entities \\
?                                                                           +++

- {{
+ {{{
?   +

- \\<map:match pattern="sxw/*.html">
? --

+ <map:match pattern="sxw/*.html">
- \\  <map:aggregate element="office:document">
? --

+   <map:aggregate element="office:document">
- \\    <map:part src="jar:http://web/implements/{1}.sxw!/content.xml"/>
? --

+     <map:part src="jar:http://web/implements/{1}.sxw!/content.xml"/>
- \\    <map:part src="jar:http://web/implements/{1}.sxw!/meta.xml"/>
? --

+     <map:part src="jar:http://web/implements/{1}.sxw!/meta.xml"/>
- \\  </map:aggregate>
? --

+   </map:aggregate>
- \\  <map:transform src="xsl/html.oowriter.xsl"/>
? --

+   <map:transform src="xsl/html.oowriter.xsl"/>
- \\  <map:serialize type="html"/>
? --

+   <map:serialize type="html"/>
- <\</map:match>
? --

+ </map:match>
- \\<map:match pattern="*.sxw">
? --

+ <map:match pattern="*.sxw">
- \\  <map:read src="{1}.sxw" mime-type="application/zip"/>
? --

+   <map:read src="{1}.sxw" mime-type="application/zip"/>
- \\</map:match>
? --

+ </map:match>
- }}
+ }}}
?   +

+ {{{
- {{\\message File "jar:http://web/implements/test.sxw!/office.dtd" not found.
? ----

+ message File "jar:http://web/implements/test.sxw!/office.dtd" not found.
- \\description org.apache.cocoon.ProcessingException: 
? --

+ description org.apache.cocoon.ProcessingException: 
- \\Failed to execute pipeline.: org.xml.sax.SAXParseException: 
? --

+ Failed to execute pipeline.: org.xml.sax.SAXParseException: 
- \\File "jar:http://web/implements/test.sxw!/office.dtd" not found.
? --

+ File "jar:http://web/implements/test.sxw!/office.dtd" not found.
- }}
+ }}}
?   +

+ {{{
- {{\\-- Open Office DTDs --
? ----

+ -- Open Office DTDs --
- \\PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd"
? --

+ PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "office.dtd"
- \\PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"
? --

+ PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd"
- }}
+ }}}
?   +

+ {{{
+ org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.xml.sax.SAXParseException:
+ A '(' character or an element type is required in the declaration of element type "draw:text-box".
- {{\\org.apache.cocoon.ProcessingException:
- \\Failed to execute pipeline.:
- \\org.xml.sax.SAXParseException: A '(' character or an element type is required
- \\in the declaration of element type "draw:text-box".
- }}
+ }}}
?   +

+ {{{
- {{\\<!ENTITY % dtypes-mod SYSTEM "dtypes.mod">
? ----

+ <!ENTITY % dtypes-mod SYSTEM "dtypes.mod">
- \\%dtypes-mod;
? --

+ %dtypes-mod;
- \\<!ENTITY % nmspace-mod SYSTEM "nmspace.mod">
? --

+ <!ENTITY % nmspace-mod SYSTEM "nmspace.mod">
- \\%nmspace-mod;
? --

+ %nmspace-mod;
- \\<!ENTITY % office-mod SYSTEM "office.mod">
? --

+ <!ENTITY % office-mod SYSTEM "office.mod">
- \\%office-mod;
? --

+ %office-mod;
- \\<!ENTITY % style-mod SYSTEM "style.mod">
? --

+ <!ENTITY % style-mod SYSTEM "style.mod">
- \\%style-mod;
? --

+ %style-mod;
- \\<!ENTITY % meta-mod SYSTEM "meta.mod">
? --

+ <!ENTITY % meta-mod SYSTEM "meta.mod">
- \\%meta-mod;
? --

+ %meta-mod;
- \\<!ENTITY % script-mod SYSTEM "script.mod">
? --

+ <!ENTITY % script-mod SYSTEM "script.mod">
- \\%script-mod;
? --

+ %script-mod;
- \\<!ENTITY % drawing-mod SYSTEM "drawing.mod">
? --

+ <!ENTITY % drawing-mod SYSTEM "drawing.mod">
- \\%drawing-mod;
? --

+ %drawing-mod;
- \\<!ENTITY % text-mod SYSTEM "text.mod">
? --

+ <!ENTITY % text-mod SYSTEM "text.mod">
- \\%text-mod;
? --

+ %text-mod;
- \\<!ENTITY % table-mod SYSTEM "table.mod">
? --

+ <!ENTITY % table-mod SYSTEM "table.mod">
- \\%table-mod;
? --

+ %table-mod;
- \\<!ENTITY % chart-mod SYSTEM "chart.mod">
? --

+ <!ENTITY % chart-mod SYSTEM "chart.mod">
- \\%chart-mod;
? --

+ %chart-mod;
- \\<!ENTITY % datastyl-mod SYSTEM "datastyl.mod">
? --

+ <!ENTITY % datastyl-mod SYSTEM "datastyl.mod">
- \\%datastyl-mod;
? --

+ %datastyl-mod;
- \\<!ENTITY % form-mod SYSTEM "form.mod">
? --

+ <!ENTITY % form-mod SYSTEM "form.mod">
- \\%form-mod;
? --

+ %form-mod;
- \\<!ENTITY % settings-mod SYSTEM "settings.mod">
? --

+ <!ENTITY % settings-mod SYSTEM "settings.mod">
- \\%settings-mod;
? --

+ %settings-mod;
- }}
+ }}}
?   +

- (Sax does not check a lot, this is a workaround, not a solution ;--)))
?                                                                   -  -

+ (Sax does not check a lot, this is a workaround, not a solution ;-) )
?                                                                    +

+ {{{
- {{\\<?xml version="1.0" encoding="UTF-8"?>
? ----

+ <?xml version="1.0" encoding="UTF-8"?>
- \\<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/T=
? --                                                                     ^

+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
?                                                                      ^^^^^^^^^

+                               xmlns:dc="http://purl.org/dc/elements/1.1/"
- ransform"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:office="http://openoffice.org/2000/office"
+                               xmlns:office="http://openoffice.org/2000/office"
? ++++++++++++++++++++++++++++++

- xmlns:style="http://openoffice.org/2000/style"
+                               xmlns:style="http://openoffice.org/2000/style"
? ++++++++++++++++++++++++++++++

- xmlns:text="http://openoffice.org/2000/text"
+                               xmlns:text="http://openoffice.org/2000/text"
- xmlns:table="http://openoffice.org/2000/table"
+                               xmlns:table="http://openoffice.org/2000/table"
? ++++++++++++++++++++++++++++++

- xmlns:draw="http://openoffice.org/2000/drawing"
+                               xmlns:draw="http://openoffice.org/2000/drawing"
? ++++++++++++++++++++++++++++++

- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- xmlns:xlink="http://www.w3.org/1999/xlink"
+                               xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                               xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:number="http://openoffice.org/2000/datastyle"
+                               xmlns:number="http://openoffice.org/2000/datastyle"
? ++++++++++++++++++++++++++++++

- xmlns:svg="http://www.w3.org/2000/svg"
+                               xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:chart="http://openoffice.org/2000/chart"
+                               xmlns:chart="http://openoffice.org/2000/chart"
? ++++++++++++++++++++++++++++++

- xmlns:dr="http://openoffice.org/2000/dr"
+                               xmlns:dr="http://openoffice.org/2000/dr"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
+                               xmlns:math="http://www.w3.org/1998/Math/MathML"
? ++++++++++++++++++++++++++++++

- xmlns:form="http://openoffice.org/2000/form"
+                               xmlns:form="http://openoffice.org/2000/form"
- xmlns:script="http://openoffice.org/2000/script"
+                               xmlns:script="http://openoffice.org/2000/script"
? ++++++++++++++++++++++++++++++

- xmlns:config="http://openoffice.org/2001/config"
+                               xmlns:config="http://openoffice.org/2001/config"
? ++++++++++++++++++++++++++++++

- xmlns:meta="http://openoffice.org/2000/meta"
+                               xmlns:meta="http://openoffice.org/2000/meta"
- xmlns:manifest="http://openoffice.org/2001/manifest"
+                               xmlns:manifest="http://openoffice.org/2001/manifest"
? ++++++++++++++++++++++++++++++

- office:class="text" office:version="1.0">
+                               office:class="text" office:version="1.0">
- \\ <xsl:param name="relpath"/>
? ---

+ <xsl:param name="relpath"/>
- \\ <xsl:param name="content"/>
? ---

+ <xsl:param name="content"/>
- \\ <xsl:template match="/document">
? ---

+ <xsl:template match="/document">
- \\  <html>
? --

+   <html>
- \\          <head>
- \\                  <link type="text/css" rel="stylesheet">
- \\                                 <xsl:attribute name="href"><xsl:valu=
- e-of
- select="$relpath"/>/css/general.css</xsl:attribute>
- \\                                </link>
+     <head>
+       <link type="text/css" rel="stylesheet" href="{$relpath}/css/general.css"/>
+     </head>
+     <body>
+       <xsl:if test="$content='only'">
+         <xsl:attribute name="class">content</xsl:attribute>
+         <xsl:apply-templates select="office:document-content/office:body/*"/>
+       </xsl:if>
+       <xsl:if test="$content='  '">
+         <div id="divTitle" class="title">
+           <xsl:value-of select="$content"/>
+           <xsl:value-of select="office:document-meta/office:meta/dc:title"/>
+         </div>
+         <div id="divContent" class="content">
+           <iframe src="?content=only" style="width:100%; height:100%" frameborder="0"/>
+         </div>
+       </xsl:if>
+     </body>
+   </html>
+ </xsl:template>
- \\          </head>
+ <xsl:template match="text:p">
+   <p>
+     <xsl:for-each select="node()">
+       <xsl:choose>
+         <xsl:when test="name()=' '">
+           <xsl:value-of select="."/>
+         </xsl:when>
+         <xsl:otherwise>
+           <xsl:apply-templates select="."/>
+         </xsl:otherwise>
+       </xsl:choose>
+     </xsl:for-each>
+   </p>
+ </xsl:template>
- \\          <body>
- \\    <xsl:if test="$content='only'">
- \\                                 <xsl:attribute
- name="class">content</xsl:attribute>
- \\                                </xsl:if>
+ <xsl:template match="text:p" mode="table">
+   <xsl:for-each select="node()">
+     <xsl:choose>
+       <xsl:when test="name()=' '">
+         <xsl:value-of select="."/>
+       </xsl:when>
+       <xsl:otherwise>
+         <xsl:apply-templates select="."/>
+       </xsl:otherwise>
+     </xsl:choose>
+   </xsl:for-each>
+ </xsl:template>
- \\                         <xsl:if test="$content='  '">
- \\                          <div id="divTitle" class="title"><xsl:value-of
- select="$content"/><xsl:value-of
- select="office:document-meta/office:meta/dc:title"/></div>
+ <xsl:template match="text:a">
+   <a href="{@xlink:href}">
+     <xsl:value-of select="."/>
+   </a>
+ </xsl:template>
- \\                                        <div id="divContent" class="content">
- \\                                                <iframe src="?content=only"
- style="width:100%; height:100%" frameborder="0"></iframe>
- \\                                        </div>
- \\                           </xsl:if>
+ <xsl:template match="table:table">
+   <table>
+     <xsl:for-each select="table:table-header-rows/table:table-row">
+       <tr>
+         <xsl:for-each select="table:table-cell">
+           <th>
+             <xsl:value-of select="text:p"/>
+           </th>
+         </xsl:for-each>
+       </tr>
+     </xsl:for-each>
- \\                                <xsl:if test="$content='only'">
- \\     <xsl:for-each select="office:document-content/office:body/*">
+     <xsl:for-each select="table:table-row">
+       <tr>
+         <xsl:choose>
+           <xsl:when test="position() mod 2 = 1">
+             <xsl:attribute name="class">odd</xsl:attribute>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:attribute name="class">even</xsl:attribute>
+           </xsl:otherwise>
+         </xsl:choose>
+         <xsl:for-each select="table:table-cell">
+           <td>
- \\      <xsl:apply-templates select="."/>
? ^^

+             <xsl:apply-templates select="." mode="table"/>
? ^^^^^^                                     +++++++++++++

+           </td>
+         </xsl:for-each>
+       </tr>
- \\     </xsl:for-each>
? ---

+     </xsl:for-each>
+   </table>
- \\                                </xsl:if>
- \\          </body>
- \\  </html>
- \\ </xsl:template>
? ---

+ </xsl:template>
- \\ <xsl:template match="text:p">
? ---                          ^

+ <xsl:template match="text:line-break">
?                           ^^^^^^^^^^

+   <br/>
- \\  <p>
- \\   <xsl:for-each select="node()">
- \\    <xsl:choose>
- \\     <xsl:when test="name()=' '">
- \\      <xsl:value-of select="."/>
- \\     </xsl:when>
- \\     <xsl:otherwise>
- \\      <xsl:apply-templates select="."/>
- \\     </xsl:otherwise>
- \\    </xsl:choose>
- \\   </xsl:for-each>
- \\  </p>
- \\ </xsl:template>
? ---

+ </xsl:template>
- \\ <xsl:template match="text:p" mode="table">
? ---                          ^^^^^^^^^^^^^^

+ <xsl:template match="text:h">
?                           ^

+   <xsl:element name="h{@text:level}">
- \\   <xsl:for-each select="node()">
- \\    <xsl:choose>
- \\     <xsl:when test="name()=' '">
- \\      <xsl:value-of select="."/>
? ----

+     <xsl:value-of select="."/>
+   </xsl:element>
- \\     </xsl:when>
- \\     <xsl:otherwise>
- \\      <xsl:apply-templates select="."/>
- \\     </xsl:otherwise>
- \\    </xsl:choose>
- \\   </xsl:for-each>
- \\ </xsl:template>
? ---

+ </xsl:template>
- \\ <xsl:template match="text:a">
? ---                         ^^

+ <xsl:template match="text()">
?                          ^^

+   <!-- ignore unwanted text nodes -->
- \\  <a>
- \\   <xsl:attribute name="href"><xsl:value-of
- select="@xlink:href"/></xsl:attribute>
- \\   <xsl:value-of select="."/>
- \\  </a>
- \\ </xsl:template>
? ---

+ </xsl:template>
- \\ <xsl:template match="table:table">
- \\  <table>
- \\   <xsl:for-each select="table:table-header-rows/table:table-row">
- \\    <tr>
- \\     <xsl:for-each select="table:table-cell">
- \\      <th>
- \\       <xsl:value-of select="text:p"/>
- \\      </th>
- \\     </xsl:for-each>
- \\    </tr>
- \\   </xsl:for-each>
- \\   <xsl:for-each select="table:table-row">
- \\    <tr>
- \\      <xsl:choose>
- \\       <xsl:when test="position() mod 2 = 1">
- \\        <xsl:attribute name="class">odd</xsl:attribute>
- \\       </xsl:when>
- \\       <xsl:otherwise>
- \\        <xsl:attribute name="class">even</xsl:attribute>
- \\       </xsl:otherwise>
- \\      </xsl:choose>
- \\     <xsl:for-each select="table:table-cell">
- \\      <td>
- \\       <xsl:apply-templates select="." mode="table"/>
- \\      </td>
- \\     </xsl:for-each>
- \\    </tr>
- \\   </xsl:for-each>
- \\  </table>
- \\ </xsl:template>
- 
- \\ <xsl:template match="text:line-break">
- \\  <br/>
- \\ </xsl:template>
- 
- \\ <xsl:template match="text:h">
- \\  <xsl:choose>
- \\   <xsl:when test="@text:level='1'">
- \\    <h1><xsl:value-of select="."/></h1>
- \\   </xsl:when>
- \\   <xsl:when test="@text:level='2'">
- \\    <h2><xsl:value-of select="."/></h2>
- \\   </xsl:when>
- \\   <xsl:when test="@text:level='3'">
- \\    <h3><xsl:value-of select="."/></h3>
- \\   </xsl:when>
- \\  </xsl:choose>
- \\ </xsl:template>
- 
- \\        <xsl:template match="text()"></xsl:template>
- \\</xsl:stylesheet>
? --

+ </xsl:stylesheet>
- }}
+ }}}
?   +




Mime
View raw message