[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Possible breakage in koffice-ko to do with styles?
From:       Shaheed <srhaque () theiet ! org>
Date:       2010-04-05 13:24:56
Message-ID: 201004051424.56700.srhaque () theiet ! org
[Download RAW message or body]

On Saturday 03 Apr 2010, Jaroslaw Staniek wrote:
> On 31 March 2010 14:01, Shaheed <shaheedhaque@gmail.com> wrote:
> > Hi,
> > 
> > I just started working on koffice-ko, and noticed that filter test suite
> > fails the validation test for each file like this:
> > 
> > /tmp/tests/MSWord2003/mw03_alignment_text/styles.xml:27: element
> > font-face- decls: Relax-NG validity error : Did not expect element
> > font-face-decls there
> > /tmp/tests/MSWord2003/mw03_alignment_text/styles.xml:27: element
> > font-face- decls: Relax-NG validity error : Element document-styles has
> > extra content: font-face-decls
> > 
> > I *think* this might have been caused by the recent tidy-up of
> > KoGenStyles in r1108989. I'm not familiar with this area,so it would be
> > great if somebody could take a look.
> > 
> > Thanks, Shaheed
> > 
> > P.S. To run the tests, you'll need to do something like this:
> > > cd tests/kofficetests/interoperability/kword
> > > make
> > 
> > ...
> > all the temporary files end up in /tmp/tests
> > ...
> > 
> > > vim /tmp/tests/MSWord2003/mw03_alignment_text/content.xml
> 
> While I am willing to help, I am not (yet) sure where the correct fix
> would be needed.
> Both odf 1.0 and 1.1 RNG defines office-font-face-decls:
> 
> *
> http://www.oasis-open.org/committees/download.php/12571/OpenDocument-schem
> a-v1.0-os.rng *
> http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-schema-v1.1.rng
> 
> <define name="office-document-styles">
> <element name="office:document-styles">
> <ref name="office-document-common-attrs"/>
> <ref name="office-font-face-decls"/>
> <ref name="office-styles"/>
> <ref name="office-automatic-styles"/>
> <ref name="office-master-styles"/>
> </element>
> </define>

I'm also not an expert, but the scemha seems order sensitive. This change, to move \
the font-face-decls to the order implied above, fixes it for me:

srhaque> sdiff /tmp/tests/MSWord2003/mw03_alignment_text/styles.xml t.t
<?xml version="1.0" encoding="UTF-8"?>                          <?xml version="1.0" \
encoding="UTF-8"?> <office:document-styles xmlns:office="urn:oasis:names:tc:open   \
                <office:document-styles xmlns:office="urn:oasis:names:tc:open
                                                              >  \
                <office:font-face-decls>
                                                              >   <style:font-face \
                style:name="Courier New" svg:font-family="
                                                              >   <style:font-face \
                style:name="Times New Roman" svg:font-fami
                                                              >  \
</office:font-face-decls>  <office:styles>                                            \
                <office:styles>
...
 </office:styles>                                                </office:styles>
 <office:automatic-styles>                                       \
                <office:automatic-styles>
...
 </office:automatic-styles>                                      \
</office:automatic-styles>  <office:master-styles>                                    \
                <office:master-styles>
...
 </office:master-styles>                                         \
</office:master-styles>  <office:font-face-decls>                                     \
<  <style:font-face style:name="Courier New" svg:font-family=" <
  <style:font-face style:name="Times New Roman" svg:font-fami <
 </office:font-face-decls>                                    <
</office:document-styles>                                       \
</office:document-styles>


Does that help?

Thanks, Shaheed
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic