Gregor J. Rothfuss wrote:
Doug Chestnut wrote:

<xsl:import href="parent://xslt/page2xhtml-xhtml.xsl"/>


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 :).


yes:

<xsl:import href="fallback://{parent}xslt/page2xhtml-xhtml.xsl">

Ok, this was what I was looking for. However this doesn't work :). I guess that I need to make the parent variable in my sitemap. What should the parent variable be? I tried replacing {parent} with parentTemplateName/ in my sitemap but that didn't work.

I am guessing this is functionality that would need to be added to the fallback input module? I could use context:/ but that doesn't have the same strength as "fallback from parent". Using "fallback://lenya/pubs/parentTemplateName/resources/shared/css/{3}.css" works, but seems to be no different from context:// as it doesn't look at the parent templates of parentTemplateName.

"fallback://parentTemplateName/resources/shared/css/{3}.css" doesn't work:

org.apache.excalibur.source.SourceNotFoundException: file:/C:/src/lenya-1.4.x.WEBDAV/build/lenya/webapp/parentTemplateName/resources/shared/css/default.css doesn't exist.

"fallback://{parent}resources/shared/css/{3}.css" gives me the same result as "fallback://resources/shared/css/{3}.css".


we should avoid gratuitous protocols that have only subtly different semantics

Agreed.

So, my guess is that this is a stab at how it should work (fallback input module should be able to handle this):
<xsl:import href="fallback://{parent}xslt/page2xhtml-xhtml.xsl">

What should the value of {parent} be?
parentTemplateName/
lenya/pubs/parentTemplateName/ (I am thinking this one)

I will take a closer look at FallbackModule.java ;)

Thanks,
--Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to