bungeni-org / bungeni-editor

The Bungeni Editor is Drafting and Markup framework for XML production built on the OpenOffice.org platform. It supports different legislative document types (e.g hansard, bill) and supports definition of custom types, and allows markup and storage of metadata within the ODF document.
3 stars 0 forks source link

ODT Transformer upgrade #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The odt transformer needs to be upgrade to ODF 1.2 standards -- currently
it does not use namespaced odf properties.

Upgrade to odfdom 0.7+ and add support for namespaced attributes / properties

Original issue reported on code.google.com by ashok.ha...@gmail.com on 26 Feb 2010 at 7:35

GoogleCodeExporter commented 9 years ago

Original comment by ashok.ha...@gmail.com on 4 May 2010 at 10:37

GoogleCodeExporter commented 9 years ago
All BungeniEditor attributes in ODF are now in the anx namespace  
( anx:http://anx.akomantoso.org/1.0 )

See  the metadata setter class : 

<http://bungeni-editor.googlecode.com/svn/OpenOfficeHelper/trunk/OOoBungeniLib/s
rc/org/bungeni/ooo/OOComponentHelper.java>

<snippet>
public class OOComponentHelper {

    /**
     * Semantic namespace used for setting document metadata
     */
    public static String                   ATTRIBUTE_NAMESPACE =
"http://anx.akomantoso.org/1.0";
    public static String                   ATTRIBUTE_NAMESPACE_PREFIX = "anx:";

</snippet>

the transformer needs to process custom atttributes in this namespace 

Original comment by ashok.ha...@gmail.com on 13 May 2010 at 11:15

GoogleCodeExporter commented 9 years ago
Redo test document used by transformer unit tests - with upgraded metadata

Original comment by ashok.ha...@gmail.com on 13 May 2010 at 11:28

GoogleCodeExporter commented 9 years ago
Setting milestone current issues

Original comment by ashok.ha...@gmail.com on 14 May 2010 at 11:20

GoogleCodeExporter commented 9 years ago
Prefixing the attribute with the namespace doesnt seem to work anymore in ODF 
1.2
with ODFDOM 0.8 in MergeStyles.xsl

    <xsl:template match="*">
        <xsl:element name="{node-name(.)}">
            <xsl:variable name="stylename" select="@style-name" /> <== does not work
with text:@style-name
            <xsl:for-each select="@*">
                <xsl:attribute name="{name(.)}">
                    <xsl:value-of select="."/>
                </xsl:attribute>
            </xsl:for-each>
            <xsl:for-each
select="//style:*[@name=$stylename]//*/@*[contains(name(),'Bungeni')]"> <== 
does not
work with [style:@name .... ]
                <xsl:attribute name="{local-name(.)}">
                    <xsl:value-of select="."/>
                </xsl:attribute>
            </xsl:for-each>
            <xsl:apply-templates />
        </xsl:element>    
    </xsl:template>

Original comment by ashok.ha...@gmail.com on 14 May 2010 at 12:46

GoogleCodeExporter commented 9 years ago
Upgraded debate transform to odf 1.2 compatibilty, and to support bungeni 
metadata
namespacing. Succesful transform of odf to valid akomantoso document 

To Do :

Fix unit tests
Upgrade other document types

Original comment by ashok.ha...@gmail.com on 14 May 2010 at 3:10

GoogleCodeExporter commented 9 years ago
ODFDOM 0.8 sets namespace names correctly in getXXXdom() APIs... earlier ODFDOM 
0.6
was not setting the namespace resolver. This means prefixing attributes in the
intermediate xslt templates for the translator is no longer required.

Original comment by ashok.ha...@gmail.com on 14 May 2010 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by ashok.ha...@gmail.com on 21 Sep 2010 at 9:01