OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: OpenFormula XSLT stylesheets


Dear TC members,

attached are the two XSLT stylesheets that

- create a non annotated version of the OpenFormala specification
- extract the test case tables from the OpenFormala specification

Both have to be applied to the content.xml of the annotated OpenFormula 
specification.

I'm not sure, but maybe we should include them into the OpenFormula 
specification as a (non normative) appendix.

Best regards

Michael


-- 
Michael Brauer, Technical Architect Software Engineering
StarOffice/OpenOffice.org
Sun Microsystems GmbH             Nagelsweg 55
D-20097 Hamburg, Germany          michael.brauer@sun.com
http://sun.com/staroffice         +49 40 23646 500
http://blogs.sun.com/GullFOSS

Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1,
	   D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
<?xml version="1.0" encoding="UTF-8" ?>

<!--
    Document   : deannotate-formula.xsl
    Description:
        Remove informative content from ODF Formula (OpenFormula) specification
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">
    <xsl:output method="xml"/>
    
    <!-- default: copy everything. -->
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
    
    <!-- Ignore sections that are hidable by the "Note" condition -->
    <xsl:template match="text:section[(@text:display='condition' and @text:condition='ooow:Note==0') or @text:display='none']"/>
    
    <!-- Ignore hidden text fields that are hidable by the "Note" condition -->
    <xsl:template match="text:hidden-text[@text:condition='ooow:Note==0']"/>
    
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" ?>

<!--
    Document   : extract-formula-tests.xsl
    Description:
        Extract tests from ODF Formula (OpenFormula) specification
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
                xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
                xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0">
    <xsl:output method="xml"/>
    
    <!-- default: copy everything. -->
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
    
    <!-- extra processing in office:text element required -->
    <xsl:template match="office:text">
        <xsl:copy>
            <xsl:apply-templates select="@*"/>
            <xsl:apply-templates select="node()" mode="body"/>
        </xsl:copy>
    </xsl:template>
    
    <!-- default in office:text element: ignore everything. -->
    <xsl:template match="@*|node()" mode="body"/>
    
    <!-- headings in office:text element: copy -->
    <xsl:template match="text:h" mode="body">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
    
    <!-- tables in hidable sections in office:text element: copy -->
    <xsl:template match="text:section[(@text:display='condition' and @text:condition='ooow:Note==0') or @text:display='none']//table:table" mode="body">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
    
</xsl:stylesheet>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]