Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r443008 - /lenya/trunk/src/modules/opendocument/xslt/common/odt: msg#00062

cms.lenya.cvs

Subject: svn commit: r443008 - /lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl

Author: cdupoirieux
Date: Wed Sep 13 09:06:25 2006
New Revision: 443008

URL: http://svn.apache.org/viewvc?view=rev&rev=443008
Log:
Add template to generate code, em, strong.
Update template to have title and target attributes on href tags
Add a sample odt file to check this.
The odt_to_xhtml.xsl contains the beginning of the Source, Note, Warning and
Fixme generation, but it is commented since it is not XHTML.

Modified:
lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl

Modified: lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl?view=diff&rev=443008&r1=443007&r2=443008
==============================================================================
--- lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl (original)
+++ lenya/trunk/src/modules/opendocument/xslt/common/odt_to_xhtml.xsl Wed Sep
13 09:06:25 2006
@@ -273,6 +273,43 @@
Yes, paragraphs in ODT really produce a <div> in XHTML,
because an ODT paragraph has no extra line spacing.
-->
+<!-- Case of Notes -->
+<!-- FIXME : this is not XHTML
+<xsl:template match="text:p[@text:style-name='Forrest_3a__20_Note']">
+ <note>
+ <xsl:apply-templates/>
+ <xsl:if test="count(node())=0"><br /></xsl:if>
+ </note>
+</xsl:template>
+-->
+<!-- Case of Warnings -->
+<!-- FIXME : this is not XHTML
+<xsl:template match="text:p[@text:style-name='Forrest_3a__20_Warning']">
+ <warning>
+ <xsl:apply-templates/>
+ <xsl:if test="count(node())=0"><br /></xsl:if>
+ </warning>
+</xsl:template>
+-->
+<!-- Case of Fixme - still a problem to retrieve the author...-->
+<!-- FIXME : this is not XHTML
+<xsl:template match="text:p[@text:style-name='Forrest_3a__20_Fixme']">
+ <fixme>
+ <xsl:apply-templates/>
+ <xsl:if test="count(node())=0"><br /></xsl:if>
+ </fixme>
+</xsl:template>
+-->
+<!-- Case of Sources -->
+<!-- FIXME : this is not XHTML
+<xsl:template match="text:p[@text:style-name='Forrest_3a__20_Source']">
+ <source>
+ <xsl:apply-templates/>
+ <xsl:if test="count(node())=0"><br /></xsl:if>
+ </source>
+</xsl:template>
+-->
+<!-- Otherwise -->
<xsl:template match="text:p">
<div class="{translate(@text:style-name,'.','_')}">
<xsl:apply-templates/>
@@ -280,6 +317,41 @@
</div>
</xsl:template>

+<!-- Case of the Code style -->
+<xsl:template match="text:span[@text:style-name='Forrest_3a__20_Code']">
+ <code>
+ <xsl:apply-templates/>
+ </code>
+</xsl:template>
+
+<!-- Case of the below style -->
+<xsl:template match="text:span[@text:style-name='Forrest_3a__20_Below']">
+ <sub>
+ <xsl:apply-templates/>
+ </sub>
+</xsl:template>
+
+<!-- Case of the above style -->
+<xsl:template match="text:span[@text:style-name='Forrest_3a__20_Above']">
+ <sup>
+ <xsl:apply-templates/>
+ </sup>
+</xsl:template>
+
+<!-- Case of the strong style -->
+<xsl:template match="text:span[@text:style-name='Strong_20_Emphasis']">
+ <strong>
+ <xsl:apply-templates/>
+ </strong>
+</xsl:template>
+
+<!-- Case of the emphasys style - generally rendered with Italic -->
+<xsl:template match="text:span[@text:style-name='Emphasis']">
+ <em>
+ <xsl:apply-templates/>
+ </em>
+</xsl:template>
+
<xsl:template match="text:span">
<span class="{translate(@text:style-name,'.','_')}">
<xsl:apply-templates/>
@@ -436,6 +508,8 @@

<xsl:template match="text:line-break">
<br />
+ <xsl:text>
+</xsl:text>
</xsl:template>

<xsl:variable name="spaces"
@@ -473,7 +547,19 @@
</xsl:template>

<xsl:template match="text:a">
-<a href="{@xlink:href}"><xsl:apply-templates/></a>
+ <a href="{@xlink:href}">
+ <xsl:if test="@office:target-frame-name">
+ <xsl:attribute name="target">
+ <xsl:value-of
select="@office:target-frame-name"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@office:name">
+ <xsl:attribute name="title">
+ <xsl:value-of select="@office:name"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </a>
</xsl:template>

<!--


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
user-groups.jax...    php.zend.framew...    os.solaris.open...    web.quixote.use...    java.openjdk.ho...    ietf.secmech/20...    gnu.glpk/2004-0...    recreation.cars...    network.smokepi...    linux.drivers.i...    cms.opencms.dev...    fonts.gfontview...    text.xml.soap.u...    voip.nist-sip/2...    debian.ports.hp...    xfree86.interna...    science.biology...    qnx.openqnx.dev...    mail.sylpheed.c...    busybox/bios/20...    emulators.kvm.s...    hardware.openco...    apple.fink.begi...    kde.german/2006...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation