cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: XSLT Trouble
Date Thu, 02 Aug 2001 08:39:42 GMT
On 02.Aug.2001 -- 03:49 PM, Kazi the P i R @ t {- wrote:
> Well :) ... I am finally smiling... The trouble has finally gone away.. and
> i'd like to thank you all for
> your suggestions adn pointers... especially Scott Boag, cause what he
> mentioned really made the difference in the end.
> 
> Initially i had
> <xsl:stylesheet xmlns:xsl=http://www.w3c.org/1999/XSL/Transform/mmm
> version="1.0">
> and then i had it changed (according to Mr Scott's mail) to:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> 
> All was fine after that...
> 
> But i read somewhere that the URI can be anything.... as long as its a
> unique string... then how come it has to be so specific... could anyone
> correct my concepts here???

You're right. However, cocoon determines the taglib to be used by
prefix + URI. Change anything and it doesn't find the right taglib.

With stylesheets this is not that restrictive, because you specify the
file in the sitemap. Still, you need to have the very same namespace
declaration in your document and your stylesheet. Since xsl is not a
stylesheet but built into the xsl processor and thus is unlikely to
have been changed by you, you need to use exactly the same namespace
URI that has been set by w3c. You might get away using a different
prefix though but I wouldn't bet on that.

I know that taglibs are usually implemented with stylesheets but I
find it very important to differentiate on the role that a stylesheet
takes. Therefore when I refer to stylesheets implementing taglibs I
use the term taglib. These are applied only when the document itself
changes, i.e. to generate java source code from an xsp. They are
registered with cocoon in your cocoon.xconf.

What I refer to as "stylesheets" are of course stylesheets, but those
that are applied to the document every time output is produced, or
more precise they are applied to the output of the generation
process. These stylesheets are specified in sitemap pipelines.

> Whats fumbling me now is the exact sequence an xsl stylesheet is processed.

It used to be reverse declaration order for taglibs. But since it
seems not necessary anymore to declare all namespaces (i.e. those that
are not present in the original document but get introduced by
taglibs), this might have changed.

Stylesheets get applied in the order specified in your sitemap
pipeline.

Anyway, with taglibs they should be written in a way that all taglibs
of one stage should be applicable in any order. When all declared
namespaces of a stage are resolved to taglibs, the next stage begins
with the namespaces added by the taglibs from previous stage.

Cocoon is very verbose. Look at the log and you see every taglib being
applied. 

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message