Can XML been imported/transformed with API

Michael Stahl mstahl at redhat.com
Tue Mar 4 09:19:43 PST 2014


On 21/02/14 15:02, Fernand Vanrie wrote:
> 
> In the past there was some code (below originated from the Hanja
> Hermione website) to work with this JAXThelper i tried  the same code
> but now using com.sun.star.comp.documentconversion./LibXSLTTransformer/
> 
> No errors but i end up with a empty "out.txt" file

>   Dim aNamed(6) As New com.sun.star.beans.NamedValue
>   aNamed(0).Name = "StylesheetURL"
>   aNamed(0).Value = "file:///C:/yourXSLT.xsl"
>   aNamed(1).Name = "SourceURL"
>   aNamed(1).Value = "file:///C:/usr/yourcontent.xml"
>   aNamed(2).Name = "TargetURL"
>   aNamed(2).Value = "file:///C:/out.txt"
>   aNamed(3).Name = "SourceBaseURL"
>   aNamed(3).Value = "file:///C:/"
>   aNamed(4).Name = "TargetBaseURL"
>   aNamed(4).Value = "file:///C:/"
>   aNamed(5).Name = "SystemType"
>   aNamed(5).Value = ""
>   aNamed(6).Name = "PublicType"
>   aNamed(6).Value = ""
>   
>   oStreamListener = CreateUnoListener( "Stream_", _
>     "com.sun.star.io.XStreamListener" )
>   
>   oJAXHelper = CreateUnoService( _
>       "om.sun.star.comp.documentconversion./LibXSLTTransformer/ " )
>   oJAXHelper.initialize(aNamed)

this call does nothing since LO 4.0 commit
ca0ea73a4ab104031a16b5bac7a9bb6e57c77ba0
has changed the LibXSLTTransformer::initialize to expect the parameters
in a nested Sequence; i've added a fall-back on master (commit
6967da019b69767a15116de101d33a16b95c8a44) that lets this run again (both
nested and non-nested parameters), will backport to 4.2/4.1 too.




More information about the LibreOffice mailing list