Hi gang,
we would like to define some own tags for our project documentation. While you can
replace site.jsl, you have to copy the biggest part of it and then have to keep track
for any changes later yourself. I have transformed my local site.jsl to the following
code:
========== snip ==========
<?xml version="1.0"?>
<!DOCTYPE stylesheet [
<!ENTITY document SYSTEM "file:xdocs/stylesheets/document.ent">
<!ENTITY properties SYSTEM "file:xdocs/stylesheets/properties.ent">
<!ENTITY menu SYSTEM "file:xdocs/stylesheets/menu.ent">
<!ENTITY links SYSTEM "file:xdocs/stylesheets/links.ent">
<!ENTITY search SYSTEM "file:xdocs/stylesheets/search.ent">
<!ENTITY section SYSTEM "file:xdocs/stylesheets/section.ent">
<!ENTITY source SYSTEM "file:xdocs/stylesheets/source.ent">
<!ENTITY footer SYSTEM "file:xdocs/stylesheets/footer.ent">
<!ENTITY table SYSTEM "file:xdocs/stylesheets/table.ent">
<!ENTITY goal SYSTEM "file:xdocs/stylesheets/goal.ent">
]>
<!-- stylesheet to be used -->
<jsl:stylesheet select="$doc"
xmlns:define="jelly:define"
xmlns:j="jelly:core"
xmlns:jsl="jelly:jsl"
xmlns:log="jelly:log"
xmlns:util="jelly:util"
xmlns:x="jelly:xml"
xmlns:doc="doc"
xmlns:maven="jelly:maven"
xmlns="dummy"
trim="false">
&document;
&properties;
&menu;
&links;
&search;
§ion;
&source;
&footer;
&table;
&goal;
<!-- remove the space at the end of parsed "a" anchors -->
<jsl:template match="a" trim="false"><jsl:copy trim="true"><jsl:applyTemplates
trim="true"/></jsl:copy></jsl:template>
<!-- copy any other elements through -->
<jsl:template match="*" trim="false"><jsl:copy trim="false"><jsl:applyTemplates
trim="false"/></jsl:copy></jsl:template>
<!-- element values don't pass through as text -->
<jsl:template match="@*"/>
<!-- CDATA and text nodes pass-thru -->
<jsl:template match="text()"><x:expr select="."/></jsl:template>
</jsl:stylesheet>
========== snap ==========
Such a break-up makes it very easy to add new elements or exchange original elements
of the site.jsl. Unfortunately I cannot use (obviously) any properties declaring the
entity references in the DOCTYPE element to do something like:
<!DOCTYPE stylesheet [
<!ENTITY document SYSTEM "file:${plugin.resources}/document.ent">
<!ENTITY properties SYSTEM "file:${plugin.resources}/properties.ent">
<!ENTITY menu SYSTEM "file:${plugin.resources}/menu.ent">
<!ENTITY links SYSTEM "file:xdocs/stylesheets/links.ent">
[snip]
<!ENTITY goal SYSTEM "file:${plugin.resources}/goal.ent">
<!ENTITY mytag SYSTEM "file:xdocs/stylesheets/mytag.ent">
]>
Does anybody have another idea to achive such a functionality?
Regards,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]