Re: [jira] Commented: (FOR-872) Updated odt_to_xhtml.xsl to pass & <h1> elements.</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=dev@forrest.apache.org&q=from:%22Ross+Gardler%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Ross Gardler</span></span></a></span> <span class="date"><a href="/search?l=dev@forrest.apache.org&q=date:20060505" rel="nofollow">Fri, 05 May 2006 03:02:01 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre style="margin: 0em;"> Clay Leeds (JIRA) wrote: </pre><blockquote style="border-left: #5555EE solid 0.2em; margin: 0em; padding-left: 0.85em"><tt> [ <a rel="nofollow" href="http://issues.apache.org/jira/browse/FOR-872?page=comments#action_12377927">http://issues.apache.org/jira/browse/FOR-872?page=comments#action_12377927</a> ] </tt><tt> </tt><pre style="margin: 0em;"> Clay Leeds commented on FOR-872: --------------------------------</pre><pre> BTW, you could add the following to resources/stylesheets/odt-to-forrest-xhtml.xsl to get T1 to be styled as STRONG/BOLD: <xsl:template match="text:p/text:[EMAIL PROTECTED]:style-name='T1']"> <strong> <xsl:apply-templates/> </strong> </xsl:template> </pre></blockquote><pre style="margin: 0em;"> </pre><tt>I've not looked at your full stylesheets yet, but have a comment on the </tt><tt>above. </tt><pre style="margin: 0em;"> </pre><tt>The problem with this kind of approach is that it assumes that "T1" is </tt><tt>always "strong". My experience with OOo tells me this is a bad </tt><tt>assumption (may have changed in OOo2. </tt><pre style="margin: 0em;"> </pre><tt>It is better to dynamically generate the CSS from the styles definitions </tt><tt>in the ODT file. They are already in CSS format so it is not a big job. </tt><tt>I did this in the OOo plugin as an experiment [1]. What it does is use </tt><tt>the template below to generate the style definitions in the head of the </tt><tt>XDoc, but see [2] for some discussion about this. </tt><pre style="margin: 0em;"> <xsl:template name="style"> <!-- HACK: This makes intermediate documents invalid per the Forrest Document DTD. To find out why this is done this way nonetheless, read the comments attached to issue FOR-433. --> <style> <xsl:apply-templates select="//office:styles/style:style"/> <xsl:apply-templates select="//office:automatic-styles/style:style"/> </style> </xsl:template> </pre><tt>Now, as you can see this not valid in the XDoc schema. It works, but it </tt><tt>is a hack (at least it did in my experiments, but that was a long time </tt><tt>ago, things may have changed to break it now). Instead of embedding the </tt><tt>content in the XDoc head we should have a separate request that </tt><tt>generates the extra-css for the skinnning stage. We had a discussion </tt><tt>about how to do this recently [3] </tt><pre style="margin: 0em;"> </pre><tt>My ultimate goal with these experiments (which stalled a long time ago) </tt><tt>was to allow a subset of the OOo style information to pass through to </tt><tt>the rendering of a Forrest content object. The idea was to have this </tt><tt>subset defined in a config file, thus individual users would be able to </tt><tt>say what style information from OOo was vald in their final output. For </tt><tt>example, they could choose to not allow colour definition trough in </tt><tt>order to ensure a consistent colour scheme, but to allow underlines through. </tt><pre style="margin: 0em;"> Ross </pre><tt>[1] </tt><tt><a rel="nofollow" href="http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-common-to-forrest.xsl?rev=332656&view=markup">http://svn.apache.org/viewcvs.cgi/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-common-to-forrest.xsl?rev=332656&view=markup</a> </tt><pre style="margin: 0em;"> [2] <a rel="nofollow" href="http://issues.apache.org/jira/browse/FOR-433">http://issues.apache.org/jira/browse/FOR-433</a> [3] <a rel="nofollow" href="http://marc.theaimsgroup.com/?l=forrest-dev&m=114605585503695&w=2">http://marc.theaimsgroup.com/?l=forrest-dev&m=114605585503695&w=2</a> </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg09333.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd15.html#09335">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail15.html#09335">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg09343.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email tSliceCur"><span class="subject">Re: [jira] Commented: (FOR-872) Updated odt_to_xhtml.x...</span> <span class="sender italic">Ross Gardler</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09343.html">Re: [jira] Commented: (FOR-872) Updated odt_to_xh...</a></span> <span class="sender italic">Web Maestro Clay</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09344.html">Re: [jira] Commented: (FOR-872) Updated odt_t...</a></span> <span class="sender italic">Ross Gardler</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09345.html">Re: [jira] Commented: (FOR-872) Updated o...</a></span> <span class="sender italic">Cyriaque Dupoirieux</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09346.html">Re: [jira] Commented: (FOR-872) Updat...</a></span> <span class="sender italic">Ross Gardler</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09353.html">Re: [jira] Commented: (FOR-872) ...</a></span> <span class="sender italic">Web Maestro Clay</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09362.html">Re: [jira] Commented: (FOR-8...</a></span> <span class="sender italic">Ross Gardler</span></li> </ul></li> </ul></li> </ul></li> </ul></li> </ul></li> <li class="icons-email"><span class="subject"><a href="msg09349.html">Re: [jira] Commented: (FOR-872) Updated odt_to_xh...</a></span> <span class="sender italic">David Crossley</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09406.html">Re: [jira] Commented: (FOR-872) Updated odt_t...</a></span> <span class="sender italic">Clay Leeds</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09408.html">Re: [jira] Commented: (FOR-872) Updated o...</a></span> <span class="sender italic">Clay Leeds</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09412.html">Re: [jira] Commented: (FOR-872) Updat...</a></span> <span class="sender italic">Ross Gardler</span></li> </ul> </ul> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" style="display:none"> <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value=""> <input type="hidden" name="msgid" value=""> <input type="hidden" name="relpath" value=""> <input type="submit" value=""> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="dev@forrest.apache.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search dev"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/dev@forrest.apache.org/">dev - all messages</a></li> <li class="icons-about"><a href="/dev@forrest.apache.org/info.html">dev - about the list</a></li> <li class="icons-expand"><a href="/search?l=dev@forrest.apache.org&q=subject:%22Re%5C%3A+%5C%5Bjira%5C%5D+Commented%5C%3A+%5C%28FOR%5C-872%5C%29+Updated+odt_to_xhtml.xsl+to+pass+%3Ctitle%3E+%5C%26+%3Ch1%3E+elements.%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg09333.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg09343.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray"></li> </ul> </div> </body> </html> <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9abbda0ecc68e234',t:'MTc2NTM2MDM3MQ=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>