List Info

Thread: SV: xslt import filter with two source files possible ?




SV: xslt import filter with two source files possible ?
user name
2006-08-22 15:14:50

Bryan Rasmussen wrote:
> "Easiest way: you would use an HTTP URL and put
sourceB.xml on a webserver."
> 
> What about file protocol, IIRC Xerces handles that.

You are completely right, the file protocol is a valid
solution as well.
The only downside is, you need file access to the computer
of 
sourceB.xml, which is mostly blocked by firewalls.
This constrict the solution a little.

Svante

> 
> Cheers,
> Bryan Rasmussen
> 
> -----Oprindelig meddelelse-----
> Fra: Svante Schubert [mailto:Svante.SchubertSun.Com]
> Sendt: 22. august 2006 16:22
> Til: devxml.openoffice.org
> Emne: Re: [xml-dev] xslt import filter with two source
files possible ?
> 
> 
> Hi Oliver,
> 
> when the content.xml is processed, the base reference
of the document() 
> function is pointing to the ZIP root.
> Therefore you have to zip your sourceB.xml, if you want
to access it 
> with XSLT in the manner you mentioned.
> 
> If you want to open an arbitrary XML file outside of
the ZIP during your 
> transformation it will become a little harder.
> 
> Easiest way: you would use an HTTP URL and put
sourceB.xml on a webserver.
> 
> Svante
> 
> 
> Oliver Brinzing wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi,
>>
>> i tried to create a xslt filter to merge the
information from two *.xml
> docs into one writer doc ...
>> till now i managed to build the content.xml via a
batch file:
>>
>> set ooPath=D:\programs\soffice
>> set classPath=%ooPath%\program\classes
>> set
>
classes="%classPath%\xalan.jar;%classPath%\xml-apis.
jar;%classPath%\xercesImp
> l.jar"
>> java -cp %classes% org.apache.xalan.xslt.Process
-IN .\files\sourceA.xml
> -XSL .\filters\report.xsl
>> - -OUT content.xml
>>
>> inside "report.xls" i get information
from "sourceB.xml" via
>>
>> <xsl:variable name="sourceB"
select="document('sourceB.xml',
> /)/DATAPACKET/ROWDATA"/>
>> this works perfect as long as i do not install the
filter inside oo ...
>>
>> using file -> open ->
"sourceA.xml" to import my report fails, cause
> "sourceB.xml" is not found ...
>> document() points to
\soffice\user\xslt\MyFilter ...
>>
>> any hints ?
>>
>> Oliver
>>
>>
>>
>> GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06
4E2C AB40 CFD0 4A45
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.5 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

>>
>>
iD4DBQFE6wLWTiyrQM/QSkURAu5uAJ9sgRegP01Eswos/WjIvfp0rd44KQCV
EM1R
>> FmcIVRbvPIVuhZiLlZ8iDw==
>> =AHR9
>> -----END PGP SIGNATURE-----
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail: dev-unsubscribexml.openoffice.org
>> For additional commands, e-mail: dev-helpxml.openoffice.org
>>
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribexml.openoffice.org
> For additional commands, e-mail: dev-helpxml.openoffice.org
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribexml.openoffice.org
> For additional commands, e-mail: dev-helpxml.openoffice.org
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribexml.openoffice.org
For additional commands, e-mail: dev-helpxml.openoffice.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )