Author: buildbot
Date: Tue Nov 29 21:32:09 2011
New Revision: 799477
Log:
Staging update by buildbot
Added:
websites/staging/ooo-site/trunk/content/xml/oasis/
websites/staging/ooo-site/trunk/content/xml/oasis/extract-manifest.xsl
websites/staging/ooo-site/trunk/content/xml/oasis/extract-strict.xsl
websites/staging/ooo-site/trunk/content/xml/oasis/extract.xsl
websites/staging/ooo-site/trunk/content/xml/oasis/index.html
websites/staging/ooo-site/trunk/content/xml/oasis/oasis2ooo.xsl
websites/staging/ooo-site/trunk/content/xml/oasis/office-spec.sxw (with
props)
websites/staging/ooo-site/trunk/content/xml/oasis/ooo2oasis.xsl
websites/staging/ooo-site/trunk/content/xml/oasis/opendocument-package.odt
(with props)
websites/staging/ooo-site/trunk/content/xml/oasis/opendocument-spec.odt
(with props)
websites/staging/ooo-site/trunk/content/xml/oasis/process_xsd.xsl
websites/staging/ooo-site/trunk/content/xml/oasis/simplify_rng.xsl
Added: websites/staging/ooo-site/trunk/content/xml/oasis/extract-manifest.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/extract-manifest.xsl
(added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/extract-manifest.xsl Tue
Nov 29 21:32:09 2011
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:text="http://openoffice.org/2000/text"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style">
+
+ <xsl:output method="text"/>
+
+ <!-- which paragraph styles do we wish to extract? Default: Code -->
+ <xsl:param name="style" select="'RelaxNG Manifest'"/>
+
+ <!-- default: don't output anything -->
+ <xsl:template match="text()"/>
+
+ <!-- paragraph with the proper style found? Then generate output! -->
+ <xsl:template match="text:p">
+
+ <!-- determine all parent styles of this paragraph; use key 'parents' -->
+ <xsl:variable name="parents"
+ select="@text:style-name |
+ key('parents',@text:style-name) |
+ key('parents',key('parents',@text:style-name)) |
+ key('parents',key('parents',key('parents',@text:style-name)))"/>
+
+ <!-- if proper parent style is found, generate output! -->
+ <xsl:if test="$parents = $style">
+ <xsl:apply-templates mode="output"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:key name="parents"
+ match="style:style/@style:parent-style-name"
+ use="../@style:name" />
+
+ <!-- generate output: just copy all text we find -->
+ <xsl:template mode="output">
+ <xsl:copy>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template mode="output" match="text()">
+ <xsl:copy/>
+ </xsl:template>
+
+ <!-- white space handling: <text:s>, <text:tab> elements -->
+ <xsl:template mode="output" match="text:tab-stop">
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template mode="output" match="text:s">
+ <xsl:call-template name="repeat">
+ <xsl:with-param name="count" select="@text:c"/>
+ <xsl:with-param name="string" select="' '"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="repeat">
+ <xsl:param name="count"/>
+ <xsl:param name="string"/>
+ <xsl:if test="$count > 0">
+ <xsl:value-of select="$string"/>
+ <xsl:call-template name="repeat">
+ <xsl:with-param name="count" select="$count -1"/>
+ <xsl:with-param name="string" select="$string"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: websites/staging/ooo-site/trunk/content/xml/oasis/extract-strict.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/extract-strict.xsl (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/extract-strict.xsl Tue
Nov 29 21:32:09 2011
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:text="http://openoffice.org/2000/text"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style">
+
+ <xsl:output method="text"/>
+
+ <!-- which paragraph styles do we wish to extract? Default: Code -->
+ <xsl:param name="style" select="'RelaxNG Strict'"/>
+
+ <!-- default: don't output anything -->
+ <xsl:template match="text()"/>
+
+ <!-- paragraph with the proper style found? Then generate output! -->
+ <xsl:template match="text:p">
+
+ <!-- determine all parent styles of this paragraph; use key 'parents' -->
+ <xsl:variable name="parents"
+ select="@text:style-name |
+ key('parents',@text:style-name) |
+ key('parents',key('parents',@text:style-name)) |
+ key('parents',key('parents',key('parents',@text:style-name)))"/>
+
+ <!-- if proper parent style is found, generate output! -->
+ <xsl:if test="$parents = $style">
+ <xsl:apply-templates mode="output"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:key name="parents"
+ match="style:style/@style:parent-style-name"
+ use="../@style:name" />
+
+ <!-- generate output: just copy all text we find -->
+ <xsl:template mode="output">
+ <xsl:copy>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template mode="output" match="text()">
+ <xsl:copy/>
+ </xsl:template>
+
+ <!-- white space handling: <text:s>, <text:tab> elements -->
+ <xsl:template mode="output" match="text:tab-stop">
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template mode="output" match="text:s">
+ <xsl:call-template name="repeat">
+ <xsl:with-param name="count" select="@text:c"/>
+ <xsl:with-param name="string" select="' '"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="repeat">
+ <xsl:param name="count"/>
+ <xsl:param name="string"/>
+ <xsl:if test="$count > 0">
+ <xsl:value-of select="$string"/>
+ <xsl:call-template name="repeat">
+ <xsl:with-param name="count" select="$count -1"/>
+ <xsl:with-param name="string" select="$string"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: websites/staging/ooo-site/trunk/content/xml/oasis/extract.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/extract.xsl (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/extract.xsl Tue Nov 29
21:32:09 2011
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:text="http://openoffice.org/2000/text"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style">
+
+ <xsl:output method="text"/>
+
+ <!-- which paragraph styles do we wish to extract? -->
+ <xsl:param name="style" select="'RelaxNG'"/>
+ <xsl:param name="style2" select="'Changed Relax NG'"/>
+
+ <!-- default: don't output anything -->
+ <xsl:template match="text()"/>
+
+ <!-- paragraph with the proper style found? Then generate output! -->
+ <xsl:template match="text:p">
+
+ <!-- determine all parent styles of this paragraph; use key 'parents' -->
+ <xsl:variable name="parents"
+ select="@text:style-name |
+ key('parents',@text:style-name) |
+ key('parents',key('parents',@text:style-name)) |
+ key('parents',key('parents',key('parents',@text:style-name)))"/>
+
+ <!-- if proper parent style is found, generate output! -->
+ <xsl:if test="$parents = $style or $parents = $style2">
+ <xsl:apply-templates mode="output"/>
+ <xsl:text>
+</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:key name="parents"
+ match="style:style/@style:parent-style-name"
+ use="../@style:name" />
+
+ <!-- generate output: just copy all text we find -->
+ <xsl:template mode="output">
+ <xsl:copy>
+ <xsl:apply-templates/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template mode="output" match="text()">
+ <xsl:copy/>
+ </xsl:template>
+
+ <!-- white space handling: <text:s>, <text:tab> elements -->
+ <xsl:template mode="output" match="text:tab-stop">
+ <xsl:text> </xsl:text>
+ </xsl:template>
+
+ <xsl:template mode="output" match="text:s">
+ <xsl:call-template name="repeat">
+ <xsl:with-param name="count" select="@text:c"/>
+ <xsl:with-param name="string" select="' '"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="repeat">
+ <xsl:param name="count"/>
+ <xsl:param name="string"/>
+ <xsl:if test="$count > 0">
+ <xsl:value-of select="$string"/>
+ <xsl:call-template name="repeat">
+ <xsl:with-param name="count" select="$count -1"/>
+ <xsl:with-param name="string" select="$string"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: websites/staging/ooo-site/trunk/content/xml/oasis/index.html
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/index.html (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/index.html Tue Nov 29
21:32:09 2011
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<link href="/css/ooo.css" rel="stylesheet" type="text/css">
+
+
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+
+
+</head>
+
+<body>
+ <div id="banner">
+ <div id="bannerleft"><a alt="Apache OpenOffice.org (incubating)" href="/">
+ <img id="ooo-logo alt="Apache OpenOffice.org (Incubating)"
src="/images/ooo-logo.png"/></a></div>
+ <div id="bannerright"><a alt="Apache Incubator"
href="http://incubator.apache.org">
+ <img id="asf-logo" alt="Apache Incubator"
src="/images/apache-incubator-logo.png"/></a></div>
+ <div id="bannercenter"><br/>(incubating) | The Free and Open
Productivity Suite</div>
+ </div>
+ <div id="clear"></div>
+
+ <div id="content">
+
+
+
+ <h1>Under Construction</h1>
+ <p>This page is under construction. Please visit again later.</p>
+
+ <p>Currently hosted are the following files:</p>
+
+ <dl>
+ <dt><a href="office-spec.sxw">office-spec.sxw</a></dt>
+ <dd>
+ <p>Working document for the OASIS Open Office TC specification. This
+ draft is only used internally by the TC.</p>
+ <p><b>Note:</b> The current <em>committee draft</em> is available
+ <a
+ href="http://www.oasis-open.org/office/">here</a>.</p>
+ </dd>
+ <dt><a href="extract.xsl">extract.xsl</a></dt>
+ <dd>
+ <p>XSLT to extract the Relax NG from the specification document.</p>
+ <p>May also be used to extract text of a specific format from
+ any OASIS Open Office or OpenOffice.org document.</p>
+ </dd>
+ <dt><a href="oasis2ooo.xsl">oasis2ooo.xsl</a></dt>
+ <dd>
+ <p>XSLT to transform OASIS Open Office into OpenOffice.org documents.</p>
+ </dd>
+ <dt><a href="ooo2oasis.xsl">ooo2oasis.xsl</a></dt>
+ <dd>
+ <p>XSLT to transform OpenOffice.org into OASIS Open Office documents.</p>
+ </dd>
+ </dl>
+
+
+<p>CVS history and past versions of these documents may be accessed
+through <a
+href="http://xml.openoffice.org/servlets/ProjectSource#commandlinecvs"/>anonymous
+CVS</a> or a <a
+href="http://xml.openoffice.org/source/browse/xml/www/oasis/">CVS web
+front end</a>. The CVS path to the documents is <tt>xml/www/oasis</tt>. </p>
+
+
+ </div>
+
+ <div id="footera">
+ <div id="poweredbya">
+ <p><img src="/images/feather-small.gif"/><br/>Powered by the Apache
CMS.</p>
+ </div>
+ <div id="copyrighta">
+ <p>
+ Apache "OpenOffice.org" is an effort undergoing incubation at The
Apache Software Foundation (ASF), sponsored by the Apache Incubator.
+ Incubation is required of all newly accepted projects until a further
review indicates that the infrastructure, communications, and
+ decision making process have stabilized in a manner consistent with
other successful ASF projects. While incubation status is
+ not necessarily a reflection of the completeness or stability of the
code, it does indicate that the project has
+ yet to be fully endorsed by the ASF.</p>
+ <p>
+ <a href="/contact.html">Contact Us</a> |
+ <a href="/terms.html">Terms of Use</a>
+ <br />Apache and the Apache feather logos are trademarks of The Apache
Software Foundation.
+ <br />OpenOffice.org and the seagull logo are registered trademarks of
The Apache Software Foundation.
+ <br />Other names appearing on the site may be trademarks of their
respective owners.
+ </p>
+ </div>
+ </div>
+
+</body>
+</html>
Added: websites/staging/ooo-site/trunk/content/xml/oasis/oasis2ooo.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/oasis2ooo.xsl (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/oasis2ooo.xsl Tue Nov 29
21:32:09 2011
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:text="http://openoffice.org/2000/text"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style" >
+
+
+ <xsl:output method="xml"/>
+
+ <!-- default: copy everything. -->
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <!-- #1: remove 'genre' elements -->
+ <xsl:template match="office:text|office:global-text|office:drawing|
+ office:presentation|office:spreadsheet|office:chart">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: websites/staging/ooo-site/trunk/content/xml/oasis/office-spec.sxw
==============================================================================
Binary file - no diff available.
Propchange: websites/staging/ooo-site/trunk/content/xml/oasis/office-spec.sxw
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: websites/staging/ooo-site/trunk/content/xml/oasis/ooo2oasis.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/ooo2oasis.xsl (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/ooo2oasis.xsl Tue Nov 29
21:32:09 2011
@@ -0,0 +1,547 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:o-office="http://openoffice.org/2000/office"
+ xmlns:office="urn:oasis:names:tc:openoffice:xmlns:office:1.0"
+ xmlns:o-meta="http://openoffice.org/2000/meta"
+ xmlns:meta="urn:oasis:names:tc:openoffice:xmlns:meta:1.0"
+ xmlns:o-style="http://openoffice.org/2000/style"
+ xmlns:style="urn:oasis:names:tc:openoffice:xmlns:style:1.0"
+ xmlns:o-script="http://openoffice.org/2000/script"
+ xmlns:script="urn:oasis:names:tc:openoffice:xmlns:script:1.0"
+ xmlns:o-form="http://openoffice.org/2000/form"
+ xmlns:form="urn:oasis:names:tc:openoffice:xmlns:form:1.0"
+ xmlns:o-number="http://openoffice.org/2000/datastyle"
+ xmlns:number="urn:oasis:names:tc:openoffice:xmlns:datastyle:1.0"
+ xmlns:o-config="http://openoffice.org/2001/config"
+ xmlns:config="urn:oasis:names:tc:openoffice:xmlns:config:1.0"
+ xmlns:o-text="http://openoffice.org/2000/text"
+ xmlns:text="urn:oasis:names:tc:openoffice:xmlns:text:1.0"
+ xmlns:o-table="http://openoffice.org/2000/table"
+ xmlns:table="urn:oasis:names:tc:openoffice:xmlns:table:1.0"
+ xmlns:o-draw="http://openoffice.org/2000/drawing"
+ xmlns:draw="urn:oasis:names:tc:openoffice:xmlns:drawing:1.0"
+ xmlns:o-presentation="http://openoffice.org/2000/presentation"
+ xmlns:presentation="urn:oasis:names:tc:openoffice:xmlns:presentation:1.0"
+ xmlns:o-dr3d="http://openoffice.org/2000/dr3d"
+ xmlns:dr3d="urn:oasis:names:tc:openoffice:xmlns:dr3d:1.0"
+ xmlns:o-chart="http://openoffice.org/2000/charting"
+ xmlns:chart="urn:oasis:names:tc:openoffice:xmlns:charting:1.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ exclude-result-prefixes="o-office o-meta o-style o-config o-table o-text"
+>
+
+
+ <xsl:output method="xml"/>
+
+ <!-- default: copy everything. -->
+ <xsl:template match="o-office:*">
+ <xsl:element name="office:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-office:*">
+ <xsl:attribute name="office:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-meta:*">
+ <xsl:element name="meta:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-meta:*">
+ <xsl:attribute name="meta:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-style:*">
+ <xsl:element name="style:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-style:*">
+ <xsl:attribute name="style:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-script:*">
+ <xsl:element name="script:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-script:*">
+ <xsl:attribute name="script:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-form:*">
+ <xsl:element name="form:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-form:*">
+ <xsl:attribute name="form:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-number:*">
+ <xsl:element name="number:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-number:*">
+ <xsl:attribute name="number:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-config:*">
+ <xsl:element name="config:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-config:*">
+ <xsl:attribute name="config:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-text:*">
+ <xsl:element name="text:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-text:*">
+ <xsl:attribute name="text:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-table:*">
+ <xsl:element name="table:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-table:*">
+ <xsl:attribute name="table:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-draw:*">
+ <xsl:element name="draw:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-draw:*">
+ <xsl:attribute name="draw:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-presentation:*">
+ <xsl:element name="presentation:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-presentation:*">
+ <xsl:attribute name="presentation:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-dr3d:*">
+ <xsl:element name="dr3d:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-dr3d:*">
+ <xsl:attribute name="dr3d:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-chart:*">
+ <xsl:element name="chart:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-chart:*">
+ <xsl:attribute name="chart:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-draw:*">
+ <xsl:element name="draw:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-draw:*">
+ <xsl:attribute name="draw:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="dc:*">
+ <xsl:element name="dc:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- also introduce a copy mode -->
+ <xsl:template mode="copy" match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <!-- uuh, that was easy. Now we only need to process all changes... -->
+
+
+
+ <!-- #1: add 'genre' elements instead of office:class -->
+ <xsl:template match="o-office:body">
+ <office:body>
+ <xsl:choose>
+
+ <xsl:when test="/node()[@o-office:class='text']">
+ <office:text><xsl:apply-templates/></office:text>
+ </xsl:when>
+
+ <xsl:when test="/node()[@o-office:class='text-global']">
+ <office:text text:global="true"><xsl:apply-templates/></office:text>
+ </xsl:when>
+
+ <xsl:when test="/node()[@o-office:class='drawing']">
+ <office:drawing><xsl:apply-templates/></office:drawing>
+ </xsl:when>
+
+ <xsl:when test="/node()[@o-office:class='presentation']">
+ <office:presentation><xsl:apply-templates/></office:presentation>
+ </xsl:when>
+
+ <xsl:when test="/node()[@o-office:class='spreadsheet']">
+ <office:spreadsheet>
+ <xsl:apply-templates select="@table:structure-protected"
+ mode="copy"/> <!-- cf. #3 -->
+ <xsl:apply-templates/>
+ </office:spreadsheet>
+ </xsl:when>
+
+ <xsl:when test="/node()[@o-office:class='chart']">
+ <office:chart><xsl:apply-templates/></office:chart>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:message>No known office:body/@office:class found</xsl:message>
+ </xsl:otherwise>
+
+ </xsl:choose>
+ </office:body>
+ </xsl:template>
+ <xsl:template match="@o-office:class"/>
+
+ <!-- #2: office:document-settings/office:settings optional: no transform -->
+
+ <!-- #3: move table:structure-protected attribute from body to 'genre' -->
+ <xsl:template match="o-office:body/@o-table:structure-protected"/>
+
+ <!-- #4: meta:keywords removed; multiple keywords may occur -->
+ <xsl:template match="o-meta:keywords">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <!-- #5: replace ordered + unordered lists by lists -->
+ <xsl:template match="o-text:ordered-list|o-text:unordered-list">
+ <text:list>
+ <xsl:apply-templates select="*|@*|text()"/>
+ </text:list>
+ </xsl:template>
+
+ <!-- #6: rename tab-stop to tab -->
+ <xsl:template match="o-text:tab-stop">
+ <text:tab><xsl:apply-templates select="@*"/></text:tab>
+ </xsl:template>
+
+ <!-- #7: new numbered-para element: no transform necessary -->
+
+ <!-- #8: move redline protection-key to app-specific settings -->
+ <xsl:template match="o-text:tracked-changes/@o-text:protection-key"/>
+
+ <xsl:template
match="o-config:config-item-set[@config:name='configuration-settings']">
+ <config:config-item-set>
+ <xsl:apply-templates select="@*"/>
+ <xsl:apply-templates/>
+ <xsl:if
test="/o-office:document/o-office:body/o-text:tracked-changes/@o-text:protection-key">
+ <config:config-item
+ config:name="ChangesProtectionKey"
+ config:type="string">
+ <xsl:value-of
select="/o-office:document/o-office:body/o-text:tracked-changes/@o-text:protection-key"/>
+ </config:config-item>
+ </xsl:if>
+ </config:config-item-set>
+ </xsl:template>
+
+ <!-- #9: replace footnote/endnotes with generic note concept -->
+ <xsl:template match="o-text:footnote|o-text:endnote">
+ <text:note text:note-class="{local-name(.)}">
+ <xsl:apply-templates select="*|@*"/>
+ </text:note>
+ </xsl:template>
+ <xsl:template match="o-text:footnote-body|o-text:endnote-body">
+ <text:o-note-body>
+ <xsl:apply-templates/>
+ </text:o-note-body>
+ </xsl:template>
+ <xsl:template match="o-text:footnote-citation|o-text:endnote-citation">
+ <text:o-note-citation>
+ <xsl:apply-templates/>
+ </text:o-note-citation>
+ </xsl:template>
+ <xsl:template
match="o-text:footnotes-configuration|o-text:endnotes-configuration">
+ <text:notes-configuration
text:note-class="{substring-before(local-name(.),'s-')}">
+ <xsl:apply-templates select="*|@*"/>
+ </text:notes-configuration>
+ </xsl:template>
+ <xsl:template match="o-text:footnote-ref|o-text:endnote-ref">
+ <text:note-ref>
+ <xsl:apply-templates/>
+ </text:note-ref>
+ </xsl:template>
+
+ <!-- #10: replace subtable element with attribute -->
+ <xsl:template match="o-table:sub-table">
+ <table:table table:is-sub-table="true">
+ <xsl:apply-templates select="*|@*"/>
+ </table:table>
+ </xsl:template>
+
+ <!-- #11: replace text:level with text:outline-level -->
+ <xsl:template match="o-text:h/@o-text:level">
+ <xsl:attribute name="text:outline-level">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- #12: replace *.value-type and *:value with office:* -->
+ <xsl:template match="@o-text:value-type|o-table:*[local-name(.) !=
'null-date']/@o-table:value-type">
+ <xsl:attribute name="office:value-type">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-text:*[local-name(.) !=
'database-row-number']/@o-text:value[local-name(.) !=
'filter-condition']|@o-table:value">
+ <xsl:attribute name="office:value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-text:*[local-name(.) != 'page-continuation' and
local-name(.) != 'hidden-text' and not(contains(local-name(.),
'mark'))]/@o-text:string-value|@o-table:string-value">
+ <xsl:attribute name="office:string-value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-text:*[not(contains(local-name(.),
'date'))]/@o-text:date-value|o-table:*[local-name(.) !=
'null-date']/@o-table:date-value">
+ <xsl:attribute name="office:date-value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="o-text:*[not(contains(local-name(.),
'time'))]/@o-text:time-value|@o-table:time-value">
+ <xsl:attribute name="office:time-value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- #13: value-type="float" without value -->
+ <xsl:template match="o-table:table-cell[@o-table:value-type='float' and
not(@o-table:value)]">
+ <table:table-cell office:value-type="string">
+ <xsl:apply-templates select="*|@*[local-name(.) != 'value-type']"/>
+ </table:table-cell>
+ </xsl:template>
+
+ <!-- #14: text:table-of-content-source/@text:outline-level="none" -->
+ <xsl:template
match="o-text:table-of-content-source/@o-text:use-outline-level"/>
+ <xsl:template match="o-text:table-of-content-source/@o-text:outline-level">
+ <xsl:choose>
+ <xsl:when test="../@o-text:use-outline-level[.='false']">
+ <xsl:attribute name="text:outline-level">none</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <!-- #15: <text:h text:restart-numbering=".." text:start-value=".." -->
+ <!-- no transform necessary -->
+
+ <!-- #16: office:change-info uses office:meta -->
+ <!-- TODO: determine if format of date values must be changed -->
+ <xsl:template match="o-office:change-info">
+ <office:change-info>
+ <office:meta>
+ <dc:creator><xsl:value-of select="@o-office:chg-author"/></dc:creator>
+ <dc:date><xsl:value-of select="@o-office:chg-date-time"/></dc:date>
+ </office:meta>
+ </office:change-info>
+ </xsl:template>
+
+ <!-- #17: replace text:merge-last-paragraph with new encoding -->
+ <!-- TODO: here, only the flag is deleted -->
+ <xsl:template match="o-text:merge-last-paragraph"/>
+
+ <!-- #18: replace index-entry-chapter-number -->
+ <xsl:template match="o-text:index-entry-chapter-number">
+ <text:index-entry-chapter text:display="number">
+ <xsl:apply-templates select="node()|@*"/>
+ </text:index-entry-chapter>
+ </xsl:template>
+
+ <!-- #19: properties -->
+ <xsl:template
match="o-style:style[@o-style:family='text']/o-style:properties|o-style:default-style[@o-style:family='text']/o-style:properties">
+ <style:text-properties>
+ <xsl:apply-templates select="node()|@*" mode="text-props"/>
+ </style:text-properties>
+ </xsl:template>
+
+ <xsl:template
match="o-style:style[@o-style:family='paragraph']/o-style:properties|o-style:default-style[@o-style:family='paragraph']/o-style:properties">
+ <style:paragraph-properties>
+ <xsl:apply-templates select="node()|@*" mode="para-props"/>
+ </style:paragraph-properties>
+ <style:text-properties>
+ <xsl:apply-templates select="node()|@*" mode="text-props"/>
+ </style:text-properties>
+ </xsl:template>
+
+ <xsl:template
match="o-style:style[@o-style:family='graphics']/o-style:properties|o-style:default-style[@o-style:family='graphics']/o-style:properties">
+ <style:graphic-properties>
+ <xsl:apply-templates select="node()|@*" mode="graphic-props"/>
+ </style:graphic-properties>
+ <style:paragraph-properties>
+ <xsl:apply-templates select="node()|@*" mode="para-props"/>
+ </style:paragraph-properties>
+ <style:text-properties>
+ <xsl:apply-templates select="node()|@*" mode="text-props"/>
+ </style:text-properties>
+ </xsl:template>
+
+ <!-- text properties -->
+ <xsl:template match="o-text:*" mode="text-props">
+ <xsl:element name="text:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-text:*" mode="text-props">
+ <xsl:attribute name="text:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="o-style:*" mode="text-props">
+ <xsl:element name="style:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-style:*" mode="text-props">
+ <xsl:attribute name="style:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="@fo:*" mode="text-props">
+ <xsl:copy/>
+ </xsl:template>
+ <xsl:template match="text()" mode="text-props">
+ <copy/>
+ </xsl:template>
+ <xsl:template match="node()|@*" mode="text-props"/>
+
+ <!-- paragraph properties -->
+ <xsl:template match="o-text:*" mode="para-props">
+ <xsl:element name="text:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-text:*" mode="para-props">
+ <xsl:attribute name="text:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="o-style:*" mode="para-props">
+ <xsl:element name="style:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-style:*" mode="para-props">
+ <xsl:attribute name="style:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="@fo:*" mode="para-props">
+ <xsl:copy/>
+ </xsl:template>
+ <xsl:template match="node()|@*" mode="para-props"/>
+
+ <!-- graphic properties -->
+ <xsl:template match="@o-text:*" mode="graphic-props">
+ <xsl:if test="starts-with(local-name(.), 'animation')">
+ <xsl:attribute name="text:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:template>
+ <xsl:template match="o-draw:*" mode="graphic-props">
+ <xsl:element name="draw:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-draw:*" mode="graphic-props">
+ <xsl:attribute name="draw:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="o-dr3d:*" mode="graphic-props">
+ <xsl:element name="dr3d:{local-name(.)}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+ <xsl:template match="@o-dr3d:*" mode="graphic-props">
+ <xsl:attribute name="dr3d:{local-name(.)}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+ <xsl:template match="@svg:*" mode="graphic-props">
+ <xsl:copy/>
+ </xsl:template>
+ <xsl:template match="node()|@*" mode="graphic-props"/>
+
+ <!-- #20: page-master becomes page layout -->
+ <xsl:template match="o-style:page-master">
+ <style:page-layout>
+ <xsl:apply-templates select="*|@*"/>
+ </style:page-layout>
+ </xsl:template>
+ <xsl:template match="@o-style:page-master-name">
+ <xsl:attribute name="style:page-layout-name">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
+</xsl:stylesheet>
Added:
websites/staging/ooo-site/trunk/content/xml/oasis/opendocument-package.odt
==============================================================================
Binary file - no diff available.
Propchange:
websites/staging/ooo-site/trunk/content/xml/oasis/opendocument-package.odt
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: websites/staging/ooo-site/trunk/content/xml/oasis/opendocument-spec.odt
==============================================================================
Binary file - no diff available.
Propchange:
websites/staging/ooo-site/trunk/content/xml/oasis/opendocument-spec.odt
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: websites/staging/ooo-site/trunk/content/xml/oasis/process_xsd.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/process_xsd.xsl (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/process_xsd.xsl Tue Nov
29 21:32:09 2011
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+>
+
+ <xsl:output method="xml"/>
+
+ <!-- default: copy everything. -->
+ <xsl:template match="length">
+ <xsl:element name="xs:length">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: websites/staging/ooo-site/trunk/content/xml/oasis/simplify_rng.xsl
==============================================================================
--- websites/staging/ooo-site/trunk/content/xml/oasis/simplify_rng.xsl (added)
+++ websites/staging/ooo-site/trunk/content/xml/oasis/simplify_rng.xsl Tue Nov
29 21:32:09 2011
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rng="http://relaxng.org/ns/structure/1.0"
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ exclude-result-prefixes="#default rng"
+>
+
+ <xsl:output method="xml"/>
+
+ <!-- unify type of "table:protection-key" attribute -->
+ <xsl:template match="rng:attribute[@name='table:protection-key']/rng:text">
+ <ref name="string"/>
+ </xsl:template>
+
+ <!-- simplify "form-property-type-and-value-list" -->
+ <xsl:template match="rng:define[@name='form-property-type-and-value-list']">
+ <define name="form-property-type-and-value-list">
+ <attribute name="office:value-type">
+ <choice>
+ <value>float</value>
+ <value>percentage</value>
+ <value>currency</value>
+ <value>date</value>
+ <value>time</value>
+ <value>boolean</value>
+ <value>string</value>
+ <value>void</value>
+ </choice>
+ </attribute>
+ <zeroOrMore>
+ <element name="form:list-value">
+ <optional>
+ <attribute name="office:value">
+ <ref name="double"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="office:currency">
+ <ref name="string"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="office:date-value">
+ <ref name="dateOrDateTime"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="office:time-value">
+ <ref name="duration"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="office:boolean-value">
+ <ref name="boolean"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="office:string-value">
+ <ref name="string"/>
+ </attribute>
+ </optional>
+ </element>
+ </zeroOrMore>
+ </define>
+ </xsl:template>
+
+ <!-- simplify "style-style-content" -->
+ <xsl:template match="rng:define[@name='style-style-content']">
+ <xsl:if test=".//rng:value='text'">
+ <define name="style-style-content" combine="choice">
+ <attribute name="style:family">
+ <choice>
+ <value>text</value>
+ <value>paragraph</value>
+ <value>section</value>
+ <value>ruby</value>
+ <value>table</value>
+ <value>table-column</value>
+ <value>table-row</value>
+ <value>table-cell</value>
+ <value>graphic</value>
+ <value>presentation</value>
+ <value>drawing-page</value>
+ <value>chart</value>
+ </choice>
+ </attribute>
+ <optional>
+ <ref name="style-table-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-table-column-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-table-row-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-table-cell-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-chart-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-graphic-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-section-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-paragraph-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-text-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-ruby-properties"/>
+ </optional>
+ <optional>
+ <ref name="style-drawing-page-properties"/>
+ </optional>
+ </define>
+ </xsl:if>
+ </xsl:template>
+
+ <!-- simplify "table-rows-and-groups" -->
+ <xsl:template match="rng:define[@name='table-rows-and-groups']">
+ <define name="table-rows-and-groups">
+ <oneOrMore>
+ <choice>
+ <ref name="table-table-row-group"/>
+ <ref name="table-table-header-rows"/>
+ <ref name="table-table-rows"/>
+ <ref name="table-table-row"/>
+ </choice>
+ </oneOrMore>
+ </define>
+ </xsl:template>
+
+ <xsl:template match="rng:define[@name='table-rows-no-group']"/>
+ <xsl:template match="rng:define[@name='table-rows']"/>
+
+ <!-- simplify "table-columns-and-groups" -->
+ <xsl:template match="rng:define[@name='table-columns-and-groups']">
+ <define name="table-columns-and-groups">
+ <oneOrMore>
+ <choice>
+ <ref name="table-table-column-group"/>
+ <ref name="table-table-header-columns"/>
+ <ref name="table-table-columns"/>
+ <ref name="table-table-column"/>
+ </choice>
+ </oneOrMore>
+ </define>
+ </xsl:template>
+
+ <xsl:template match="rng:define[@name='table-columns-no-group']"/>
+ <xsl:template match="rng:define[@name='table-columns']"/>
+
+ <!-- default: copy everything. -->
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>