Hi Egbert

Looking at the Saxon Servlet code, any URL parameters apart from "source"
and "style" are passed to the transformer as parameters - so should be
accessible within the stylesheet as parameters.

So maybe it is possible to pass in the PID (or even a full URL) of the
object, and use this in the stylesheet to build a reference to the
stylesheets to include?

I've not tried this out... and I'm not sure how well it would work with
stylesheets that include other stylesheets, but maybe it could form the
basis of a solution to this issue?

You will have to declare the parameters in the stylesheet using <xsl:param
name="PID"/>, and then should be able to use $PID within the rest of the
stylesheet.

Regards
Steve

-----Original Message-----
From: Egbert Gramsbergen [mailto:[email protected]] 
Sent: 15 September 2010 14:48
To: [email protected]
Subject: [fcrepo-user] Xslt import/include other datastream from same object


Hi all,

I am using The Saxon service with stylesheets which are all datastreams of
one object. Serveral of these stylesheets import or include one or more of
the other stylesheets. In Fedora 3.0 I could say, e.g. in XSLT1: <xsl:import
href="XSLT2"/> where XSLT2 is the datastream ID of the imported xslt. In
Fedora 3.4 this does not work. I have to say <xsl:import href="../XSLT2"/>
(because the uri of the stylesheet given to the Saxon service contains the
date), but if XSLT2 itself imports XSLT3, the import statement in XSLT2 must
be <xsl:import href="XSLT3"/>. However, if I wish to use XSLT2 directly, it
has to be <xsl:import href="../XSLT3"/>. So it is impossible to make XSLT2
so that it works both directly and as an imported stylesheet, unless I use
urls which include the object name, like
<xsl:import="/fedora/get/aux:xslt/XSLT2"/>.
Is there a way around this? In my optimism, tried using the keyword $THIS$
(<xsl:import href="$THIS$/XSLT2"/>) in analogy to the Schema extension of
DS-COMPOSITE
(https://wiki.duraspace.org/display/FCREPO/DSCOMPOSITE-MODEL+and+Schemas)
but that obviously does not work either.

Thanks, Egbert Gramsbergen

----------------------------------------------------------------------------
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to