Playing around with Publication Templates, I have found that it would be
really nice to have something like a parent:// | ancestor:// |
fallbackfromparent:// protocol. It would do something like this:
1. context://lenya/pubs/template(my-pub)/xslt/page2xhtml.xsl
2. context://lenya/pubs/template(template(my-pub))/xslt/page2xhtml.xsl
3. ...
4. context://xslt/page2xhtml.xsl
With something like this I could have a tree of publications
(http://lenya.apache.org/1_4/reference/publication-templating/index.html)
and pubs using templates could extend the css, xslt, etc from the
parent instead of completely rewriting it.
example 1 (page2xhtml-xhtml.xsl):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:import href="parent://xslt/page2xhtml-xhtml.xsl"/>
<xsl:template match="xhtml:font">
<xhtml:strong>No font elements allowed in this publication, use css
instead</xhtml:strong>
<xsl:apply-templates select="*"/>
</xsl:template>
</xsl:stylesheet>
example 2 (xhtml.css and resources-shared.xmap):
xhtml.css:
@import url(xhtml.parent.css);
body {
margin: 0px;
padding: 0px;
background: #F6D897;
font-size: 90%;
}
resources-shared.xmap:
<map:match pattern="*/*/css/*.parent.css">
<map:read src="parent://resources/shared/css/{3}.css"
mime-type="text/css" />
</map:match>
Am I missing something, would there be a better way of doing something
like this? Figured that I would join in on the protocol free for all :).
--Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]