Hi there!

The code calling the XSLT sets some XSLT Parameters which you can reference by $<variablename> in your Transformation.

filter/source/xsltfilter/XSLTransformer.java is where this is done in the OpenOffice.org source code.


The parameters given to the Transformation are sourceURL, sourceBaseURL, targetURL, targetBaseURL, publicType, systemType XMultiServiceFactory

I think it should be possible to extract the filename from the $sourceURL variable inside the XSLT using substringafter XSLT function with the $sourceBaseURL variable as second parameter.

Kind regards,
Bernd Eilers

Emmanuel Bégué wrote:
Hello,

I've sent this question to users' mailing list
but to no avail, so I'm sending it here; if it
is considered off topic I apologize.

I'm writing a filter in XSLT for Writer.

I need to include in the resulting XML file, the
name of the file being transformed, but I can't
seem to find it in the source XML file (neither
in <office:meta> nor elsewhere).

It also does not seem to be mentionned in the
OpenDocument spec. either (but I could be wrong).

It IS possible to include in the document a
"text field" that would hold the filename (see
OpenDocument v1.1, Chapter 6, 6.2.8 File Name
Fields).

But, if such field has not been included in
the source document, is there a way to get the
filename from within the XSLT filter?

Thanks,
Regards,
EB



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to