Re: [xsl] Open Office xml & xsl processing

Subject: Re: [xsl] Open Office xml & xsl processing
From: Russell Urquhart <russurquhart1@xxxxxxxxxxx>
Date: Mon, 18 Oct 2010 20:20:34 -0500
Wanted to thank everyone that helped me on this. 

As it turns out, as i, and many of you out there suspected, my xsl code was correct, but there was still some issues with why it wasn't working.

While i am convinced that there are more than the contents of the context.xml that constitute the whole of an Open Office writer document, and i am tracking down all of those components, my problem was a function of the .odt format versus the .sxw. I am surmising that the original transfrom, that we based our hack on, was expecting and working on a .sxw format. The documents we were using and working on were .odt. While the formats are VERY similar, there are distinctions, and my code got caught by one of these.

I was looking for style:style/style:text-position/@fo:font-weight. (This DOES exist in .odt) However, as the time the transform is applied, to a .sxw formatted file, the analogous element is:
style:style/style:position/@fo:font-weight.

Close, but not the same , and just enought to cause confustion and delay.

Solved the issue though. Thanks again to everyone that helped!


Russ 
On Mon, Oct 18, 2010 at 05:08:12PM -0400, Wendell Piez wrote:
> Hi Russ,
>
> Adding to what Gerrit says, keep in mind that different XSLT engines  
> will use different serializers, which can cause differences in output  
> that should be inessential for your purposes.
>
> For the most part. You may need to examine the particular differences, 
> and compare the results of dealing with the differences in a target 
> application, before you can tell whether they matter. Cosmetic 
> differences in XML syntax, and even differences in whitespace (depending 
> on where they are), are probably not a concern. But other differences 
> might be.
>
> If you give us more details we can probably say more.
>
> Cheers,
> Wendell
>
> At 03:55 AM 10/16/2010, you wrote:
>> The internal representation does also contain the contents of  
>> content.xml, but also other information that will be stored separately 
>> in a Zip archive when you save an .odt file.
>>
>> I suggest that you write a stylesheet with an identity template that  
>> allows exporting the internal representation in a single XML file.  
>> Because OpenOffice's debugging capabilities are very limited, you can 
>> develop your export filter against this XML export in your favorite XSL 
>> development environment.
>>
>> Since version 3.2 or 3.3, OpenOffice uses Saxon 9.1 as XSLT processor, 
>> so it's possible to use XSLT 2.0.
>>
>> -Gerrit
>>
>> On 16.10.2010 01:08, Russell Urquhart wrote:
>>
>> Hi,
>>
>> Some of you have been of help to me in trying to hack a Open Office  
>> xsl filter. Thank you!
>>
>> Another question i had. Does anyone know if the processing of the .xsl 
>> file, WHILE processed inside of Open Office (e.g. when doing a Save As 
>> using the filter) versus using an XSLT processor like Saxon or Xalan, 
>> applying the .xsl file to the content.xml file produces the same 
>> results? Is there anything special you need to do when applying the 
>> .xsl file from the command line?
>>
>> I ask because it seems that, when i run a .xsl file within Open Office 
>> i get one thing and then when i run the same .xsl file in Saxonb or 
>> Xalan, on the content.xml file, i get something else.
>>
>> Any help is appreciated!
>
>
> ======================================================================
> Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
> Mulberry Technologies, Inc.                http://www.mulberrytech.com
> 17 West Jefferson Street                    Direct Phone: 301/315-9635
> Suite 207                                          Phone: 301/315-9631
> Rockville, MD  20850                                 Fax: 301/315-8285
> ----------------------------------------------------------------------
>   Mulberry Technologies: A Consultancy Specializing in SGML and XML
> ======================================================================

Current Thread