It's not a question of Xalan not being "smart enough to pull in the
extensions" -- that's how xsl:include and xsl:import work.
You will likely need XInclude to do what you want to do. You could also
experiment with using a stylesheet to transform your stylesheets to add the
necessary stuff.
Dave
burtonator
<burton@relativi To: [EMAIL PROTECTED]
ty.yi.org> cc: (bcc: David N
Bertoni/CAM/Lotus)
Subject: Ability to xsl:include Xalan
Extensions
08/02/2001 04:43
PM
Please respond
to xalan-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey.
I am working on a project which uses a LOT of Xalan extensions within a
number
of stylesheets. There are about 15 extensions and maybe 50 or 60
stylesheets.
The problem is that everytime I want to use an extenion I have to add the
following code:
Add the attributes to xsl:stylesheet
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:marks="
http://schemas.openprivacy.org/reptile/extensions/marks"
extension-element-prefixes="marks"
Then add the following under xsl:stylesheet:
<lxslt:component prefix="marks"
functions="isRead">
<lxslt:script lang="javaclass" src
="org.openprivacy.reptile.extensions.Marks"/>
</lxslt:component>
Duplicating this code in multiple places is a bad idea because it increases
maintenance and could potentially introduce bugs:
I had the idea of putting all my stylesheets under
PROJECT_HOME/xsl/extensions
This way if I wanted to use a stylesheet I could just do a:
<xsl:include href="resource:/xsl/extension/marks.xsl"/>
The only problem is that Xalan isn't smart enough to pull in the
extensions. It
only pulls in xsl:template rules.
Any idea? XInclude looks like it might help me but it would need to be
integrated into Xerces before Xalan was able to see the file.
Any idea?????
Kevin
- --
Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED] )
Cell: 408-910-6145 URL: http://relativity.yi.org ICQ: 73488596
Repeat after me: Freedom and personal responsibility good, serfdom and
tyrannical control bad.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt
iD8DBQE7abtoAwM6xb2dfE0RAhhCAKCMZU3O36rDv5/upGEEnacs+ZRwxACgjTLH
MQs6uErsfGykAw3RpgxtfGE=
=aDRS
-----END PGP SIGNATURE-----