You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Torsten Schlabach <ts...@apache.org> on 2005/03/25 22:19:07 UTC

Fallback for content??

Hi all,

just doing a quick check here.

In trunk, Default publication, parameter-doctype.xmap, line 50:

<map:act type="sourcetype"
src="fallback://content/{1}/{page-envelope:document-path}">

Is that by purpose or did someone just think: Fallback is good!

Shouldn't this rather be the lenya: protocol instead of the fallback:
protocol here?

Regards,
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Fallback for content??

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Torsten Schlabach wrote:

> From all what I remember, we need to know the resource type to determine
> the corresponding {sourcetype}2xhtml.xsl? So why do we do all that round
> trip with that sub-sitemap, generating XML and feeding this back to a
> sitemap parameter some time later in order to later be able to say:
> 
> (in doctypes.xmap)
> <map:transform src="fallback://xslt/{../3}2xhtml.xsl">
> 
> Couldn't this be just
> <map:transform src="fallback://xslt/{page-envelope:sourcetype}2xhtml.xsl">

in order to get the resource type, the source type action actually has 
to peek into the xml file with a pull parser and try to find a root tag, 
ns declaration or dtd to determine the doctype. that resource type is 
then passed to the page envelope.

i agree that this is a kludge. we can probably have the functionality of 
the source type action somewhere else. it was also pointed out that 
resource types don't change on every request, so we might be able to 
store them as attributes on the node in the repository.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Fallback for content??

Posted by Torsten Schlabach <ts...@apache.org>.
[Gregor wrote:]
> you are right.

Thx. I was about to fix that when I found that there are three different
pipelines in that file.

The fist one (line 37) hard wires any page which name starts with index*
to the homepage doctype. The other two match either *.html or *.xml and
use XSP to wrap the sourcetype which results from the action back into
some SAX events. I have not yet traced down where they get consumed, but I
need to say this whole thing looks somewhat odd to me.

J. Wolfgang has suggested to give up determining the resource type (fka
doctype) using the SourceTypeAction anyway. I am not sure where that
discussion finally lead to, but it might be worth straightening it out.

>From all what I remember, we need to know the resource type to determine
the corresponding {sourcetype}2xhtml.xsl? So why do we do all that round
trip with that sub-sitemap, generating XML and feeding this back to a
sitemap parameter some time later in order to later be able to say:

(in doctypes.xmap)
<map:transform src="fallback://xslt/{../3}2xhtml.xsl">

Couldn't this be just
<map:transform src="fallback://xslt/{page-envelope:sourcetype}2xhtml.xsl">

Regards,
Torsten

> Torsten Schlabach wrote:
>> Hi all,
>>
>> just doing a quick check here.
>>
>> In trunk, Default publication, parameter-doctype.xmap, line 50:
>>
>> <map:act type="sourcetype"
>> src="fallback://content/{1}/{page-envelope:document-path}">
>>
>> Is that by purpose or did someone just think: Fallback is good!
>>
>> Shouldn't this rather be the lenya: protocol instead of the fallback:
>> protocol here?
>
> you are right.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Fallback for content??

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Torsten Schlabach wrote:
> Hi all,
> 
> just doing a quick check here.
> 
> In trunk, Default publication, parameter-doctype.xmap, line 50:
> 
> <map:act type="sourcetype"
> src="fallback://content/{1}/{page-envelope:document-path}">
> 
> Is that by purpose or did someone just think: Fallback is good!
> 
> Shouldn't this rather be the lenya: protocol instead of the fallback:
> protocol here?

you are right.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org